library: libRGL #include "TGLPhysicalShape.h" |
TGLPhysicalShape
class description - header file - source file
viewCVS header - viewCVS source
class TGLPhysicalShape: public TGLDrawable
Function Members (Methods)
Display options:
public:
| TGLPhysicalShape(const TGLPhysicalShape&) |
| 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) |
virtual | ~TGLPhysicalShape() |
const TGLBoundingBox& | TGLDrawable::BoundingBox() const |
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 |
ULong_t | TGLDrawable::ID() 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 |
virtual void | TGLDrawable::Purge() |
void | Rotate(const TGLVertex3& pivot, const TGLVector3& axis, Double_t angle) |
void | Scale(const TGLVector3& scale) |
void | Select(Bool_t select) |
Bool_t | TGLDrawable::SetCached(Bool_t cached) |
void | SetColor(const Float_t* rgba) |
void | SetManip(TGLPhysicalShape::EManip manip) |
void | SetTransform(const TGLMatrix& transform) |
void | SetTranslation(const TGLVertex3& translation) |
virtual Bool_t | TGLDrawable::ShouldCache(const TGLDrawFlags& flags) const |
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) |
Data Members
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 |
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
TGLVector3 GetScale()
______________________________________________________________________________
void SetTransform(const TGLMatrix & transform)
______________________________________________________________________________
void SetTranslation(const TGLVertex3 & translation)
______________________________________________________________________________
void Translate(const TGLVector3 & vect)
______________________________________________________________________________
void Scale(const TGLVector3 & scale)
______________________________________________________________________________
EManip GetManip()
Modification and manipulation
void SetManip(EManip manip)
Selected treated as temporary modification
Author: Richard Maunder 25/05/2005
Last update: root/gl:$Name: $:$Id: TGLPhysicalShape.cxx,v 1.24 2006/08/23 14:39:40 brun 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.