Concrete physical shape - a GL drawable. Physical shapes are the objects the user can actually see, select, move in the viewer. It is a placement of the associated local frame TGLLogicaShape into the world frame. The draw process is: Load attributes - material colors etc Load translation matrix - placement Load gl name (for selection) Call our associated logical shape Draw() to draw placed shape The physical shape supports translation, scaling and rotation, selection, color changes, and permitted modification flags etc. A physical shape cannot modify or be bound to another (or no) logical shape - hence const & handle. It can perform mutable reference counting on the logical to enable purging. Physical shape also maintains a list of references to it and provides notifications of change and destruction. See class TGLPShapeRef which needs to be sub-classes for real use. See base/src/TVirtualViewer3D for description of common external 3D viewer architecture and how external viewer clients use it.
void | InitColor(const Float_t[4] rgba) |
TGLPhysicalShape& | operator=(const TGLPhysicalShape&) |
TGLPhysicalShape(const TGLPhysicalShape&) | |
void | UpdateBoundingBox() |
static TGLPhysicalShape::EManip | kManipAll | |
static TGLPhysicalShape::EManip | kRotateAll | |
static TGLPhysicalShape::EManip | kRotateX | |
static TGLPhysicalShape::EManip | kRotateY | |
static TGLPhysicalShape::EManip | kRotateZ | |
static TGLPhysicalShape::EManip | kScaleAll | |
static TGLPhysicalShape::EManip | kScaleX | |
static TGLPhysicalShape::EManip | kScaleY | |
static TGLPhysicalShape::EManip | kScaleZ | |
static TGLPhysicalShape::EManip | kTranslateAll | |
static TGLPhysicalShape::EManip | kTranslateX | |
static TGLPhysicalShape::EManip | kTranslateY | |
static TGLPhysicalShape::EManip | kTranslateZ |
TGLBoundingBox | fBoundingBox | ! bounding box of the physical (transformed) |
Float_t | fColor[17] | ! GL color array |
TGLPShapeRef* | fFirstPSRef | ! pointer to first reference |
UInt_t | fID | ! unique physical ID within containing scene |
Bool_t | fInvertedWind | ! face winding TODO: can get directly from fTransform? |
Bool_t | fIsScaleForRnr | ! cache |
const TGLLogicalShape* | fLogicalShape | ! the associated logical shape |
TGLPhysicalShape::EManip | fManip | ! permitted manipulation bitflags - see EManip |
Bool_t | fModified | ! has been modified - retain across scene rebuilds |
TGLPhysicalShape* | fNextPhysical | ! pointer to next replica |
UChar_t | fSelected | ! selected state |
TGLMatrix | fTransform | ! transform (placement) of physical instance |
Construct a physical shape using arguments: ID - unique drawable id. logicalShape - bound logical shape transform - transform for placement of logical drawing invertedWind - use inverted face polygon winding? rgba - basic four component (RGBA) diffuse color
Construct a physical shape using arguments: id - unique drawable id. logicalShape - bound logical shape transform - 16 Double_t component transform for placement of logical drawing invertedWind - use inverted face polygon winding? rgba - basic four component (RGBA) diffuse color
Call this after modifying the physical so that the information can be propagated to the object referencing it.
Initialise the colors, using basic RGBA diffuse material color supplied
Set full color attributes - see OpenGL material documentation for full description. 0->3 diffuse, 4->7 ambient, 8->11 specular, 12->15 emission, 16 shininess
Set full color attributes to all physicals sharing the same logical with this object.
Set color from ROOT color index and transparency [0,100].
Set color from standard ROOT representation, that is color index + transparency in range [0, 100].
Setup colors - avoid setting things not required for current draw flags.
Draw physical shape, using LOD flags, potential from display list cache
Calculate shape-lod, suitible for use under projection defined by 'rnrCtx', taking account of which local axes of the shape support LOD adjustment, and the global 'sceneFlags' passed. Returned shapeLOD component is from 0 (kLODPixel - lowest quality) to 100 (kLODHigh - highest quality). Scene flags are not used. LOD quantization is not done. RnrCtx is not modified as this is called via lodification stage of rendering.
Factor in scene/vierer LOD and Quantize ... forward to logical shape.
Request creation of context menu on shape, attached to 'menu' at screen position 'x' 'y'