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. | |
TGLManip (TGLPhysicalShape *shape) | |
Construct a manipulator object, bound to supplied physical shape. | |
~TGLManip () override | |
Destroy manipulator object. | |
void | Attach (TGLPhysicalShape *shape) |
virtual void | Draw (const TGLCamera &camera) const =0 |
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. | |
virtual Bool_t | HandleMotion (const Event_t &event, const TGLCamera &camera) |
Handle a mouse button event - return kTRUE if widget selection change kFALSE otherwise. | |
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) |
Public Member Functions inherited from TVirtualGLManip | |
virtual | ~TVirtualGLManip () |
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 () |
Static Public Member Functions inherited from TVirtualGLManip | |
static TClass * | Class () |
static const char * | Class_Name () |
static constexpr Version_t | Class_Version () |
static const char * | DeclFileName () |
Protected Member Functions | |
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_t * | ColorFor (UInt_t widget) const |
Returns color to be used for given widget. | |
TGLManip & | operator= (const TGLManip &) |
Assignment operator. | |
Protected Attributes | |
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 | |
TGLPhysicalShape * | fShape |
#include <TGLManip.h>
|
protected |
last (latest) mouse position (in WINDOW coords)
Copy constructor.
Definition at line 58 of file TGLManip.cxx.
TGLManip::TGLManip | ( | ) |
Construct a manipulator object, bound to supplied viewer, and no physical shape.
Definition at line 36 of file TGLManip.cxx.
TGLManip::TGLManip | ( | TGLPhysicalShape * | shape | ) |
Construct a manipulator object, bound to supplied physical shape.
Definition at line 47 of file TGLManip.cxx.
|
override |
Destroy manipulator object.
Definition at line 87 of file TGLManip.cxx.
|
inline |
Definition at line 58 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 153 of file TGLManip.cxx.
|
static |
|
inlinestaticconstexpr |
Definition at line 68 of file TGLManip.h.
Returns color to be used for given widget.
Definition at line 94 of file TGLManip.cxx.
|
inlinestatic |
Definition at line 68 of file TGLManip.h.
|
pure virtual |
Implemented in TGLRotateManip, TGLScaleManip, and TGLTransManip.
|
inline |
Definition at line 55 of file TGLManip.h.
|
inline |
Definition at line 59 of file TGLManip.h.
|
inline |
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 115 of file TGLManip.cxx.
Handle a mouse button event - return kTRUE if widget selection change kFALSE otherwise.
Reimplemented in TGLRotateManip, TGLScaleManip, and TGLTransManip.
Definition at line 142 of file TGLManip.cxx.
|
inlineoverridevirtual |
Reimplemented from TVirtualGLManip.
Reimplemented in TGLRotateManip, TGLScaleManip, and TGLTransManip.
Definition at line 68 of file TGLManip.h.
Assignment operator.
Definition at line 71 of file TGLManip.cxx.
|
inlineoverridevirtual |
Implements TVirtualGLManip.
Definition at line 63 of file TGLManip.h.
|
inline |
Definition at line 56 of file TGLManip.h.
|
inline |
Definition at line 53 of file TGLManip.h.
|
overridevirtual |
Reimplemented from TVirtualGLManip.
Reimplemented in TGLRotateManip, TGLScaleManip, and TGLTransManip.
|
inline |
Definition at line 68 of file TGLManip.h.
|
protected |
active width (axis) component
Definition at line 33 of file TGLManip.h.
|
protected |
manipulator is active?
Definition at line 36 of file TGLManip.h.
|
protected |
first (start) mouse position (in WINDOW coords)
Definition at line 37 of file TGLManip.h.
|
protected |
manipulated shape
Definition at line 32 of file TGLManip.h.
|
protected |
Definition at line 31 of file TGLManip.h.