library: libRGL #include "TGLViewer.h" | 
TGLViewer
class description - source file - inheritance tree (.pdf)
    private:
                         TGLViewer(const TGLViewer&)
      RootCsg::BaseMesh* BuildComposite()
        TGLLogicalShape* CreateNewLogical(const TBuffer3D& buffer) const
       TGLPhysicalShape* CreateNewPhysical(UInt_t physicalID, const TBuffer3D& buffer, const TGLLogicalShape& logical) const
              TGLCamera& CurrentCamera() const
                    void InitGL()
                    void MakeCurrent() const
              TGLViewer& operator=(const TGLViewer&)
                    void PostDraw()
                    void PreDraw()
                  Bool_t RebuildScene()
                    void SetupCameras(const TGLBoundingBox& box)
                    void SetupLights()
                    void SetViewport(Int_t x, Int_t y, UInt_t width, UInt_t height)
                    void SwapBuffers() const
                   Int_t ValidateObjectBuffer(const TBuffer3D& buffer, Bool_t logical) const
                    void WindowToGL(TGLRect& rect) const
                    void WindowToGL(TGLVertex3& vertex) const
    public:
                              TGLViewer(TVirtualPad* pad, Int_t x, Int_t y, UInt_t width, UInt_t height)
                      virtual ~TGLViewer()
                 virtual void AddCompositeOp(UInt_t operation)
                virtual Int_t AddObject(const TBuffer3D& buffer, Bool_t* addChildren = 0)
                virtual Int_t AddObject(UInt_t physicalID, const TBuffer3D& buffer, Bool_t* addChildren = 0)
                 virtual void BeginScene()
               virtual Bool_t BuildingScene() const
                         void ChangedBy(const char* method)
               static TClass* Class()
                 virtual void CloseComposite()
                       Bool_t Connect(const char* sig, const char* cl, void* rcvr, const char* slt)
                         void Destroyed()
                       Bool_t Disconnect(const char* sig = "0", void* rcvr = 0, const char* slt = "0")
                virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
                         void DoDraw()
                       Bool_t DoSelect(const TGLRect& rect)
                         void Emit(const char* signal)
                         void Emit(const char* signal, const char* params)
                         void Emit(const char* signal, Long_t* paramArr)
                         void Emit(const char* signal, Double_t param)
                         void Emit(const char* signal, Long_t param)
                         void Emit(const char* signal, Long64_t param)
                         void Emit(const char* signal, ULong64_t param)
                         void Emit(const char* signal, Bool_t param)
                         void Emit(const char* signal, Char_t param)
                         void Emit(const char* signal, UChar_t param)
                         void Emit(const char* signal, Short_t param)
                         void Emit(const char* signal, UShort_t param)
                         void Emit(const char* signal, Int_t param)
                         void Emit(const char* signal, UInt_t param)
                         void Emit(const char* signal, ULong_t param)
                         void Emit(const char* signal, Float_t param)
                         void EmitVA(const char* signal, Int_t nargs)
                 virtual void EndScene()
                 virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
                       TList* GetListOfSignals() const
      const TGLPhysicalShape* GetSelected() const
                       Bool_t HandleButton(Event_t* ev)
                       Bool_t HandleConfigureNotify(Event_t* ev)
                       Bool_t HandleDoubleClick(Event_t* ev)
                       Bool_t HandleEvent(Event_t* ev)
                       Bool_t HandleExpose(Event_t* ev)
                       Bool_t HandleKey(Event_t* ev)
                       Bool_t HandleMotion(Event_t* ev)
                         void HighPriority(const char* signal_name, const char* slot_name = "0")
              virtual TClass* IsA() const
                         void LowPriority(const char* signal_name, const char* slot_name = "0")
                         void Message(const char* msg)
               virtual Bool_t OpenComposite(const TBuffer3D& buffer, Bool_t* addChildren = 0)
               virtual Bool_t PreferLocalFrame() const
                         void RequestDraw(UInt_t redrawLOD = kMed)
                         void RequestSelect(UInt_t x, UInt_t y)
                 virtual void SelectionChanged()
                         void SetClipPlaneEq(const TGLPlane& eqn)
                         void SetColorOnSelectedFamily(const Float_t* rgba)
                         void SetCurrentCamera(TGLViewer::ECamera camera)
                         void SetSelectedColor(const Float_t* rgba)
                         void SetSelectedGeom(const TGLVertex3& trans, const TGLVector3& scale)
                 virtual void ShowMembers(TMemberInspector& insp, char* parent)
                 virtual void Streamer(TBuffer& b)
                         void StreamerNVirtual(TBuffer& b)
                         void ToggleAxes()
                         void ToggleClip()
                         void ToggleLight(TGLViewer::ELight light)
    private:
               TQObjSender fQObject               
              TVirtualPad* fPad                   ! external pad - remove replace with signal
             TContextMenu* fContextMenu           !
      TGLPerspectiveCamera fPerspectiveCamera     !
            TGLOrthoCamera fOrthoXOYCamera        !
            TGLOrthoCamera fOrthoYOZCamera        !
            TGLOrthoCamera fOrthoXOZCamera        !
                TGLCamera* fCurrentCamera         !
                    Bool_t fInternalRebuild       ! internal scene rebuild in progress?
                    Bool_t fAcceptedAllPhysicals  ! did we take all physicals offered in AddObject()
                    Bool_t fInternalPIDs          ! using internal physical IDs
                    UInt_t fNextInternalPID       ! next internal physical ID (from 1 - 0 reserved)
               TGLFaceSet* fComposite             ! Paritally created composite
                    UInt_t fCSLevel               
          vector<CSPart_t> fCSTokens              
        TGLViewer::EAction fAction                
                    TPoint fStartPos              
                    TPoint fLastPos               
                    UInt_t fActiveButtonID        
                EDrawStyle fDrawStyle             ! current draw style (Fill/Outline/WireFrame)  
           TGLRedrawTimer* fRedrawTimer           !
                    UInt_t fNextSceneLOD          !
                  TGLScene fScene                 ! the GL scene - owned by viewer at present
                   TGLRect fViewport              ! viewport - drawn area
                    UInt_t fLightState            ! light states (on/off) mask
                  TGLPlane fClipPlane             ! current clip plane
                    Bool_t fUseClipPlane          ! use current clipping plane
                    Bool_t fDrawAxes              ! draw scene axes
                    Bool_t fInitGL                ! has GL been initialised?
                    Bool_t fDebugMode             ! debug mode (forced rebuild + draw scene/frustum/interest boxes)
                    UInt_t fAcceptedPhysicals     ! number of physicals accepted in last rebuild
                    UInt_t fRejectedPhysicals     ! number of physicals rejected in last rebuild
                    Bool_t fIsPrinting            
    protected:
      TGLWindow* fGLWindow  ! remove - replace with TGLManager
    public:
      static const TGLViewer::ECamera kCameraPerspective  
      static const TGLViewer::ECamera kCameraXOY          
      static const TGLViewer::ECamera kCameraYOZ          
      static const TGLViewer::ECamera kCameraXOZ          
       static const TGLViewer::ELight kLightFront         
       static const TGLViewer::ELight kLightTop           
       static const TGLViewer::ELight kLightBottom        
       static const TGLViewer::ELight kLightLeft          
       static const TGLViewer::ELight kLightRight         
       static const TGLViewer::ELight kLightMask          
      static const TGLViewer::EAction kNone               
      static const TGLViewer::EAction kRotate             
      static const TGLViewer::EAction kTruck              
      static const TGLViewer::EAction kDolly              
      static const TGLViewer::EAction kDrag               
 TGLViewer(TVirtualPad * pad, Int_t x, Int_t y, 
                     UInt_t width, UInt_t height) :
   fPad(pad),
   fContextMenu(0),
   fPerspectiveCamera(),
   fOrthoXOYCamera(TGLOrthoCamera::kXOY),
   fOrthoYOZCamera(TGLOrthoCamera::kYOZ),
   fOrthoXOZCamera(TGLOrthoCamera::kXOZ),
   fCurrentCamera(&fPerspectiveCamera),
   fInternalRebuild(kFALSE), 
   fAcceptedAllPhysicals(kTRUE),
   fInternalPIDs(kFALSE), 
   fNextInternalPID(1), // 0 reserved
   fComposite(0), fCSLevel(0),
   fAction(kNone), fStartPos(0,0), fLastPos(0,0), fActiveButtonID(0),
   fDrawStyle(kFill),
   fRedrawTimer(0),
   fNextSceneLOD(kHigh),
   fLightState(kLightMask), // All on
   fClipPlane(1.0, 0.0, 0.0, 0.0),
   fUseClipPlane(kFALSE),
   fDrawAxes(kFALSE),
   fInitGL(kFALSE),
   fDebugMode(kFALSE),
   fAcceptedPhysicals(0), 
   fRejectedPhysicals(0),
   fIsPrinting(kFALSE),
   fGLWindow(0)
 ~TGLViewer()
