ROOT logo
ROOT » GRAF3D » GL » TGLManip

class TGLManip: public TVirtualGLManip


 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.

Function Members (Methods)

 
    This is an abstract class, constructors will not be documented.
    Look at the header to check for available constructors.

public:
virtual~TGLManip()
voidAttach(TGLPhysicalShape* shape)
static TClass*Class()
virtual voidDraw(const TGLCamera& camera) const
Bool_tGetActive() const
TGLPhysicalShape*GetAttached() const
UInt_tGetSelectedWidget() const
virtual Bool_tHandleButton(const Event_t& event, const TGLCamera& camera)
virtual Bool_tHandleMotion(const Event_t& event, const TGLCamera& camera)
virtual TClass*IsA() const
virtual Bool_tSelect(const TGLCamera&, const TGLRect&, const TGLBoundingBox&)
voidSetActive(Bool_t a)
voidSetSelectedWidget(UInt_t s)
virtual voidShowMembers(TMemberInspector& insp)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
protected:
voidCalcDrawScale(const TGLBoundingBox& box, const TGLCamera& camera, Double_t& base, TGLVector3* axis) const
const UChar_t*ColorFor(UInt_t widget) const
TGLManip&operator=(const TGLManip&)

Data Members

protected:
Bool_tfActive! manipulator is active?
TPointfFirstMouse! first (start) mouse position (in WINDOW coords)
TPointfLastMouse! last (latest) mouse position (in WINDOW coords)
UInt_tfSelectedWidget! active width (axis) component
TGLPhysicalShape*fShape! manipulated shape

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TGLManip& operator=(const TGLManip& )
 Assignement operator.
~TGLManip()
 Destroy manipulator object.
const UChar_t* ColorFor(UInt_t widget) const
 Returns color to be used for given widget.
Bool_t HandleButton(const Event_t& event, const TGLCamera& camera)
 Handle a mouse button event - return kTRUE if processed, kFALSE otherwise
Bool_t HandleMotion(const Event_t& event, const TGLCamera& camera)
 Handle a mouse button event - return kTRUE if widget selection change
 kFALSE otherwise
void CalcDrawScale(const TGLBoundingBox& box, const TGLCamera& camera, Double_t& base, TGLVector3* axis) const
 Calculates base and axis scale factor (in world units) for
 drawing manipulators with reasonable size range in current
 camera.
UInt_t GetSelectedWidget() const
{ return fSelectedWidget; }
void SetSelectedWidget(UInt_t s)
Bool_t GetActive() const
{ return fActive; }
void SetActive(Bool_t a)
{ fActive = a; }
void Attach(TGLPhysicalShape* shape)
{ fShape = shape; }
TGLPhysicalShape * GetAttached() const
{ return fShape; }
void Draw(const TGLCamera& camera) const
 CRAPPY TVirtualGLManip TTTT, just override it here
Bool_t Select(const TGLCamera& , const TGLRect& , const TGLBoundingBox& )
{ return kFALSE; }