Logo ROOT   6.12/07
Reference Guide
List of all members | Public Member Functions | List of all members
TGLTransManip Class Reference

Translation manipulator - attaches to physical shape and draws local axes widgets with arrow heads.

User can mouse over (turns yellow) and L click/drag to translate along this axis. Widgets use standard 3D package axes colours: X red, Y green, Z blue.

Definition at line 27 of file TGLTransManip.h.

Public Member Functions

 TGLTransManip ()
 Construct translation manipulator not bound to any physical shape. More...
 
 TGLTransManip (TGLPhysicalShape *shape)
 Construct translation manipulator, attached to supplied TGLViewer 'viewer', bound to TGLPhysicalShape 'shape'. More...
 
virtual ~TGLTransManip ()
 Destroy the translation manipulator. More...
 
virtual void Draw (const TGLCamera &camera) const
 Draw translation manipulator - tubes with arrow heads, in local axes of attached shape, in red(X), green(Y) and blue(Z), with white center sphere. More...
 
virtual Bool_t HandleMotion (const Event_t &event, const TGLCamera &camera)
 Handle mouse motion over manipulator - if active (selected widget) translate physical along selected widget (axis) of the manipulator, so it tracks mouse action. More...
 
- Public Member Functions inherited from TGLManip
 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...
 
void Attach (TGLPhysicalShape *shape)
 
Bool_t GetActive () const
 
TGLPhysicalShapeGetAttached () const
 
UInt_t GetSelectedWidget () const
 
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 Select (const TGLCamera &, const TGLRect &, const TGLBoundingBox &)
 
void SetActive (Bool_t a)
 
void SetSelectedWidget (UInt_t s)
 
- Public Member Functions inherited from TVirtualGLManip
virtual ~TVirtualGLManip ()
 

Additional Inherited Members

- Protected Member Functions inherited from TGLManip
 TGLManip (const TGLManip &)
 last (latest) mouse position (in WINDOW coords) 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...
 
TGLManipoperator= (const TGLManip &)
 Assignment operator. More...
 
- Protected Attributes inherited from TGLManip
Bool_t fActive
 active width (axis) component More...
 
TPoint fFirstMouse
 manipulator is active? More...
 
TPoint fLastMouse
 first (start) mouse position (in WINDOW coords) More...
 
UInt_t fSelectedWidget
 manipulated shape More...
 
TGLPhysicalShapefShape
 

#include <TGLTransManip.h>

Inheritance diagram for TGLTransManip:
[legend]

Constructor & Destructor Documentation

◆ TGLTransManip() [1/2]

TGLTransManip::TGLTransManip ( )

Construct translation manipulator not bound to any physical shape.

Definition at line 30 of file TGLTransManip.cxx.

◆ TGLTransManip() [2/2]

TGLTransManip::TGLTransManip ( TGLPhysicalShape shape)

Construct translation manipulator, attached to supplied TGLViewer 'viewer', bound to TGLPhysicalShape 'shape'.

Definition at line 38 of file TGLTransManip.cxx.

◆ ~TGLTransManip()

TGLTransManip::~TGLTransManip ( )
virtual

Destroy the translation manipulator.

Definition at line 46 of file TGLTransManip.cxx.

Member Function Documentation

◆ Draw()

void TGLTransManip::Draw ( const TGLCamera camera) const
virtual

Draw translation manipulator - tubes with arrow heads, in local axes of attached shape, in red(X), green(Y) and blue(Z), with white center sphere.

If selected widget (mouse over) this is drawn in active colour (yellow).

Implements TGLManip.

Definition at line 55 of file TGLTransManip.cxx.

◆ HandleMotion()

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

Handle mouse motion over manipulator - if active (selected widget) translate physical along selected widget (axis) of the manipulator, so it tracks mouse action.

Returns kTRUE if redraw required kFALSE otherwise.

Reimplemented from TGLManip.

Definition at line 117 of file TGLTransManip.cxx.

Libraries for TGLTransManip:
[legend]

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