library: libRGL
#include "TGLPhysicalShape.h"

TGLPhysicalShape


class description - header file - source file
viewCVS header - viewCVS source

class TGLPhysicalShape: public TGLDrawable

Inheritance Inherited Members Includes Libraries
Class Charts

Function Members (Methods)

Display options:
Show inherited
Show non-public
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
TGLDrawFlagsCalcDrawFlags(const TGLCamera& camera, const TGLDrawFlags& sceneFlags) const
static TClass*Class()
const Float_t*Color() const
virtual voidDraw(const TGLDrawFlags& flags) const
const TGLLogicalShape&GetLogical() const
TGLPhysicalShape::EManipGetManip() const
TGLVector3GetScale() const
TGLVertex3GetTranslation() const
ULong_tTGLDrawable::ID() const
voidInvokeContextMenu(TContextMenu& menu, UInt_t x, UInt_t y) const
virtual TClass*IsA() const
Bool_tIsInvisible() const
Bool_tIsModified() const
Bool_tIsSelected() const
Bool_tIsTransparent() const
virtual voidTGLDrawable::Purge()
voidRotate(const TGLVertex3& pivot, const TGLVector3& axis, Double_t angle)
voidScale(const TGLVector3& scale)
voidSelect(Bool_t select)
Bool_tTGLDrawable::SetCached(Bool_t cached)
voidSetColor(const Float_t* rgba)
voidSetManip(TGLPhysicalShape::EManip manip)
voidSetTransform(const TGLMatrix& transform)
voidSetTranslation(const TGLVertex3& translation)
virtual Bool_tTGLDrawable::ShouldCache(const TGLDrawFlags& flags) const
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
virtual TGLDrawable::ELODAxesSupportedLODAxes() const
voidTranslate(const TGLVector3& vect)
protected:
virtual voidDirectDraw(const TGLDrawFlags& flags) const
const TGLDrawable&TGLDrawable::operator=(const TGLDrawable&)
private:
voidInitColor(const Float_t* rgba)
voidUpdateBoundingBox()

Data Members

public:
enum EManip { kTranslateX
kTranslateY
kTranslateZ
kTranslateAll
kScaleX
kScaleY
kScaleZ
kScaleAll
kRotateX
kRotateY
kRotateZ
kRotateAll
kManipAll
};
enum TGLDrawable::ELODAxes { kLODAxesNone
kLODAxesX
kLODAxesY
kLODAxesZ
kLODAxesAll
};
protected:
ULong_tTGLDrawable::fID! unique drawable ID
Bool_tTGLDrawable::fCached! use display list cached
TGLBoundingBoxTGLDrawable::fBoundingBox! the drawables bounding box
static TGLQuadricTGLDrawable::fgQuad! Single common quadric drawing object
private:
const TGLLogicalShape&fLogicalShape! the associated logical shape
TGLMatrixfTransform! transform (placement) of physical instance
Float_tfColor[17]! GL color array
Bool_tfSelected! selected state
Bool_tfInvertedWind! face winding TODO: can get directly from fTransform?
Bool_tfModified! has been modified - retain across scene rebuilds
TGLPhysicalShape::EManipfManip! permitted manipulation bitflags - see EManip

Class Description

                                                                      
 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
~TGLPhysicalShape()
 Destroy the physical shape
void UpdateBoundingBox()
 Update our internal bounding box (in global frame)
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
void InvokeContextMenu(TContextMenu & menu, UInt_t x, UInt_t y)
 Request creation of context menu on shape, attached to 'menu' at screen position
 'x' 'y'
TGLVector3 GetScale()
______________________________________________________________________________
TGLVertex3 GetTranslation()
______________________________________________________________________________
void SetTransform(const TGLMatrix & transform)
______________________________________________________________________________
void SetTranslation(const TGLVertex3 & translation)
______________________________________________________________________________
void Translate(const TGLVector3 & vect)
______________________________________________________________________________
void Scale(const TGLVector3 & scale)
______________________________________________________________________________
void Rotate(const TGLVertex3 & pivot, const TGLVector3 & axis, Double_t angle)
______________________________________________________________________________
TGLPhysicalShape(ULong_t ID, const TGLLogicalShape & logicalShape, const TGLMatrix & transform, Bool_t invertedWind, const Float_t rgba[4])
ELODAxes SupportedLODAxes()
 TGLDrawable overloads
const TGLLogicalShape & GetLogical()
{ return fLogicalShape; }
EManip GetManip()
 Modification and manipulation
{ return fManip; }
void SetManip(EManip manip)
 Selected treated as temporary modification
{ fManip = manip; }
Bool_t IsModified()
{ return fModified || IsSelected(); }
Bool_t IsSelected()
 Selection
{ return fSelected; }
void Select(Bool_t select)
{ fSelected = select; }
const Float_t * Color()
 Color
{ return fColor; }
Bool_t IsTransparent()
{ return fColor[3] < 1.f; }
Bool_t IsInvisible()
{ return fColor[3] == 0.f; }

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.