Bool_t PreferLocalFrame() const
void BeginScene()
void EndScene()
Bool_t RebuildScene()
 If we accepted all offered physicals into the scene no point in
 rebuilding it
Int_t AddObject(const TBuffer3D & buffer, Bool_t * addChildren)
 Add an object to the viewer, using internal physical IDs
Int_t AddObject(UInt_t physicalID, const TBuffer3D & buffer, Bool_t * addChildren)
 Add an object to the viewer, using an external physical ID.
Bool_t OpenComposite(const TBuffer3D & buffer, Bool_t * addChildren)
void CloseComposite()
 If we have a partially complete composite build it now
void AddCompositeOp(UInt_t operation)
Int_t ValidateObjectBuffer(const TBuffer3D & buffer, Bool_t logical) const
 kCore: Should always be filled
TGLLogicalShape* CreateNewLogical(const TBuffer3D & buffer) const
 Buffer should now be correctly filled
TGLPhysicalShape* CreateNewPhysical(UInt_t ID, 
                                                    const TBuffer3D & buffer, 
                                                    const TGLLogicalShape & logical) const
 Extract indexed color from buffer
 TODO: Still required? Better use proper color triplet in buffer?
RootCsg::BaseMesh* BuildComposite()
void InitGL
void SetupCameras(const TGLBoundingBox & box)
void SetupLights()
 Setup lights
