class TGLRotateManip: public TGLManip


 Rotate manipulator - attaches to physical shape and draws local axes
 widgets - rings drawn from attached physical center, in plane defined
 by axis. User can mouse over (turns yellow) and L click/drag to
 rotate attached physical round the ring center.
 Widgets use standard 3D package axes colours: X red, Y green, Z blue.

Function Members (Methods)

public:
TGLRotateManip()
TGLRotateManip(TGLPhysicalShape* shape)
TGLRotateManip(const TGLRotateManip&)
virtual~TGLRotateManip()
voidTGLManip::Attach(TGLPhysicalShape* shape)
static TClass*Class()
virtual voidDraw(const TGLCamera& camera) const
Bool_tTGLManip::GetActive() const
TGLPhysicalShape*TGLManip::GetAttached() const
UInt_tTGLManip::GetSelectedWidget() 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_tTGLManip::Select(const TGLCamera&, const TGLRect&, const TGLBoundingBox&)
voidTGLManip::SetActive(Bool_t a)
voidTGLManip::SetSelectedWidget(UInt_t s)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
protected:
static Double_tAngle(const TGLVector3& v1, const TGLVector3& v2)
static Double_tAngle(const TGLVector3& v1, const TGLVector3& v2, const TGLVector3& ref)
voidTGLManip::CalcDrawScale(const TGLBoundingBox& box, const TGLCamera& camera, Double_t& base, TGLVector3* axis) const
TGLManip&TGLManip::operator=(const TGLManip&)
private:
Double_tCalculateAngleDelta(const TPoint& mouse, const TGLCamera& camera)
TGLLine3CalculateRingLine(const TPoint& mouse, const TGLCamera& camera) const
voidDrawAxisRing(const TGLVertex3& origin, const TGLVector3& axis, Double_t radius, Float_t* rgba) const

Data Members

protected:
Bool_tTGLManip::fActive! manipulator is active?
TPointTGLManip::fFirstMouse! first (start) mouse position (in WINDOW coords)
TPointTGLManip::fLastMouse! last (latest) mouse position (in WINDOW coords)
UInt_tTGLManip::fSelectedWidget! active width (axis) component
TGLPhysicalShape*TGLManip::fShape! manipulated shape
static Float_tTGLManip::fgBlue[4]
static Float_tTGLManip::fgGreen[4]
static Float_tTGLManip::fgGrey[4]
static Float_tTGLManip::fgRed[4]
static Float_tTGLManip::fgWhite[4]
static Float_tTGLManip::fgYellow[4]
private:
TGLVertex3fActiveRingCenter! center of active ring
TGLPlanefActiveRingPlane! plane of the active ring (widget)
TGLLine3fRingLine
TGLLine3fRingLineOld
Bool_tfShallowFront! front or back of the active shallow ring?
Bool_tfShallowRing! does active ring form shallow angle to eye?

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

Double_t Angle(const TGLVector3& v1, const TGLVector3& v2)
 Calculate unsigned angle between vectors v1 and v2
Double_t Angle(const TGLVector3& v1, const TGLVector3& v2, const TGLVector3& ref)
 Calculate signed angle between vectors v1 and v2, using ref to define right handed coord system
 If v1.v2 parallel to ref vector: +ive for clockwise, -ive for anticlockwise
 If v1.v2 antiparallel to ref vector: -ive for clockwise, +ive for anticlockwise
TGLRotateManip()
 Construct rotation manipulator not bound to any physical shape.
TGLRotateManip(TGLPhysicalShape* shape)
 Construct rotation manipulator bound to TGLPhysicalShape 'shape'.
~TGLRotateManip()
 Destory the rotation manipulator
void Draw(const TGLCamera& camera) const
 Draw rotate manipulator - axis rings drawn from attached
 physical center, in plane defined by axis as normal, in red(X),
 green(Y) and blue(Z), with white center sphere. If selected
 widget (mouse over) this is drawn in active colour (yellow).
Bool_t HandleButton(const Event_t& event, const TGLCamera& camera)
 Handle mouse button event over manipulator - returns kTRUE if
 redraw required kFALSE otherwise.
Bool_t HandleMotion(const Event_t& event, const TGLCamera& camera)
 Handle mouse motion over manipulator - if active (selected
 widget) rotate physical around selected ring widget plane
 normal. Returns kTRUE if redraw required kFALSE otherwise.
Double_t CalculateAngleDelta(const TPoint& mouse, const TGLCamera& camera)
 Calculate angle delta for rotation based on new mouse position.
TGLLine3 CalculateRingLine(const TPoint& mouse, const TGLCamera& camera) const
 Calculated interaction line between 'mouse' viewport point, and
 current selected widget (ring), under supplied 'camera'
 projection.
void DrawAxisRing(const TGLVertex3& origin, const TGLVector3& axis, Double_t radius, Float_t* rgba) const
TGLRotateManip()

Author: Richard Maunder 04/10/2005
Last change: root/gl:$Id: TGLRotateManip.h 26394 2008-11-23 14:35:25Z matevz $
Last generated: 2008-11-24 08:19
Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. *

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.