Logo ROOT  
Reference Guide
TGLLogicalShape.cxx
Go to the documentation of this file.
1 // @(#)root/gl:$Id$
2 // Author: Richard Maunder 25/05/2005
3 
4 #include "TGLLogicalShape.h"
5 #include "TGLPhysicalShape.h"
6 #include "TGLRnrCtx.h"
7 #include "TGLScene.h"
8 #include "TGLCamera.h"
9 #include "TGLSelectRecord.h"
10 #include "TGLContext.h"
11 #include "TGLIncludes.h"
12 
13 #include "TBuffer3D.h"
14 #include "TClass.h"
15 #include "TContextMenu.h"
16 #include "TEnv.h"
17 
18 
19 /** \class TGLLogicalShape
20 \ingroup opengl
21 Abstract logical shape - a GL 'drawable' - base for all shapes -
22 faceset sphere etc. Logical shapes are a unique piece of geometry,
23 described in it's local frame - e.g if we have three spheres in :
24 
25  - Sphere A - Radius r1, center v1
26  - Sphere B - Radius r2, center v2
27  - Sphere C - Radius r1, center v3
28 
29 Spheres A and C can share a common logical sphere of radius r1 - and
30 place them with two physicals with translations of v1 & v2. Sphere B
31 requires a different logical (radius r2), placed with physical with
32 translation v2.
33 
34 Physical shapes know about and can share logicals. Logicals do not
35 about (aside from reference counting) physicals or share them.
36 
37 This sharing of logical shapes greatly reduces memory consumption and
38 scene (re)build times in typical detector geometries which have many
39 repeated objects placements.
40 
41 TGLLogicalShapes have reference counting, performed by the client
42 physical shapes which are using it.
43 
44 Display list information is also stored here, possibly per LOD
45 level. Most classes do not support LOD (only sphere and tube) and
46 therefore reasonable defaults are encoded in the following virtual
47 functions:
48 ~~~ {.cpp}
49  * ELODAxes SupportedLODAxes() { return kLODAxesNone; }
50  * Int_t DLCacheSize() { return 1; }
51  * UInt_t DLOffset(lod); // Transform lod into DL offset.
52  * Short_t QuantizeShapeLOD(); // Quantize lod.
53 ~~~
54 Classes that have per-LOD display-lists than override these functions.
55 'UShort_t fDLValid' is used as a bit-field determining validity of
56 each quantized LOD-level; hopefully one will not have more than 16
57 LOD levels per class.
58 See also: TGLPhysicalShape::CalculateShapeLOD() where LOD is calculated.
59 
60 See base/src/TVirtualViewer3D for description of common external 3D
61 viewer architecture and how external viewer clients use it.
62 */
63 
65 
67 
70 
71 ////////////////////////////////////////////////////////////////////////////////
72 /// Constructor.
73 
75  fRef (0),
76  fFirstPhysical (0),
77  fExternalObj (0),
78  fScene (0),
79  fDLBase (0),
80  fDLSize (1),
81  fDLValid (0),
82  fDLCache (kTRUE),
83  fRefStrong (kFALSE),
84  fOwnExtObj (kFALSE)
85 {
86 }
87 
88 ////////////////////////////////////////////////////////////////////////////////
89 /// Constructor with external object.
90 
92  fRef (0),
93  fFirstPhysical (0),
94  fExternalObj (obj),
95  fScene (0),
96  fDLBase (0),
97  fDLSize (1),
98  fDLValid (0),
99  fDLCache (kTRUE),
100  fRefStrong (kFALSE),
101  fOwnExtObj (kFALSE)
102 {
103 }
104 
105 ////////////////////////////////////////////////////////////////////////////////
106 /// Constructor from TBuffer3D.
107 
109  fRef (0),
110  fFirstPhysical (0),
111  fExternalObj (buffer.fID),
112  fScene (0),
113  fDLBase (0),
114  fDLSize (1),
115  fDLValid (0),
116  fDLCache (kTRUE),
117  fRefStrong (kFALSE),
118  fOwnExtObj (kFALSE)
119 {
120  // Use the bounding box in buffer if valid
122  fBoundingBox.Set(buffer.fBBVertex);
123  } else if (buffer.SectionsValid(TBuffer3D::kRaw)) {
124  // otherwise use the raw points to generate one
125  fBoundingBox.SetAligned(buffer.NbPnts(), buffer.fPnts);
126  }
127 
128  // If the logical is created without an external object reference,
129  // we create a generic here and delete it during the destruction.
130  if (fExternalObj == 0)
131  {
132  fExternalObj = new TNamed("Generic object", "Internal object created for bookkeeping.");
133  fOwnExtObj = kTRUE;
134  }
135 }
136 
137 ////////////////////////////////////////////////////////////////////////////////
138 /// Destroy logical shape.
139 
141 {
142  // Physicals should have been cleared elsewhere as they are managed
143  // by the scene. But this could change.
144  if (fRef > 0) {
145  Warning("TGLLogicalShape::~TGLLogicalShape", "some physicals still lurking around.");
147  }
148  DLCachePurge();
149  if (fOwnExtObj)
150  {
151  delete fExternalObj;
152  }
153 }
154 
155 
156 /**************************************************************************/
157 // Physical shape ref-counting, replica management
158 /**************************************************************************/
159 
160 ////////////////////////////////////////////////////////////////////////////////
161 /// Add reference to given physical shape.
162 
164 {
166  fFirstPhysical = phys;
167  ++fRef;
168 }
169 
170 ////////////////////////////////////////////////////////////////////////////////
171 /// Remove reference to given physical shape, potentially deleting
172 /// *this* object when hitting zero ref-count (if fRefStrong is
173 /// true).
174 
176 {
177  assert(phys != 0);
178 
179  Bool_t found = kFALSE;
180  if (fFirstPhysical == phys) {
182  found = kTRUE;
183  } else {
184  TGLPhysicalShape *shp1 = fFirstPhysical, *shp2;
185  while ((shp2 = shp1->fNextPhysical) != 0) {
186  if (shp2 == phys) {
187  shp1->fNextPhysical = shp2->fNextPhysical;
188  found = kTRUE;
189  break;
190  }
191  shp1 = shp2;
192  }
193  }
194  if (found == kFALSE) {
195  Error("TGLLogicalShape::SubRef", "Attempt to un-ref an unregistered physical.");
196  return;
197  }
198 
199  if (--fRef == 0 && fRefStrong)
200  delete this;
201 }
202 
203 ////////////////////////////////////////////////////////////////////////////////
204 /// Destroy all physicals attached to this logical.
205 
207 {
208  TGLPhysicalShape *curr = fFirstPhysical, *next;
209  while (curr)
210  {
211  next = curr->fNextPhysical;
212  curr->fLogicalShape = 0;
213  --fRef;
214  delete curr;
215  curr = next;
216  }
217  assert (fRef == 0);
218  fFirstPhysical = 0;
219 }
220 
221 ////////////////////////////////////////////////////////////////////////////////
222 /// Unreferenced first physical in the list, returning its id and
223 /// making it fit for destruction somewhere else.
224 /// Returns 0 if there are no replicas attached.
225 
227 {
228  if (fFirstPhysical == 0) return 0;
229 
231  UInt_t phid = phys->ID();
233  phys->fLogicalShape = 0;
234  --fRef;
235  return phid;
236 }
237 
238 
239 /**************************************************************************/
240 // Bounding-boxes
241 /**************************************************************************/
242 
243 ////////////////////////////////////////////////////////////////////////////////
244 /// Update bounding-boxed of all dependent physicals.
245 
247 {
249  while (pshp)
250  {
251  pshp->UpdateBoundingBox();
252  pshp = pshp->fNextPhysical;
253  }
254 }
255 
256 
257 /**************************************************************************/
258 // Display-list cache
259 /**************************************************************************/
260 
261 ////////////////////////////////////////////////////////////////////////////////
262 /// Modify capture of draws into display list cache kTRUE - capture,
263 /// kFALSE direct draw. Return kTRUE is state changed, kFALSE if not.
264 
266 {
267  if (cache == fDLCache)
268  return kFALSE;
269 
270  if (fDLCache)
271  DLCachePurge();
272  fDLCache = cache;
273  return kTRUE;
274 }
275 
276 ////////////////////////////////////////////////////////////////////////////////
277 /// Returns kTRUE if draws should be display list cached
278 /// kFALSE otherwise.
279 ///
280 /// Here we check that:
281 /// a) fScene is set (Scene manages link to GL-context);
282 /// b) secondary selection is not in progress as different
283 /// render-path is usually taken in this case.
284 ///
285 /// Otherwise we return internal bool.
286 ///
287 /// Override this in sub-class if different behaviour is required.
288 
290 {
291  if (!fDLCache || !fScene ||
292  (rnrCtx.SecSelection() && SupportsSecondarySelect()))
293  {
294  return kFALSE;
295  }
296  return kTRUE;
297 }
298 
299 ////////////////////////////////////////////////////////////////////////////////
300 /// Clear all entries for all LODs for this drawable from the
301 /// display list cache but keeping the reserved ids from GL context.
302 
304 {
305  fDLValid = 0;
306 }
307 
308 ////////////////////////////////////////////////////////////////////////////////
309 /// Drop all entries for all LODs for this drawable from the display
310 /// list cache, WITHOUT returning the reserved ids to GL context.
311 ///
312 /// This is called by scene if it realized that the GL context was
313 /// destroyed.
314 
316 {
317  fDLBase = 0;
318  fDLValid = 0;
319 }
320 
321 ////////////////////////////////////////////////////////////////////////////////
322 /// Purge all entries for all LODs for this drawable from the
323 /// display list cache, returning the reserved ids to GL context.
324 ///
325 /// If you override this function:
326 /// 1. call the base-class version from it;
327 /// 2. call it from the destructor of the derived class!
328 
330 {
331  if (fDLBase != 0)
332  {
334  fDLBase = 0;
335  fDLValid = 0;
336  }
337 }
338 
339 ////////////////////////////////////////////////////////////////////////////////
340 /// Purge given display-list range.
341 /// Utility function.
342 
344 {
345  if (fScene)
346  {
348  }
349  else
350  {
351  Warning("TGLLogicalShape::PurgeDLRange", "Scene unknown, attempting direct deletion.");
352  glDeleteLists(base, size);
353  }
354 }
355 
356 ////////////////////////////////////////////////////////////////////////////////
357 /// Logical shapes usually support only discreet LOD values,
358 /// especially in view of display-list caching.
359 /// This function should be overriden to perform the desired quantization.
360 /// See TGLSphere.
361 
363  Short_t /*combiLOD*/) const
364 {
365  return shapeLOD;
366 }
367 
368 ////////////////////////////////////////////////////////////////////////////////
369 /// Draw the GL drawable, using draw flags. If DL caching is enabled
370 /// (see SetDLCache) then attempt to draw from the cache, if not found
371 /// attempt to capture the draw - done by DirectDraw() - into a new cache entry.
372 /// If not cached just call DirectDraw() for normal non DL cached drawing.
373 
374 void TGLLogicalShape::Draw(TGLRnrCtx& rnrCtx) const
375 {
376  // Debug tracing
377  if (gDebug > 4) {
378  Info("TGLLogicalShape::Draw", "this %ld (class %s) LOD %d", (Long_t)this, IsA()->GetName(), rnrCtx.ShapeLOD());
379  }
380 
381 entry_point:
382  // If shape is not cached, or a capture to cache is already in
383  // progress perform a direct draw DL can be nested, but not created
384  // in nested fashion. As we only build DL on draw demands have to
385  // protected against this here.
386  // MT: I can't see how this could happen right now ... with
387  // rendering from a flat drawable-list.
388 
389  if (!fgUseDLs || !ShouldDLCache(rnrCtx) || rnrCtx.IsDLCaptureOpen())
390  {
391  DirectDraw(rnrCtx);
392  return;
393  }
394 
395  if (fDLBase == 0)
396  {
397  fDLBase = glGenLists(fDLSize);
398  if (fDLBase == 0)
399  {
400  Warning("TGLLogicalShape::Draw", "display-list registration failed.");
401  fDLCache = kFALSE;
402  goto entry_point;
403  }
404  }
405 
406  Short_t lod = rnrCtx.ShapeLOD();
407  UInt_t off = DLOffset(lod);
408  if ((1<<off) & fDLValid)
409  {
410  glCallList(fDLBase + off);
411  }
412  else
413  {
414  rnrCtx.OpenDLCapture();
415  glNewList(fDLBase + off, GL_COMPILE_AND_EXECUTE);
416  DirectDraw(rnrCtx);
417  glEndList();
418  rnrCtx.CloseDLCapture();
419  fDLValid |= (1<<off);
420  }
421 }
422 
423 ////////////////////////////////////////////////////////////////////////////////
424 /// Draw the logical shape in highlight mode.
425 /// If lvl argument is less than 0 (-1 by default), the index into color-set
426 /// is taken from the physical shape itself.
427 
428 void TGLLogicalShape::DrawHighlight(TGLRnrCtx& rnrCtx, const TGLPhysicalShape* pshp, Int_t lvl) const
429 {
430  if (lvl < 0) lvl = pshp->GetSelected();
431 
432  glColor4ubv(rnrCtx.ColorSet().Selection(lvl).CArr());
434  Draw(rnrCtx);
436 }
437 
438 ////////////////////////////////////////////////////////////////////////////////
439 /// Virtual method called-back after a secondary selection hit
440 /// is recorded (see TGLViewer::HandleButton(), Ctrl-Button1).
441 /// The ptr argument holds the GL pick-record of the closest hit.
442 ///
443 /// This base-class implementation simply prints out the result.
444 
446 {
447  printf("TGLLogicalShape::ProcessSelection %d names on the stack (z1=%g, z2=%g).\n",
448  rec.GetN(), rec.GetMinZ(), rec.GetMaxZ());
449  printf(" Names: ");
450  for (Int_t j=0; j<rec.GetN(); ++j) printf ("%u ", rec.GetItem(j));
451  printf("\n");
452 }
453 
454 ////////////////////////////////////////////////////////////////////////////////
455 /// Invoke popup menu or our bound external TObject (if any), using passed
456 /// 'menu' object, at location 'x' 'y'
457 
459 {
460  if (fExternalObj) {
461  menu.Popup(x, y, fExternalObj);
462  }
463 }
464 
465 ////////////////////////////////////////////////////////////////////////////////
466 /// Return true if size of this shape should be ignored when determining if
467 /// the object should be drawn. In this base-class we simply return state of
468 /// static flag fgIgnoreSizeForCameraInterest.
469 ///
470 /// Several sub-classes override this virtual function.
471 
473 {
475 }
476 
477 ////////////////////////////////////////////////////////////////////////////////
478 /// Get state of static fgIgnoreSizeForCameraInterest flag.
479 /// When this is true all objects, also very small, will be drawn by GL.
480 
482 {
484 }
485 
486 ////////////////////////////////////////////////////////////////////////////////
487 /// Set state of static fgIgnoreSizeForCameraInterest flag.
488 
490 {
492 }
493 
494 ////////////////////////////////////////////////////////////////////////////////
495 // Load GL shape settings from ROOT's TEnv into static data members.
496 
498 {
499  fgUseDLs = gEnv->GetValue("OpenGL.UseDisplayLists", 1);
500  fgUseDLsForVertArrs = gEnv->GetValue("OpenGL.UseDisplayListsForVertexArrays", 1);
501 
502  if (!fgUseDLs || !fgUseDLsForVertArrs)
503  {
504  printf("TGLLogicalShape::SetEnvDefaults() fgUseDLs=%d, fgUseDLsForVertArrs=%d\n",
506  }
507 }
TGLRnrCtx::OpenDLCapture
void OpenDLCapture()
Start display-list capture.
Definition: TGLRnrCtx.cxx:336
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:100
TGLCamera.h
TBuffer3D::SectionsValid
Bool_t SectionsValid(UInt_t mask) const
Definition: TBuffer3D.h:67
TGLLogicalShape::fRef
UInt_t fRef
Definition: TGLLogicalShape.h:46
Warning
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
Definition: TError.cxx:231
TGLSelectRecordBase::GetMaxZ
Float_t GetMaxZ() const
Definition: TGLSelectRecord.h:58
TGLPhysicalShape::fNextPhysical
TGLPhysicalShape * fNextPhysical
the associated logical shape
Definition: TGLPhysicalShape.h:58
TGLPhysicalShape.h
gEnv
R__EXTERN TEnv * gEnv
Definition: TEnv.h:171
TGLPhysicalShape::fLogicalShape
const TGLLogicalShape * fLogicalShape
Definition: TGLPhysicalShape.h:57
ClassImp
#define ClassImp(name)
Definition: Rtypes.h:364
TGLRnrCtx::CloseDLCapture
void CloseDLCapture()
End display list capture.
Definition: TGLRnrCtx.cxx:345
TGLLogicalShape::~TGLLogicalShape
virtual ~TGLLogicalShape()
Destroy logical shape.
Definition: TGLLogicalShape.cxx:140
TGLSelectRecordBase::GetMinZ
Float_t GetMinZ() const
Definition: TGLSelectRecord.h:57
TGLLogicalShape::fOwnExtObj
Bool_t fOwnExtObj
Strong ref (delete on 0 ref); not in scene.
Definition: TGLLogicalShape.h:57
TContextMenu::Popup
virtual void Popup(Int_t x, Int_t y, TObject *obj, TVirtualPad *c=nullptr, TVirtualPad *p=nullptr)
Popup context menu at given location in canvas c and pad p for selected object.
Definition: TContextMenu.cxx:411
TGLLogicalShape::IgnoreSizeForOfInterest
virtual Bool_t IgnoreSizeForOfInterest() const
Return true if size of this shape should be ignored when determining if the object should be drawn.
Definition: TGLLogicalShape.cxx:472
TGLLogicalShape::fExternalObj
TObject * fExternalObj
first replica
Definition: TGLLogicalShape.h:49
TGLLogicalShape::UpdateBoundingBoxesOfPhysicals
void UpdateBoundingBoxesOfPhysicals()
Update bounding-boxed of all dependent physicals.
Definition: TGLLogicalShape.cxx:246
TGLLogicalShape::DrawHighlight
virtual void DrawHighlight(TGLRnrCtx &rnrCtx, const TGLPhysicalShape *pshp, Int_t lvl=-1) const
Draw the logical shape in highlight mode.
Definition: TGLLogicalShape.cxx:428
TGLLogicalShape::fFirstPhysical
TGLPhysicalShape * fFirstPhysical
physical instance ref counting
Definition: TGLLogicalShape.h:47
TGLLogicalShape::fScene
TGLScene * fScene
Shape's bounding box.
Definition: TGLLogicalShape.h:51
x
Double_t x[n]
Definition: legend1.C:17
TBuffer3D::NbPnts
UInt_t NbPnts() const
Definition: TBuffer3D.h:80
TClass.h
TEnv::GetValue
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
Definition: TEnv.cxx:491
TGLLogicalShape::DLCacheClear
virtual void DLCacheClear()
Clear all entries for all LODs for this drawable from the display list cache but keeping the reserved...
Definition: TGLLogicalShape.cxx:303
TEnv.h
TGLLogicalShape::UnrefFirstPhysical
UInt_t UnrefFirstPhysical()
Unreferenced first physical in the list, returning its id and making it fit for destruction somewhere...
Definition: TGLLogicalShape.cxx:226
Bool_t
bool Bool_t
Definition: RtypesCore.h:63
TGLLogicalShape::SupportsSecondarySelect
virtual Bool_t SupportsSecondarySelect() const
Definition: TGLLogicalShape.h:110
bool
TGLLogicalShape::PurgeDLRange
void PurgeDLRange(UInt_t base, Int_t size) const
External object is a fake.
Definition: TGLLogicalShape.cxx:343
TBuffer3D::kBoundingBox
@ kBoundingBox
Definition: TBuffer3D.h:51
TGLSelectRecordBase::GetItem
UInt_t GetItem(Int_t i) const
Definition: TGLSelectRecord.h:56
TGLRnrCtx::ColorSet
TGLColorSet & ColorSet()
Return reference to current color-set (top of the stack).
Definition: TGLRnrCtx.cxx:276
TGLLogicalShape::SubRef
void SubRef(TGLPhysicalShape *phys) const
Remove reference to given physical shape, potentially deleting this object when hitting zero ref-coun...
Definition: TGLLogicalShape.cxx:175
TContextMenu
This class provides an interface to context sensitive popup menus.
Definition: TContextMenu.h:44
TGLRnrCtx.h
TGLPhysicalShape::ID
UInt_t ID() const
Definition: TGLPhysicalShape.h:87
TGLLogicalShape::fgUseDLsForVertArrs
static Bool_t fgUseDLsForVertArrs
global flag for usage of display-lists
Definition: TGLLogicalShape.h:64
TContextMenu.h
TBuffer3D
Generic 3D primitive description class.
Definition: TBuffer3D.h:18
TGLPhysicalShape::UpdateBoundingBox
void UpdateBoundingBox()
cache
Definition: TGLPhysicalShape.cxx:193
TGLLogicalShape::Draw
virtual void Draw(TGLRnrCtx &rnrCtx) const
Draw the GL drawable, using draw flags.
Definition: TGLLogicalShape.cxx:374
TGLLogicalShape::SetEnvDefaults
static void SetEnvDefaults()
Definition: TGLLogicalShape.cxx:497
size
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
TGLLogicalShape::DestroyPhysicals
void DestroyPhysicals()
Destroy all physicals attached to this logical.
Definition: TGLLogicalShape.cxx:206
TGLSelectRecord
Standard selection record including information about containing scene and details ob out selected ob...
Definition: TGLSelectRecord.h:75
TGLSelectRecordBase::GetN
Int_t GetN() const
Definition: TGLSelectRecord.h:54
TGLLogicalShape::AddRef
void AddRef(TGLPhysicalShape *phys) const
Add reference to given physical shape.
Definition: TGLLogicalShape.cxx:163
TNamed
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
TBuffer3D.h
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:101
TGLLogicalShape::ProcessSelection
virtual void ProcessSelection(TGLRnrCtx &rnrCtx, TGLSelectRecord &rec)
Virtual method called-back after a secondary selection hit is recorded (see TGLViewer::HandleButton()...
Definition: TGLLogicalShape.cxx:445
Long_t
long Long_t
Definition: RtypesCore.h:54
TGLLogicalShape::QuantizeShapeLOD
virtual Short_t QuantizeShapeLOD(Short_t shapeLOD, Short_t combiLOD) const
Logical shapes usually support only discreet LOD values, especially in view of display-list caching.
Definition: TGLLogicalShape.cxx:362
TGLLogicalShape::fBoundingBox
TGLBoundingBox fBoundingBox
Also plays the role of ID.
Definition: TGLLogicalShape.h:50
gDebug
Int_t gDebug
Definition: TROOT.cxx:590
TBuffer3D::kRaw
@ kRaw
Definition: TBuffer3D.h:54
TGLLogicalShape::ShouldDLCache
virtual Bool_t ShouldDLCache(const TGLRnrCtx &rnrCtx) const
Returns kTRUE if draws should be display list cached kFALSE otherwise.
Definition: TGLLogicalShape.cxx:289
TGLLogicalShape::fDLBase
UInt_t fDLBase
scene where object is stored (can be zero!)
Definition: TGLLogicalShape.h:52
y
Double_t y[n]
Definition: legend1.C:17
TGLLogicalShape::fgUseDLs
static Bool_t fgUseDLs
Definition: TGLLogicalShape.h:63
Short_t
short Short_t
Definition: RtypesCore.h:39
TGLColor::CArr
const UChar_t * CArr() const
Definition: TGLUtil.h:800
TGLLogicalShape::fDLCache
Bool_t fDLCache
display-list validity bit-field
Definition: TGLLogicalShape.h:55
TGLLogicalShape::DLOffset
virtual UInt_t DLOffset(Short_t) const
Definition: TGLLogicalShape.h:93
TGLLogicalShape::fRefStrong
Bool_t fRefStrong
use display list caching
Definition: TGLLogicalShape.h:56
TGLLogicalShape::fDLSize
Int_t fDLSize
display-list id base
Definition: TGLLogicalShape.h:53
unsigned int
TGLLogicalShape::SetDLCache
Bool_t SetDLCache(Bool_t cached)
Modify capture of draws into display list cache kTRUE - capture, kFALSE direct draw.
Definition: TGLLogicalShape.cxx:265
TGLLogicalShape::TGLLogicalShape
TGLLogicalShape()
global flag for usage of display-lists in shapes that use vertex arrays
Definition: TGLLogicalShape.cxx:74
TGLLogicalShape::fgIgnoreSizeForCameraInterest
static Bool_t fgIgnoreSizeForCameraInterest
Definition: TGLLogicalShape.h:61
TGLLogicalShape::InvokeContextMenu
void InvokeContextMenu(TContextMenu &menu, UInt_t x, UInt_t y) const
Invoke popup menu or our bound external TObject (if any), using passed 'menu' object,...
Definition: TGLLogicalShape.cxx:458
TGLLogicalShape::GetIgnoreSizeForCameraInterest
static Bool_t GetIgnoreSizeForCameraInterest()
Get state of static fgIgnoreSizeForCameraInterest flag.
Definition: TGLLogicalShape.cxx:481
TGLRnrCtx::SecSelection
Bool_t SecSelection() const
Definition: TGLRnrCtx.h:224
TBuffer3D::fBBVertex
Double_t fBBVertex[8][3]
Definition: TBuffer3D.h:107
TGLUtil::LockColor
static UInt_t LockColor()
Prevent further color changes.
Definition: TGLUtil.cxx:1663
Info
void Info(const char *location, const char *msgfmt,...)
Use this function for informational messages.
Definition: TError.cxx:220
TGLScene::GetGLCtxIdentity
TGLContextIdentity * GetGLCtxIdentity() const
Definition: TGLScene.h:230
TGLLogicalShape.h
TObject
Mother of all ROOT objects.
Definition: TObject.h:37
TGLSelectRecord.h
TGLContext.h
TGLLogicalShape
Abstract logical shape - a GL 'drawable' - base for all shapes - faceset sphere etc.
Definition: TGLLogicalShape.h:30
TGLScene.h
TGLPhysicalShape
Concrete physical shape - a GL drawable.
Definition: TGLPhysicalShape.h:32
TGLRnrCtx::IsDLCaptureOpen
Bool_t IsDLCaptureOpen() const
Definition: TGLRnrCtx.h:250
TBuffer3D::fPnts
Double_t * fPnts
Definition: TBuffer3D.h:112
TGLLogicalShape::fDLValid
UShort_t fDLValid
display-list size for different LODs
Definition: TGLLogicalShape.h:54
TGLBoundingBox::Set
void Set(const TGLVertex3 vertex[8])
Set a bounding box from provided 8 vertices.
Definition: TGLBoundingBox.cxx:134
TGLLogicalShape::SetIgnoreSizeForCameraInterest
static void SetIgnoreSizeForCameraInterest(Bool_t isfci)
Set state of static fgIgnoreSizeForCameraInterest flag.
Definition: TGLLogicalShape.cxx:489
TGLBoundingBox::SetAligned
void SetAligned(const TGLVertex3 &lowVertex, const TGLVertex3 &highVertex)
Set ALIGNED box from two low/high vertices.
Definition: TGLBoundingBox.cxx:185
TGLRnrCtx::ShapeLOD
Short_t ShapeLOD() const
Definition: TGLRnrCtx.h:177
TGLLogicalShape::DirectDraw
virtual void DirectDraw(TGLRnrCtx &rnrCtx) const =0
TGLLogicalShape::DLCacheDrop
virtual void DLCacheDrop()
Drop all entries for all LODs for this drawable from the display list cache, WITHOUT returning the re...
Definition: TGLLogicalShape.cxx:315
TGLPhysicalShape::GetSelected
UChar_t GetSelected() const
Definition: TGLPhysicalShape.h:109
TGLContextIdentity::RegisterDLNameRangeToWipe
void RegisterDLNameRangeToWipe(UInt_t base, Int_t size)
Remember dl range for deletion in next MakeCurrent or dtor execution.
Definition: TGLContext.cxx:514
TGLColorSet::Selection
TGLColor & Selection(Int_t i)
Definition: TGLUtil.h:855
TGLLogicalShape::DLCachePurge
virtual void DLCachePurge()
Purge all entries for all LODs for this drawable from the display list cache, returning the reserved ...
Definition: TGLLogicalShape.cxx:329
TGLRnrCtx
The TGLRnrCtx class aggregates data for a given redering context as needed by various parts of the RO...
Definition: TGLRnrCtx.h:41
TGLUtil::UnlockColor
static UInt_t UnlockColor()
Allow color changes.
Definition: TGLUtil.cxx:1671
int
Error
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
Definition: TError.cxx:187