ROOT
6.07/01
Reference Guide
|
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 36 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... | |
UInt_t | GetSelectedWidget () const |
void | SetSelectedWidget (UInt_t s) |
Bool_t | GetActive () const |
void | SetActive (Bool_t a) |
void | Attach (TGLPhysicalShape *shape) |
TGLPhysicalShape * | GetAttached () const |
virtual void | Draw (const TGLCamera &camera) const =0 |
virtual Bool_t | Select (const TGLCamera &, const TGLRect &, const TGLBoundingBox &) |
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... | |
ClassDef (TGLManip, 0) | |
Public Member Functions inherited from TVirtualGLManip | |
virtual | ~TVirtualGLManip () |
ClassDef (TVirtualGLManip, 0) | |
Protected Member Functions | |
TGLManip (const TGLManip &) | |
last (latest) mouse position (in WINDOW coords) More... | |
TGLManip & | operator= (const TGLManip &) |
Assignment operator. 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... | |
Protected Attributes | |
TGLPhysicalShape * | fShape |
UInt_t | fSelectedWidget |
manipulated shape More... | |
Bool_t | fActive |
active width (axis) component More... | |
TPoint | fFirstMouse |
manipulator is active? More... | |
TPoint | fLastMouse |
first (start) mouse position (in WINDOW coords) More... | |
#include <TGLManip.h>
|
protected |
last (latest) mouse position (in WINDOW coords)
Copy constructor.
Definition at line 61 of file TGLManip.cxx.
TGLManip::TGLManip | ( | ) |
Construct a manipulator object, bound to supplied viewer, and no physical shape.
Definition at line 39 of file TGLManip.cxx.
TGLManip::TGLManip | ( | TGLPhysicalShape * | shape | ) |
Construct a manipulator object, bound to supplied physical shape.
Definition at line 50 of file TGLManip.cxx.
|
virtual |
Destroy manipulator object.
Definition at line 90 of file TGLManip.cxx.
|
inline |
Definition at line 66 of file TGLManip.h.
|
protected |
Calculates base and axis scale factor (in world units) for drawing manipulators with reasonable size range in current camera.
Definition at line 156 of file TGLManip.cxx.
Referenced by TGLTransManip::Draw(), TGLScaleManip::Draw(), and TGLRotateManip::Draw().
TGLManip::ClassDef | ( | TGLManip | , |
0 | |||
) |
Returns color to be used for given widget.
Definition at line 97 of file TGLManip.cxx.
Referenced by TGLTransManip::Draw(), TGLScaleManip::Draw(), and TGLRotateManip::Draw().
Implemented in TGLRotateManip, TGLScaleManip, and TGLTransManip.
Referenced by TGLManipSet::Render().
|
inline |
Definition at line 63 of file TGLManip.h.
Referenced by TGLManipSet::Handle().
|
inline |
Definition at line 67 of file TGLManip.h.
|
inline |
Definition at line 60 of file TGLManip.h.
Referenced by TGLManipSet::Handle().
Handle a mouse button event - return kTRUE if processed, kFALSE otherwise.
Reimplemented in TGLRotateManip, and TGLScaleManip.
Definition at line 118 of file TGLManip.cxx.
Referenced by TGLManipSet::Handle(), TGLScaleManip::HandleButton(), and TGLRotateManip::HandleButton().
Handle a mouse button event - return kTRUE if widget selection change kFALSE otherwise.
Reimplemented in TGLRotateManip, TGLScaleManip, and TGLTransManip.
Definition at line 145 of file TGLManip.cxx.
Referenced by TGLManipSet::Handle().
Assignment operator.
Definition at line 74 of file TGLManip.cxx.
|
inlinevirtual |
Implements TVirtualGLManip.
Definition at line 71 of file TGLManip.h.
Definition at line 64 of file TGLManip.h.
Referenced by TGLManipSet::Handle(), TGLManipSet::MouseEnter(), and TGLManipSet::MouseLeave().
Definition at line 61 of file TGLManip.h.
Referenced by TGLManipSet::Handle(), TGLManipSet::MouseEnter(), and TGLManipSet::MouseLeave().
|
protected |
active width (axis) component
Definition at line 41 of file TGLManip.h.
Referenced by TGLRotateManip::Draw(), GetActive(), HandleButton(), TGLTransManip::HandleMotion(), TGLScaleManip::HandleMotion(), TGLRotateManip::HandleMotion(), operator=(), and SetActive().
|
protected |
manipulator is active?
Definition at line 44 of file TGLManip.h.
Referenced by HandleButton(), TGLScaleManip::HandleMotion(), and operator=().
|
protected |
first (start) mouse position (in WINDOW coords)
Definition at line 45 of file TGLManip.h.
Referenced by TGLRotateManip::CalculateAngleDelta(), TGLRotateManip::HandleButton(), HandleButton(), TGLTransManip::HandleMotion(), TGLScaleManip::HandleMotion(), TGLRotateManip::HandleMotion(), and operator=().
|
protected |
manipulated shape
Definition at line 40 of file TGLManip.h.
Referenced by ColorFor(), GetSelectedWidget(), TGLScaleManip::HandleButton(), TGLRotateManip::HandleButton(), HandleButton(), TGLTransManip::HandleMotion(), TGLScaleManip::HandleMotion(), operator=(), and SetSelectedWidget().
|
protected |
Definition at line 39 of file TGLManip.h.
Referenced by Attach(), TGLTransManip::Draw(), TGLScaleManip::Draw(), TGLRotateManip::Draw(), GetAttached(), TGLScaleManip::HandleButton(), TGLRotateManip::HandleButton(), TGLTransManip::HandleMotion(), TGLScaleManip::HandleMotion(), TGLRotateManip::HandleMotion(), and operator=().