Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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.
 
 TGLTransManip (TGLPhysicalShape *shape)
 Construct translation manipulator, attached to supplied TGLViewer 'viewer', bound to TGLPhysicalShape 'shape'.
 
virtual ~TGLTransManip ()
 Destroy the translation manipulator.
 
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.
 
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.
 
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.
 
 TGLManip (TGLPhysicalShape *shape)
 Construct a manipulator object, bound to supplied physical shape.
 
virtual ~TGLManip ()
 Destroy manipulator object.
 
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.
 
virtual Bool_t Select (const TGLCamera &, const TGLRect &, const TGLBoundingBox &)
 
void SetActive (Bool_t a)
 
void SetSelectedWidget (UInt_t s)
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
- Public Member Functions inherited from TVirtualGLManip
virtual ~TVirtualGLManip ()
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 

Static Public Member Functions

static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
- Static Public Member Functions inherited from TGLManip
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
- Static Public Member Functions inherited from TVirtualGLManip
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr 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)
 
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_tColorFor (UInt_t widget) const
 Returns color to be used for given widget.
 
TGLManipoperator= (const TGLManip &)
 Assignment operator.
 
- Protected Attributes inherited from TGLManip
Bool_t fActive
 active width (axis) component
 
TPoint fFirstMouse
 manipulator is active?
 
TPoint fLastMouse
 first (start) mouse position (in WINDOW coords)
 
UInt_t fSelectedWidget
 manipulated shape
 
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 constexpr Version_t TGLTransManip::Class_Version ( )
inlinestaticconstexpr
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:

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