void DoDraw()
 Draw out the the current viewer/scene
void PreDraw()
 GL work which must be done before each draw of scene
void PostDraw()
 GL work which must be done after each draw of scene
void MakeCurrent() const
void SwapBuffers() const
void RequestDraw(UInt_t LOD)
Bool_t DoSelect(const TGLRect & rect)
 Select lock should already been taken in other thread in
 TGLViewer::DoSelect()
void RequestSelect(UInt_t x, UInt_t y)
 Take select lock on scene immediately we enter here - it is released
 in the other (drawing) thread - see TGLViewer::Select()
 Removed when gVirtualGL removed
void SetViewport(Int_t x, Int_t y, UInt_t width, UInt_t height)
void SetCurrentCamera(ECamera camera)
void ToggleLight(ELight light)
 Toggle supplied light on/off
void ToggleAxes()
void ToggleClip()
void SetClipPlaneEq(const TGLPlane & eqn)
void SetSelectedColor(const Float_t rgba[4])
void SetColorOnSelectedFamily(const Float_t rgba[4])
void SetSelectedGeom(const TGLVertex3 & trans, const TGLVector3 & scale)
void SelectionChanged() 
Int_t DistancetoPrimitive(Int_t /*px*/, Int_t /*py*/)
 Can't track the indvidual objects in rollover. Just set the viewer as the
 selected object, and return 0 (object identified) so we receive ExecuteEvent calls
void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Bool_t HandleEvent(Event_t *event)
Bool_t HandleButton(Event_t *event)
Bool_t HandleDoubleClick(Event_t *event)
Bool_t HandleConfigureNotify(Event_t *event)
Bool_t HandleKey(Event_t *event)
Bool_t HandleMotion(Event_t *event)
Bool_t HandleExpose(Event_t *)
Inline Functions
                         TList* GetListOfSignals() const
                         Bool_t Connect(const char* sig, const char* cl, void* rcvr, const char* slt)
                         Bool_t Disconnect(const char* sig = "0", void* rcvr = 0, const char* slt = "0")
                           void HighPriority(const char* signal_name, const char* slot_name = "0")
                           void LowPriority(const char* signal_name, const char* slot_name = "0")
                           void EmitVA(const char* signal, Int_t nargs)
                           void Emit(const char* signal)
                           void Emit(const char* signal, const char* params)
                           void Emit(const char* signal, Long_t* paramArr)
                           void Emit(const char* signal, Double_t param)
                           void Emit(const char* signal, Long_t param)
                           void Emit(const char* signal, Long64_t param)
                           void Emit(const char* signal, ULong64_t param)
                           void Emit(const char* signal, Bool_t param)
                           void Emit(const char* signal, Char_t param)
                           void Emit(const char* signal, UChar_t param)
                           void Emit(const char* signal, Short_t param)
                           void Emit(const char* signal, UShort_t param)
                           void Emit(const char* signal, Int_t param)
                           void Emit(const char* signal, UInt_t param)
                           void Emit(const char* signal, ULong_t param)
                           void Emit(const char* signal, Float_t param)
                           void Destroyed()
                           void ChangedBy(const char* method)
                           void Message(const char* msg)
                     TGLCamera& CurrentCamera() const
                           void WindowToGL(TGLRect& rect) const
                           void WindowToGL(TGLVertex3& vertex) const
                     TGLViewer& operator=(const TGLViewer&)
                      TGLViewer TGLViewer(TVirtualPad* pad, Int_t x, Int_t y, UInt_t width, UInt_t height)
                         Bool_t BuildingScene() const
        const TGLPhysicalShape* GetSelected() const
                        TClass* Class()
                        TClass* IsA() const
                           void ShowMembers(TMemberInspector& insp, char* parent)
                           void Streamer(TBuffer& b)
                           void StreamerNVirtual(TBuffer& b)
Author: Richard Maunder 25/05/2005
Last update: root/gl:$Name:  $:$Id: TGLViewer.cxx,v 1.16 2005/09/06 09:26:40 brun Exp $
Copyright  (C) 1995-2000, Rene Brun and Fons Rademakers.               *
ROOT page - Class index - Class Hierarchy - Top of the page
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.