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. | |
| TGLTransManip (TGLPhysicalShape *shape) | |
| Construct translation manipulator, attached to supplied TGLViewer 'viewer', bound to TGLPhysicalShape 'shape'. | |
| ~TGLTransManip () override | |
| Destroy the translation manipulator. | |
| void | Attach (TGLPhysicalShape *shape) |
| void | Draw (const TGLCamera &camera) const override |
| 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. | |
| 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. | |
| Bool_t | HandleMotion (const Event_t &event, const TGLCamera &camera) override |
| Handle mouse motion over manipulator - if active (selected widget) translate physical along selected widget (axis) of the manipulator, so it tracks mouse action. | |
| TClass * | IsA () const override |
| Bool_t | Select (const TGLCamera &, const TGLRect &, const TGLBoundingBox &) override |
| void | SetActive (Bool_t a) |
| void | SetSelectedWidget (UInt_t s) |
| void | Streamer (TBuffer &) override |
| void | StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b) |
Static Public Member Functions | |
| static TClass * | Class () |
| static const char * | Class_Name () |
| static constexpr Version_t | Class_Version () |
| static const char * | DeclFileName () |
Protected Member Functions | |
| 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. | |
| const UChar_t * | ColorFor (UInt_t widget) const |
| Returns color to be used for given widget. | |
Protected Attributes | |
| Bool_t | fActive |
| ! manipulator is active? | |
| TPoint | fFirstMouse |
| ! first (start) mouse position (in WINDOW coords) | |
| TPoint | fLastMouse |
| ! last (latest) mouse position (in WINDOW coords) | |
| UInt_t | fSelectedWidget |
| ! active width (axis) component | |
| TGLPhysicalShape * | fShape |
| ! manipulated shape | |
#include <TGLTransManip.h>
| TGLTransManip::TGLTransManip | ( | ) |
Construct translation manipulator not bound to any physical shape.
Definition at line 29 of file TGLTransManip.cxx.
| TGLTransManip::TGLTransManip | ( | TGLPhysicalShape * | shape | ) |
Construct translation manipulator, attached to supplied TGLViewer 'viewer', bound to TGLPhysicalShape 'shape'.
Definition at line 37 of file TGLTransManip.cxx.
|
override |
Destroy the translation manipulator.
Definition at line 45 of file TGLTransManip.cxx.
|
inlineinherited |
Definition at line 58 of file TGLManip.h.
|
protectedinherited |
Calculates base and axis scale factor (in world units) for drawing manipulators with reasonable size range in current camera.
Definition at line 152 of file TGLManip.cxx.
|
static |
|
static |
|
inlinestaticconstexpr |
Definition at line 39 of file TGLTransManip.h.
Returns color to be used for given widget.
Definition at line 93 of file TGLManip.cxx.
|
inlinestatic |
Definition at line 39 of file TGLTransManip.h.
|
overridevirtual |
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 54 of file TGLTransManip.cxx.
|
inlineinherited |
Definition at line 55 of file TGLManip.h.
|
inlineinherited |
Definition at line 59 of file TGLManip.h.
|
inlineinherited |
Definition at line 52 of file TGLManip.h.
Handle a mouse button event - return kTRUE if processed, kFALSE otherwise.
Reimplemented in TGLRotateManip, and TGLScaleManip.
Definition at line 114 of file TGLManip.cxx.
|
overridevirtual |
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 116 of file TGLTransManip.cxx.
|
inlineoverridevirtual |
Reimplemented from TGLManip.
Definition at line 39 of file TGLTransManip.h.
|
inlineoverridevirtualinherited |
Implements TVirtualGLManip.
Definition at line 63 of file TGLManip.h.
|
inlineinherited |
Definition at line 56 of file TGLManip.h.
|
inlineinherited |
Definition at line 53 of file TGLManip.h.
|
inline |
Definition at line 39 of file TGLTransManip.h.
|
protectedinherited |
! manipulator is active?
Definition at line 33 of file TGLManip.h.
|
protectedinherited |
! first (start) mouse position (in WINDOW coords)
Definition at line 36 of file TGLManip.h.
|
protectedinherited |
! last (latest) mouse position (in WINDOW coords)
Definition at line 37 of file TGLManip.h.
|
protectedinherited |
! active width (axis) component
Definition at line 32 of file TGLManip.h.
|
protectedinherited |
! manipulated shape
Definition at line 31 of file TGLManip.h.