library: libRGL #include "TGLRotateManip.h" |
TGLRotateManip
class description - source file - inheritance tree (.pdf)
private:
Double_t CalculateAngleDelta(const TPoint& mouse, const TGLCamera& camera)
TGLLine3 CalculateRingLine(const TPoint& mouse, const TGLCamera& camera) const
void DrawAxisRing(const TGLVertex3& origin, const TGLVector3& axis, Double_t radius, Float_t* rgba) const
public:
TGLRotateManip()
TGLRotateManip(TGLPhysicalShape* shape)
TGLRotateManip(const TGLRotateManip&)
virtual ~TGLRotateManip()
static TClass* Class()
virtual void Draw(const TGLCamera& camera) const
virtual Bool_t HandleButton(const Event_t& event, const TGLCamera& camera)
virtual Bool_t HandleMotion(const Event_t& event, const TGLCamera& camera, const TGLBoundingBox& sceneBox)
virtual TClass* IsA() const
TGLRotateManip& operator=(const TGLRotateManip&)
virtual void ShowMembers(TMemberInspector& insp, char* parent)
virtual void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
private:
Bool_t fShallowRing ! does active ring form shallow angle to eye?
Bool_t fShallowFront ! front or back of the active shallow ring?
TGLPlane fActiveRingPlane ! plane of the active ring (widget)
TGLVertex3 fActiveRingCenter ! center of active ring
TGLLine3 fRingLine
TGLLine3 fRingLineOld
TGLRotateManip
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.
TGLRotateManip() :
fShallowRing(kFALSE), fShallowFront(kTRUE),
fActiveRingPlane(TGLVector3(1.0, 0.0, 0.0), TGLVertex3(0.0, 0.0, 0.0)),
fActiveRingCenter(TGLVertex3(0.0, 0.0, 0.0)),
fRingLine(TGLVertex3(0.0, 0.0, 0.0), TGLVertex3(0.0, 0.0, 0.0)),
fRingLineOld(TGLVertex3(0.0, 0.0, 0.0), TGLVertex3(0.0, 0.0, 0.0))
Construct rotation manipulator not bound to any physical shape.
TGLRotateManip(TGLPhysicalShape * shape) :
TGLManip(shape),
fShallowRing(kFALSE), fShallowFront(kTRUE),
fActiveRingPlane(TGLVector3(1.0, 0.0, 0.0), TGLVertex3(0.0, 0.0, 0.0)),
fActiveRingCenter(TGLVertex3(0.0, 0.0, 0.0)),
fRingLine(TGLVertex3(0.0, 0.0, 0.0), TGLVertex3(0.0, 0.0, 0.0)),
fRingLineOld(TGLVertex3(0.0, 0.0, 0.0), TGLVertex3(0.0, 0.0, 0.0))
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, const TGLBoundingBox & sceneBox)
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.
Find mouse position in viewport coords
Inline Functions
void DrawAxisRing(const TGLVertex3& origin, const TGLVector3& axis, Double_t radius, Float_t* rgba) const
TClass* Class()
TClass* IsA() const
void ShowMembers(TMemberInspector& insp, char* parent)
void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
TGLRotateManip TGLRotateManip(const TGLRotateManip&)
TGLRotateManip& operator=(const TGLRotateManip&)
Author: Richard Maunder 04/10/2005
Last update: root/gl:$Name: $:$Id: TGLRotateManip.cxx,v 1.7 2006/02/23 16:44:52 brun Exp $
Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. *
ROOT page - Class index - Class Hierarchy - Top of the page
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.