library: libRGL #include "TGLScene.h"

# TGLScene

class description - source file - inheritance tree (.pdf)

## class TGLScene

| Inheritance Chart:

`TGLScene`

        private:

                        TGLScene(const TGLScene&)
                 UInt_t CalcPhysicalLOD(const TGLPhysicalShape& shape, const TGLCamera& camera, UInt_t sceneLOD) const
          static Bool_t ComparePhysicalVolumes(const TGLPhysicalShape* shape1, const TGLPhysicalShape* shape2)
                   void DrawNumber(Double_t num, Double_t x, Double_t y, Double_t z, Double_t yorig) const
              TGLScene& operator=(const TGLScene&)
                   void SortDrawList()

        public:

                                TGLScene()
                        virtual ~TGLScene()
                           void AdoptLogical(TGLLogicalShape& shape)
                           void AdoptPhysical(TGLPhysicalShape& shape)
          const TGLBoundingBox& BoundingBox() const
                 static TClass* Class()
                TGLScene::ELock CurrentLock() const
                         Bool_t DestroyLogical(ULong_t ID)
                         UInt_t DestroyLogicals()
                         Bool_t DestroyPhysical(ULong_t ID)
                         UInt_t DestroyPhysicals(Bool_t incModified, const TGLCamera* camera = 0)
                         UInt_t Draw(const TGLCamera& camera, UInt_t sceneLOD, Double_t timeout = 0.0)
                           void DrawAxes() const
                           void Dump() const
               TGLLogicalShape* FindLogical(ULong_t ID) const
              TGLPhysicalShape* FindPhysical(ULong_t ID) const
              TGLPhysicalShape* GetSelected() const
                virtual TClass* IsA() const
                         Bool_t IsLocked() const
             static const char* LockName(TGLScene::ELock lock) const
                  static Bool_t LockValid(TGLScene::ELock lock)
                           void PurgeNextLogical()
                         Bool_t ReleaseLock(TGLScene::ELock lock) const
                         Bool_t Select(const TGLCamera& camera)
                           void SelectedModified()
                           void SetDrawMode(TGLScene::EDrawMode mode)
                           void SetPhysicalsColorByLogical(ULong_t logicalID, const Float_t* rgba)
                   virtual void ShowMembers(TMemberInspector& insp, char* parent)
                         UInt_t SizeOf() const
                   virtual void Streamer(TBuffer& b)
                           void StreamerNVirtual(TBuffer& b)
                         Bool_t TakeLock(TGLScene::ELock lock) const

### Data Members

        private:

                                                                                                            TGLScene::ELock fLock              !
            map<unsigned long,TGLLogicalShape*,less<unsigned long>,allocator<pair<const unsigned long,TGLLogicalShape*> > > fLogicalShapes     !
          map<unsigned long,TGLPhysicalShape*,less<unsigned long>,allocator<pair<const unsigned long,TGLPhysicalShape*> > > fPhysicalShapes    !
                                                        vector<const TGLPhysicalShape*,allocator<const TGLPhysicalShape*> > fDrawList          !
                                                                                                                     Bool_t fDrawListValid     ! (do we need this & fBoundingBoxValid)
                                                                                                             TGLBoundingBox fBoundingBox       ! bounding box for scene (axis aligned) - lazy update - use BoundingBox() to access
                                                                                                                     Bool_t fBoundingBoxValid  ! bounding box valid?
                                                                                                                     UInt_t fLastDrawLOD       ! last LOD for the scene draw
                                                                                                        TGLScene::EDrawMode fDrawMode          ! current draw style (Fill/Outline/WireFrame)
                                                                                                          TGLPhysicalShape* fSelectedPhysical  ! current selected physical shape

        public:

          static const TGLScene::EDrawMode kFill
          static const TGLScene::EDrawMode kOutline
          static const TGLScene::EDrawMode kWireFrame
              static const TGLScene::ELock kUnlocked
              static const TGLScene::ELock kDrawLock
              static const TGLScene::ELock kSelectLock
              static const TGLScene::ELock kModifyLock

## Class Description

TGLScene() : fLock(kUnlocked), fDrawList(1000), fDrawListValid(kFALSE), fBoundingBox(), fBoundingBoxValid(kFALSE), fLastDrawLOD(kHigh), fDrawMode(kFill), fSelectedPhysical(0)

~TGLScene()

void AdoptLogical(TGLLogicalShape & shape)

Bool_t DestroyLogical(ULong_t ID)

UInt_t DestroyLogicals()

TGLLogicalShape* FindLogical(ULong_t ID) const

void AdoptPhysical(TGLPhysicalShape & shape)

Bool_t DestroyPhysical(ULong_t ID)

UInt_t DestroyPhysicals(Bool_t incModified, const TGLCamera * camera)

TGLPhysicalShape* FindPhysical(ULong_t ID) const

void SetPhysicalsColorByLogical(ULong_t logicalID, const Float_t rgba[4])

UInt_t Draw(const TGLCamera & camera, UInt_t sceneLOD, Double_t timeout)

void SortDrawList()

Bool_t ComparePhysicalVolumes(const TGLPhysicalShape * shape1, const TGLPhysicalShape * shape2)

void DrawAxes() const

void DrawNumber(Double_t num, Double_t x, Double_t y, Double_t z, Double_t yorig) const

UInt_t CalcPhysicalLOD(const TGLPhysicalShape & shape, const TGLCamera & camera, UInt_t sceneLOD) const

     Find diagonal pixel size of projected drawable BB, using camera

Bool_t Select(const TGLCamera & camera)

void SelectedModified()

     External modification - no locking

const TGLBoundingBox& BoundingBox() const

void Dump() const

UInt_t SizeOf() const

### Inline Functions

                    TGLScene& operator=(const TGLScene&)
                     TGLScene TGLScene()
                         void SetDrawMode(TGLScene::EDrawMode mode)
                         void PurgeNextLogical()
            TGLPhysicalShape* GetSelected() const
                       Bool_t TakeLock(TGLScene::ELock lock) const
                       Bool_t ReleaseLock(TGLScene::ELock lock) const
                       Bool_t IsLocked() const
              TGLScene::ELock CurrentLock() const
                  const char* LockName(TGLScene::ELock lock) const
                       Bool_t LockValid(TGLScene::ELock lock)
                      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: TGLScene.cxx,v 1.12 2005/06/23 15:08:45 brun Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *