Logo ROOT  
Reference Guide
TGLSceneInfo.cxx
Go to the documentation of this file.
1 // @(#)root/gl:$Id$
2 // Author: Matevz Tadel, Feb 2007
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #include "TGLSceneInfo.h"
13 #include "TGLRnrCtx.h"
14 #include "TGLSceneBase.h"
15 #include "TGLViewerBase.h"
16 
17 /** \class TGLSceneInfo
18 \ingroup opengl
19 Base class for extended scene context.
20 
21 Scenes can be shared among several viewers and each scene needs to
22 cache some viewer/camera/clipping specific state => this is a
23 storage class for this data.
24 
25 Sub-classes of TGLSceneBase can override the virtual
26 CreateSceneInfo() method and in it instantiate a sub-class of
27 TGLSceneInfo containing the needed information. See TGLScene and
28 inner class SceneInfo; note that some casting is needed in actual
29 methods as TGLRnrCtx holds the base-class pointer.
30 */
31 
33 
34 ////////////////////////////////////////////////////////////////////////////////
35 
37  fViewer (view),
38  fScene (scene),
39  fActive (kTRUE),
40 
41  fLOD (TGLRnrCtx::kLODUndef),
42  fStyle (TGLRnrCtx::kStyleUndef),
43  fWFLineW (0),
44  fOLLineW (0),
45  fClip (0),
46 
47  fLastLOD (TGLRnrCtx::kLODUndef),
48  fLastStyle (TGLRnrCtx::kStyleUndef),
49  fLastWFLineW (0),
50  fLastOLLineW (0),
51  fLastClip (0),
52  fLastCamera(0),
53 
54  fSceneStamp (0),
55  fClipStamp (0),
56  fCameraStamp(0),
57  fUpdateTimeouted(kFALSE),
58 
59  fViewCheck (kTRUE),
60  fInFrustum (kTRUE),
61  fInClip (kTRUE),
62  fClipMode (kClipNone)
63 {
64  // Default constructor.
65 }
66 
67 ////////////////////////////////////////////////////////////////////////////////
68 /// Set active state of the scene, mark viewer as changed.
69 
71 {
72  if (a != fActive)
73  {
74  fActive = a;
75  fViewer->Changed();
76  }
77 }
78 
79 ////////////////////////////////////////////////////////////////////////////////
80 /// Combine information from scene, scene-info and camera (should be
81 /// optional) into transformation matrices.
82 ///
83 /// Transform scene bounding box using this transformation.
84 
86 {
87  // !!! Transforms not implemented yet, just copy the scene bounding
88  // box.
89 
91 }
TGLSceneInfo::TGLSceneInfo
TGLSceneInfo(const TGLSceneInfo &)=delete
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:100
TGLSceneBase
Scene base-class – provides basic interface expected by the TGLViewer or its sub-classes:
Definition: TGLSceneBase.h:33
TGLSceneInfo::fViewer
TGLViewerBase * fViewer
Definition: TGLSceneInfo.h:39
ClassImp
#define ClassImp(name)
Definition: Rtypes.h:364
TGLViewerBase::Changed
virtual void Changed()
Definition: TGLViewerBase.h:121
TGLSceneBase.h
TGLSceneInfo.h
TGLSceneInfo::SetupTransformsAndBBox
void SetupTransformsAndBBox()
Combine information from scene, scene-info and camera (should be optional) into transformation matric...
Definition: TGLSceneInfo.cxx:85
bool
TGLViewerBase
Base class for GL viewers.
Definition: TGLViewerBase.h:37
TGLRnrCtx.h
TGLSceneInfo::fActive
Bool_t fActive
Definition: TGLSceneInfo.h:41
a
auto * a
Definition: textangle.C:12
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:101
TGLSceneInfo::fTransformedBBox
TGLBoundingBox fTransformedBBox
Definition: TGLSceneInfo.h:66
TGLSceneInfo::fScene
TGLSceneBase * fScene
Definition: TGLSceneInfo.h:40
TGLSceneBase::BoundingBox
const TGLBoundingBox & BoundingBox() const
Definition: TGLSceneBase.h:138
TGLSceneInfo::SetActive
void SetActive(Bool_t a)
Set active state of the scene, mark viewer as changed.
Definition: TGLSceneInfo.cxx:70
TGLViewerBase.h
TGLSceneInfo
Base class for extended scene context.
Definition: TGLSceneInfo.h:28
TGLRnrCtx
The TGLRnrCtx class aggregates data for a given redering context as needed by various parts of the RO...
Definition: TGLRnrCtx.h:41