ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
TGLManip Class Referenceabstract

Abstract base class for viewer manipulators, which allow direct in viewer manipulation of a (TGlPhysicalShape) object - currently translation, scaling and rotation along/round objects local axes.

See derived classes for these implementations.

This class provides binding to the zero or one manipulated physical, hit testing (selection) for manipulator sub component (widget), and some common mouse action handling/tracking.

Definition at line 36 of file TGLManip.h.

Public Member Functions

 TGLManip ()
 Construct a manipulator object, bound to supplied viewer, and no physical shape. More...
 
 TGLManip (TGLPhysicalShape *shape)
 Construct a manipulator object, bound to supplied physical shape. More...
 
virtual ~TGLManip ()
 Destroy manipulator object. More...
 
UInt_t GetSelectedWidget () const
 
void SetSelectedWidget (UInt_t s)
 
Bool_t GetActive () const
 
void SetActive (Bool_t a)
 
void Attach (TGLPhysicalShape *shape)
 
TGLPhysicalShapeGetAttached () const
 
virtual void Draw (const TGLCamera &camera) const =0
 
virtual Bool_t Select (const TGLCamera &, const TGLRect &, const TGLBoundingBox &)
 
virtual Bool_t HandleButton (const Event_t &event, const TGLCamera &camera)
 Handle a mouse button event - return kTRUE if processed, kFALSE otherwise. More...
 
virtual Bool_t HandleMotion (const Event_t &event, const TGLCamera &camera)
 Handle a mouse button event - return kTRUE if widget selection change kFALSE otherwise. More...
 
 ClassDef (TGLManip, 0)
 
- Public Member Functions inherited from TVirtualGLManip
virtual ~TVirtualGLManip ()
 
 ClassDef (TVirtualGLManip, 0)
 

Protected Member Functions

 TGLManip (const TGLManip &)
 last (latest) mouse position (in WINDOW coords) More...
 
TGLManipoperator= (const TGLManip &)
 Assignment operator. More...
 
void CalcDrawScale (const TGLBoundingBox &box, const TGLCamera &camera, Double_t &base, TGLVector3 axis[3]) const
 Calculates base and axis scale factor (in world units) for drawing manipulators with reasonable size range in current camera. More...
 
const UChar_tColorFor (UInt_t widget) const
 Returns color to be used for given widget. More...
 

Protected Attributes

TGLPhysicalShapefShape
 
UInt_t fSelectedWidget
 manipulated shape More...
 
Bool_t fActive
 active width (axis) component More...
 
TPoint fFirstMouse
 manipulator is active? More...
 
TPoint fLastMouse
 first (start) mouse position (in WINDOW coords) More...
 

#include <TGLManip.h>

Inheritance diagram for TGLManip:
[legend]

Constructor & Destructor Documentation

TGLManip::TGLManip ( const TGLManip gm)
protected

last (latest) mouse position (in WINDOW coords)

Copy constructor.

Definition at line 61 of file TGLManip.cxx.

TGLManip::TGLManip ( )

Construct a manipulator object, bound to supplied viewer, and no physical shape.

Definition at line 39 of file TGLManip.cxx.

TGLManip::TGLManip ( TGLPhysicalShape shape)

Construct a manipulator object, bound to supplied physical shape.

Definition at line 50 of file TGLManip.cxx.

TGLManip::~TGLManip ( )
virtual

Destroy manipulator object.

Definition at line 90 of file TGLManip.cxx.

Member Function Documentation

void TGLManip::Attach ( TGLPhysicalShape shape)
inline

Definition at line 66 of file TGLManip.h.

void TGLManip::CalcDrawScale ( const TGLBoundingBox box,
const TGLCamera camera,
Double_t base,
TGLVector3  axis[3] 
) const
protected

Calculates base and axis scale factor (in world units) for drawing manipulators with reasonable size range in current camera.

Definition at line 156 of file TGLManip.cxx.

Referenced by TGLTransManip::Draw(), TGLScaleManip::Draw(), and TGLRotateManip::Draw().

TGLManip::ClassDef ( TGLManip  ,
 
)
const UChar_t * TGLManip::ColorFor ( UInt_t  widget) const
protected

Returns color to be used for given widget.

Definition at line 97 of file TGLManip.cxx.

Referenced by TGLTransManip::Draw(), TGLScaleManip::Draw(), and TGLRotateManip::Draw().

virtual void TGLManip::Draw ( const TGLCamera camera) const
pure virtual

Implemented in TGLRotateManip, TGLScaleManip, and TGLTransManip.

Referenced by TGLManipSet::Render().

Bool_t TGLManip::GetActive ( ) const
inline

Definition at line 63 of file TGLManip.h.

Referenced by TGLManipSet::Handle().

TGLPhysicalShape* TGLManip::GetAttached ( ) const
inline

Definition at line 67 of file TGLManip.h.

UInt_t TGLManip::GetSelectedWidget ( ) const
inline

Definition at line 60 of file TGLManip.h.

Referenced by TGLManipSet::Handle().

Bool_t TGLManip::HandleButton ( const Event_t event,
const TGLCamera camera 
)
virtual

Handle a mouse button event - return kTRUE if processed, kFALSE otherwise.

Reimplemented in TGLRotateManip, and TGLScaleManip.

Definition at line 118 of file TGLManip.cxx.

Referenced by TGLManipSet::Handle(), TGLScaleManip::HandleButton(), and TGLRotateManip::HandleButton().

Bool_t TGLManip::HandleMotion ( const Event_t event,
const TGLCamera camera 
)
virtual

Handle a mouse button event - return kTRUE if widget selection change kFALSE otherwise.

Reimplemented in TGLRotateManip, TGLScaleManip, and TGLTransManip.

Definition at line 145 of file TGLManip.cxx.

Referenced by TGLManipSet::Handle().

TGLManip & TGLManip::operator= ( const TGLManip gm)
protected

Assignment operator.

Definition at line 74 of file TGLManip.cxx.

virtual Bool_t TGLManip::Select ( const TGLCamera ,
const TGLRect ,
const TGLBoundingBox  
)
inlinevirtual

Implements TVirtualGLManip.

Definition at line 71 of file TGLManip.h.

void TGLManip::SetActive ( Bool_t  a)
inline
void TGLManip::SetSelectedWidget ( UInt_t  s)
inline

Member Data Documentation

Bool_t TGLManip::fActive
protected
TPoint TGLManip::fFirstMouse
protected

manipulator is active?

Definition at line 44 of file TGLManip.h.

Referenced by HandleButton(), TGLScaleManip::HandleMotion(), and operator=().

TPoint TGLManip::fLastMouse
protected
UInt_t TGLManip::fSelectedWidget
protected
TGLPhysicalShape* TGLManip::fShape
protected
Collaboration diagram for TGLManip:
[legend]

The documentation for this class was generated from the following files: