Abstract logical shape - a GL 'drawable' - base for all shapes - faceset sphere etc.
Logical shapes are a unique piece of geometry, described in it's local frame - e.g if we have three spheres in :
- Sphere A - Radius r1, center v1
- Sphere B - Radius r2, center v2
- Sphere C - Radius r1, center v3
Spheres A and C can share a common logical sphere of radius r1 - and place them with two physicals with translations of v1 & v2. Sphere B requires a different logical (radius r2), placed with physical with translation v2.
Physical shapes know about and can share logicals. Logicals do not about (aside from reference counting) physicals or share them.
This sharing of logical shapes greatly reduces memory consumption and scene (re)build times in typical detector geometries which have many repeated objects placements.
TGLLogicalShapes have reference counting, performed by the client physical shapes which are using it.
Display list information is also stored here, possibly per LOD level. Most classes do not support LOD (only sphere and tube) and therefore reasonable defaults are encoded in the following virtual functions:
Int_t DLCacheSize() {
return 1; }
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.
virtual ELODAxes SupportedLODAxes() const
virtual UInt_t DLOffset(Short_t) const
Classes that have per-LOD display-lists than override these functions. 'UShort_t fDLValid' is used as a bit-field determining validity of each quantized LOD-level; hopefully one will not have more than 16 LOD levels per class. See also: TGLPhysicalShape::CalculateShapeLOD() where LOD is calculated.
See base/src/TVirtualViewer3D for description of common external 3D viewer architecture and how external viewer clients use it.
Definition at line 29 of file TGLLogicalShape.h.
Returns kTRUE if draws should be display list cached kFALSE otherwise.
Here we check that: a) fScene is set (Scene manages link to GL-context); b) secondary selection is not in progress as different render-path is usually taken in this case.
Otherwise we return internal bool.
Override this in sub-class if different behaviour is required.
Reimplemented in TEveBoxSetGL, TEveCalo3DGL, TEveStraightLineSetGL, TGLObject, and TPointSet3DGL.
Definition at line 289 of file TGLLogicalShape.cxx.