Logo ROOT  
Reference Guide
TGLManip Class Referenceabstract

Abstract base class for viewer manipulators, which allow direct in viewer manipulation of a (TGlPhysicalShape) object - currently translation, scaling and rotation along/round objects local axes.

See derived classes for these implementations.

This class provides binding to the zero or one manipulated physical, hit testing (selection) for manipulator sub component (widget), and some common mouse action handling/tracking.

Definition at line 28 of file TGLManip.h.

Public Member Functions

 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 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 ()
 

Protected Member Functions

 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

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 <TGLManip.h>

Inheritance diagram for TGLManip:
[legend]

Constructor & Destructor Documentation

◆ TGLManip() [1/3]

TGLManip::TGLManip ( const TGLManip gm)
protected

last (latest) mouse position (in WINDOW coords)

Copy constructor.

Definition at line 58 of file TGLManip.cxx.

◆ TGLManip() [2/3]

TGLManip::TGLManip ( )

Construct a manipulator object, bound to supplied viewer, and no physical shape.

Definition at line 36 of file TGLManip.cxx.

◆ TGLManip() [3/3]

TGLManip::TGLManip ( TGLPhysicalShape shape)

Construct a manipulator object, bound to supplied physical shape.

Definition at line 47 of file TGLManip.cxx.

◆ ~TGLManip()

TGLManip::~TGLManip ( )
virtual

Destroy manipulator object.

Definition at line 87 of file TGLManip.cxx.

Member Function Documentation

◆ Attach()

void TGLManip::Attach ( TGLPhysicalShape shape)
inline

Definition at line 58 of file TGLManip.h.

◆ CalcDrawScale()

void TGLManip::CalcDrawScale ( const TGLBoundingBox box,
const TGLCamera camera,
Double_t base,
TGLVector3  axis[3] 
) const
protected

Calculates base and axis scale factor (in world units) for drawing manipulators with reasonable size range in current camera.

Definition at line 153 of file TGLManip.cxx.

◆ ColorFor()

const UChar_t * TGLManip::ColorFor ( UInt_t  widget) const
protected

Returns color to be used for given widget.

Definition at line 94 of file TGLManip.cxx.

◆ Draw()

virtual void TGLManip::Draw ( const TGLCamera camera) const
pure virtual

◆ GetActive()

Bool_t TGLManip::GetActive ( ) const
inline

Definition at line 55 of file TGLManip.h.

◆ GetAttached()

TGLPhysicalShape* TGLManip::GetAttached ( ) const
inline

Definition at line 59 of file TGLManip.h.

◆ GetSelectedWidget()

UInt_t TGLManip::GetSelectedWidget ( ) const
inline

Definition at line 52 of file TGLManip.h.

◆ HandleButton()

Bool_t TGLManip::HandleButton ( const Event_t event,
const TGLCamera camera 
)
virtual

Handle a mouse button event - return kTRUE if processed, kFALSE otherwise.

Reimplemented in TGLScaleManip, and TGLRotateManip.

Definition at line 115 of file TGLManip.cxx.

◆ HandleMotion()

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

Handle a mouse button event - return kTRUE if widget selection change kFALSE otherwise.

Reimplemented in TGLTransManip, TGLScaleManip, and TGLRotateManip.

Definition at line 142 of file TGLManip.cxx.

◆ operator=()

TGLManip & TGLManip::operator= ( const TGLManip gm)
protected

Assignment operator.

Definition at line 71 of file TGLManip.cxx.

◆ Select()

virtual Bool_t TGLManip::Select ( const TGLCamera ,
const TGLRect ,
const TGLBoundingBox  
)
inlinevirtual

Implements TVirtualGLManip.

Definition at line 63 of file TGLManip.h.

◆ SetActive()

void TGLManip::SetActive ( Bool_t  a)
inline

Definition at line 56 of file TGLManip.h.

◆ SetSelectedWidget()

void TGLManip::SetSelectedWidget ( UInt_t  s)
inline

Definition at line 53 of file TGLManip.h.

Member Data Documentation

◆ fActive

Bool_t TGLManip::fActive
protected

active width (axis) component

Definition at line 33 of file TGLManip.h.

◆ fFirstMouse

TPoint TGLManip::fFirstMouse
protected

manipulator is active?

Definition at line 36 of file TGLManip.h.

◆ fLastMouse

TPoint TGLManip::fLastMouse
protected

first (start) mouse position (in WINDOW coords)

Definition at line 37 of file TGLManip.h.

◆ fSelectedWidget

UInt_t TGLManip::fSelectedWidget
protected

manipulated shape

Definition at line 32 of file TGLManip.h.

◆ fShape

TGLPhysicalShape* TGLManip::fShape
protected

Definition at line 31 of file TGLManip.h.

Libraries for TGLManip:
[legend]

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