ROOT 6.18/05 Reference Guide |
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) |
virtual void | Draw (const TGLCamera &camera) const =0 |
Bool_t | GetActive () const |
TGLPhysicalShape * | GetAttached () 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 | HandleMotion (const Event_t &event, const TGLCamera &camera) |
Handle a mouse button event - return kTRUE if widget selection change 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 () |
virtual Bool_t | Select (const TGLCamera &camera, const TGLRect &rect, const TGLBoundingBox &sceneBox)=0 |
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_t * | ColorFor (UInt_t widget) const |
Returns color to be used for given widget. More... | |
TGLManip & | operator= (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... | |
TGLPhysicalShape * | fShape |
#include <TGLTransManip.h>
TGLTransManip::TGLTransManip | ( | ) |
Construct translation manipulator not bound to any physical shape.
Definition at line 30 of file TGLTransManip.cxx.
TGLTransManip::TGLTransManip | ( | TGLPhysicalShape * | shape | ) |
Construct translation manipulator, attached to supplied TGLViewer 'viewer', bound to TGLPhysicalShape 'shape'.
Definition at line 38 of file TGLTransManip.cxx.
|
virtual |
Destroy the translation manipulator.
Definition at line 46 of file TGLTransManip.cxx.
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.
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.