library: libRGL #include "TGLPhysicalShape.h" |
TGLPhysicalShape
class description - header file - source file - inheritance tree (.pdf)
private:
void InitColor(const Float_t* rgba)
void UpdateBoundingBox()
protected:
virtual void DirectDraw(const TGLDrawFlags& flags) const
public:
TGLPhysicalShape(ULong_t ID, const TGLLogicalShape& logicalShape, const TGLMatrix& transform, Bool_t invertedWind, const Float_t* rgba)
TGLPhysicalShape(ULong_t ID, const TGLLogicalShape& logicalShape, const double* transform, Bool_t invertedWind, const Float_t* rgba)
TGLPhysicalShape(const TGLPhysicalShape&)
virtual ~TGLPhysicalShape()
TGLDrawFlags CalcDrawFlags(const TGLCamera& camera, const TGLDrawFlags& sceneFlags) const
static TClass* Class()
const Float_t* Color() const
virtual void Draw(const TGLDrawFlags& flags) const
const TGLLogicalShape& GetLogical() const
TGLPhysicalShape::EManip GetManip() const
TGLVector3 GetScale() const
TGLVertex3 GetTranslation() const
void InvokeContextMenu(TContextMenu& menu, UInt_t x, UInt_t y) const
virtual TClass* IsA() const
Bool_t IsInvisible() const
Bool_t IsModified() const
Bool_t IsSelected() const
Bool_t IsTransparent() const
void Rotate(const TGLVertex3& pivot, const TGLVector3& axis, Double_t angle)
void Scale(const TGLVector3& scale)
void Select(Bool_t select)
void SetColor(const Float_t* rgba)
void SetManip(TGLPhysicalShape::EManip manip)
void SetTransform(const TGLMatrix& transform)
void SetTranslation(const TGLVertex3& translation)
virtual void ShowMembers(TMemberInspector& insp, char* parent)
virtual void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
virtual TGLDrawable::ELODAxes SupportedLODAxes() const
void Translate(const TGLVector3& vect)
private:
const TGLLogicalShape& fLogicalShape ! the associated logical shape
TGLMatrix fTransform ! transform (placement) of physical instance
Float_t fColor[17] ! GL color array
Bool_t fSelected ! selected state
Bool_t fInvertedWind ! face winding TODO: can get directly from fTransform?
Bool_t fModified ! has been modified - retain across scene rebuilds
TGLPhysicalShape::EManip fManip ! permitted manipulation bitflags - see EManip
public:
static const TGLPhysicalShape::EManip kTranslateX
static const TGLPhysicalShape::EManip kTranslateY
static const TGLPhysicalShape::EManip kTranslateZ
static const TGLPhysicalShape::EManip kTranslateAll
static const TGLPhysicalShape::EManip kScaleX
static const TGLPhysicalShape::EManip kScaleY
static const TGLPhysicalShape::EManip kScaleZ
static const TGLPhysicalShape::EManip kScaleAll
static const TGLPhysicalShape::EManip kRotateX
static const TGLPhysicalShape::EManip kRotateY
static const TGLPhysicalShape::EManip kRotateZ
static const TGLPhysicalShape::EManip kRotateAll
static const TGLPhysicalShape::EManip kManipAll
TGLPhysicalShape
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.
See base/src/TVirtualViewer3D for description of common external 3D
viewer architecture and how external viewer clients use it.
TGLPhysicalShape(ULong_t ID, const TGLLogicalShape & logicalShape, const TGLMatrix & transform, Bool_t invertedWind, const Float_t rgba[4])
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
TGLPhysicalShape(ULong_t ID, const TGLLogicalShape & logicalShape, const Double_t * transform, Bool_t invertedWind, const Float_t rgba[4])
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
void InitColor(const Float_t rgba[4])
Initialise the colors, using basic RGBA diffuse material color supplied
void SetColor(const Float_t color[17])
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
void Draw(const TGLDrawFlags & flags)
Draw physical shape, using LOD flags, potential from display list cache
void DirectDraw(const TGLDrawFlags & flags)
Draw physical shape, using LOD flags - can be captured into display list cache
Load gl name (for selection)
Load translation matrix - placement
Call associated fLogicalShape Draw() method
TGLDrawFlags CalcDrawFlags(const TGLCamera & camera, const TGLDrawFlags & sceneFlags)
Return draw flags for shape, suitible for use under projection defined by 'camera',
taking account of which local axes of the shape support LOD adjustment, and the
global 'sceneFlags' passed.
sceneFlags.Style() - copied to shape draw style
sceneFlags.LOD() - factored into projection LOD
Returned LOD() component is UInt 0 (kLODPixel - lowest quality) to
100 (kLODHigh - highest quality) or special case kLODUnsupported if shape
does not support LOD at all
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
EManip GetManip()
Modification and manipulation
Author: Richard Maunder 25/05/2005
Last update: root/gl:$Name: $:$Id: TGLPhysicalShape.cxx,v 1.23 2006/04/07 09:20:43 rdm Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
ROOT page - Class index - Class Hierarchy - Top of the page
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.