13#ifndef ROOT_TGLPhysicalShape
14#define ROOT_TGLPhysicalShape
short Color_t
Color number (short)
unsigned char UChar_t
Unsigned Character 1 byte (unsigned char)
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int)
float Float_t
Float 4 bytes (float)
short Short_t
Signed Short integer 2 bytes (short)
double Double_t
Double 8 bytes.
#define ClassDef(name, id)
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint angle
Concrete class describing an orientated (free) or axis aligned box of 8 vertices.
TGLVertex3 Center() const
Abstract logical shape - a GL 'drawable' - base for all shapes - faceset sphere etc.
16 component (4x4) transform matrix - column MAJOR as per GL.
void Scale(const TGLVector3 &scale)
Set matrix axis scales to 'scale'.
void Rotate(const TGLVertex3 &pivot, const TGLVector3 &axis, Double_t angle)
Update matrix so resulting transform has been rotated about 'pivot' (in parent frame),...
TGLVector3 GetTranslation() const
Return the translation component of matrix.
TGLVector3 GetScale() const
Get local axis scaling factors.
void SetTranslation(Double_t x, Double_t y, Double_t z)
Set matrix translation components x,y,z.
void Set(const TGLVertex3 &origin, const TGLVector3 &zAxis, const TGLVector3 &xAxis=nullptr)
Set matrix which when applied puts local origin at 'origin' and the local Z axis in direction 'z'.
void Translate(const TGLVector3 &vect)
Shift matrix translation components by 'vect' in parent frame.
Base class for references to TGLPysicalShape that need to be notified when the shape is destroyed.
Concrete physical shape - a GL drawable.
void Modified()
Call this after modifying the physical so that the information can be propagated to the object refere...
void InvokeContextMenu(TContextMenu &menu, UInt_t x, UInt_t y) const
Request creation of context menu on shape, attached to 'menu' at screen position 'x' 'y'.
virtual ~TGLPhysicalShape()
Destroy the physical shape.
void SetupGLColors(TGLRnrCtx &rnrCtx, const Float_t *color=nullptr) const
Setup colors - avoid setting things not required for current draw flags.
TGLPhysicalShape * fNextPhysical
! pointer to next replica
TGLPhysicalShape & operator=(const TGLPhysicalShape &)=delete
const TGLLogicalShape * fLogicalShape
! the associated logical shape
void Scale(const TGLVector3 &scale)
const Float_t * Color() const
Bool_t fModified
! has been modified - retain across scene rebuilds
const TGLPhysicalShape * GetNextPhysical() const
void SetTransform(const TGLMatrix &transform)
const TGLBoundingBox & BoundingBox() const
Bool_t IsInvisible() const
UChar_t fSelected
! selected state
virtual void QuantizeShapeLOD(Short_t shapeLOD, Short_t combiLOD, Short_t &quantLOD) const
Factor in scene/vierer LOD and Quantize ... forward to logical shape.
void RemoveReference(TGLPShapeRef *ref)
Remove reference ref.
EManip fManip
! permitted manipulation bitflags - see EManip
void Rotate(const TGLVertex3 &pivot, const TGLVector3 &axis, Double_t angle)
void SetManip(EManip manip)
TGLVector3 GetScale() const
const TGLLogicalShape * GetLogical() const
void InitColor(const Float_t rgba[4])
Initialise the colors, using basic RGBA diffuse material color supplied.
void SetColor(const Float_t rgba[17])
Set full color attributes - see OpenGL material documentation for full description.
UInt_t fID
! unique physical ID within containing scene
Bool_t fIsScaleForRnr
! cache
TGLVertex3 GetTranslation() const
void SetColorOnFamily(const Float_t rgba[17])
Set full color attributes to all physicals sharing the same logical with this object.
virtual void CalculateShapeLOD(TGLRnrCtx &rnrCtx, Float_t &pixSize, Short_t &shapeLOD) const
Calculate shape-lod, suitable for use under projection defined by 'rnrCtx', taking account of which l...
Bool_t IsSelected() const
void AddReference(TGLPShapeRef *ref)
Add reference ref.
Bool_t fInvertedWind
! face winding TODO: can get directly from fTransform?
void SetTranslation(const TGLVertex3 &translation)
void SetDiffuseColor(const Float_t rgba[4])
Set color from ROOT color index and transparency [0,100].
TGLPhysicalShape(const TGLPhysicalShape &)=delete
Bool_t IsModified() const
TGLBoundingBox fBoundingBox
! bounding box of the physical (transformed)
TGLMatrix fTransform
! transform (placement) of physical instance
UChar_t GetSelected() const
TGLPShapeRef * fFirstPSRef
! pointer to first reference
void Select(UChar_t select)
Bool_t IsTransparent() const
Float_t fColor[17]
! GL color array
void UpdateBoundingBox()
Update our internal bounding box (in global frame).
void Translate(const TGLVector3 &vect)
The TGLRnrCtx class aggregates data for a given redering context as needed by various parts of the RO...
3 component (x/y/z) vector class.
3 component (x/y/z) vertex class.