Logo ROOT  
Reference Guide
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...
 
virtual TClassIsA () const
 
virtual void Streamer (TBuffer &)
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
- 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
 
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 HandleMotion (const Event_t &event, const TGLCamera &camera)
 Handle a mouse button event - return kTRUE if widget selection change kFALSE otherwise. More...
 
virtual TClassIsA () const
 
virtual Bool_t Select (const TGLCamera &, const TGLRect &, const TGLBoundingBox &)
 
void SetActive (Bool_t a)
 
void SetSelectedWidget (UInt_t s)
 
virtual void Streamer (TBuffer &)
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
- Public Member Functions inherited from TVirtualGLManip
virtual ~TVirtualGLManip ()
 
virtual TClassIsA () const
 
virtual Bool_t Select (const TGLCamera &camera, const TGLRect &rect, const TGLBoundingBox &sceneBox)=0
 
virtual void Streamer (TBuffer &)
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 

Static Public Member Functions

static TClassClass ()
 
static const char * Class_Name ()
 
static Version_t Class_Version ()
 
static const char * DeclFileName ()
 
- Static Public Member Functions inherited from TGLManip
static TClassClass ()
 
static const char * Class_Name ()
 
static Version_t Class_Version ()
 
static const char * DeclFileName ()
 
- Static Public Member Functions inherited from TVirtualGLManip
static TClassClass ()
 
static const char * Class_Name ()
 
static Version_t Class_Version ()
 
static const char * DeclFileName ()
 

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

◆ Class()

static TClass * TGLTransManip::Class ( )
static
Returns
TClass describing this class

◆ Class_Name()

static const char * TGLTransManip::Class_Name ( )
static
Returns
Name of this class

◆ Class_Version()

static Version_t TGLTransManip::Class_Version ( )
inlinestatic
Returns
Version of this class

Definition at line 39 of file TGLTransManip.h.

◆ DeclFileName()

static const char * TGLTransManip::DeclFileName ( )
inlinestatic
Returns
Name of the file containing the class declaration

Definition at line 39 of file TGLTransManip.h.

◆ 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.

◆ IsA()

virtual TClass * TGLTransManip::IsA ( ) const
inlinevirtual
Returns
TClass describing current object

Reimplemented from TGLManip.

Definition at line 39 of file TGLTransManip.h.

◆ Streamer()

virtual void TGLTransManip::Streamer ( TBuffer )
virtual

Reimplemented from TGLManip.

◆ StreamerNVirtual()

void TGLTransManip::StreamerNVirtual ( TBuffer ClassDef_StreamerNVirtual_b)
inline

Definition at line 39 of file TGLTransManip.h.

Libraries for TGLTransManip:
[legend]

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