library: libRGL
#include "TGLPhysicalShape.h"

TGLPhysicalShape


class description - source file - inheritance tree (.pdf)

class TGLPhysicalShape : public TGLDrawable

Inheritance Chart:
TGLDrawable
<-
TGLPhysicalShape
<-
TGLClip
<-
TGLClipBox
TGLClipPlane
    private:
void InitColor(const Float_t* rgba) void UpdateBoundingBox() protected:
virtual void DirectDraw(UInt_t LOD) 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) virtual ~TGLPhysicalShape() static TClass* Class() const Float_t* Color() const virtual void Draw(UInt_t LOD) const virtual void DrawOutline(UInt_t lod) const virtual void DrawWireFrame(UInt_t lod) 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 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) void Translate(const TGLVector3& vect)

Data Members

    private:
const TGLLogicalShape& fLogicalShape ! the associate 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

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]) : TGLDrawable(ID, kFALSE), // Physical shapes not DL cached by default fLogicalShape(logicalShape), fTransform(transform), fSelected(kFALSE), fInvertedWind(invertedWind), fModified(kFALSE), fManip(kManipAll)
 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]) : TGLDrawable(ID, kFALSE), // Physical shapes not DL cached by default fLogicalShape(logicalShape), fTransform(transform), fSelected(kFALSE), fInvertedWind(invertedWind), fModified(kFALSE), fManip(kManipAll)
 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 logical 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(UInt_t LOD) const
 Draw physical shape, using LOD flags, potential from display list cache

void DirectDraw(UInt_t LOD) const
 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

void DrawWireFrame(UInt_t lod) const
 Draw physical shape in wireframe style

void DrawOutline(UInt_t LOD) const
 Draw physical shape in outline style

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'



Inline Functions


          const TGLLogicalShape& GetLogical() const
        TGLPhysicalShape::EManip GetManip() const
                            void SetManip(TGLPhysicalShape::EManip manip)
                          Bool_t IsModified() const
                          Bool_t IsSelected() const
                            void Select(Bool_t select)
                  const Float_t* Color() const
                          Bool_t IsTransparent() const
                      TGLVector3 GetScale() const
                      TGLVertex3 GetTranslation() const
                            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)
                         TClass* Class()
                         TClass* IsA() const
                            void ShowMembers(TMemberInspector& insp, char* parent)
                            void Streamer(TBuffer& b)
                            void StreamerNVirtual(TBuffer& b)


Author: Richard Maunder 25/05/2005
Last update: root/gl:$Name: $:$Id: TGLPhysicalShape.cxx,v 1.15 2005/11/22 18:05:46 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.