TGLRotateManip Class Reference

#include <TGLRotateManip.h>

Inheritance diagram for TGLRotateManip:

TGLManip TGLManip TVirtualGLManip TVirtualGLManip TVirtualGLManip TVirtualGLManip List of all members.

Public Member Functions

 TGLRotateManip ()
 TGLRotateManip (TGLPhysicalShape *shape)
virtual ~TGLRotateManip ()
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)
 ClassDef (TGLRotateManip, 0)
 TGLRotateManip ()
 TGLRotateManip (TGLPhysicalShape *shape)
virtual ~TGLRotateManip ()
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)
 ClassDef (TGLRotateManip, 0)

Static Protected Member Functions

static Double_t Angle (const TGLVector3 &v1, const TGLVector3 &v2)
static Double_t Angle (const TGLVector3 &v1, const TGLVector3 &v2, const TGLVector3 &ref)
static Double_t Angle (const TGLVector3 &v1, const TGLVector3 &v2)
static Double_t Angle (const TGLVector3 &v1, const TGLVector3 &v2, const TGLVector3 &ref)

Private Member Functions

void DrawAxisRing (const TGLVertex3 &origin, const TGLVector3 &axis, Double_t radius, Float_t rgba[4]) const
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[4]) const
Double_t CalculateAngleDelta (const TPoint &mouse, const TGLCamera &camera)
TGLLine3 CalculateRingLine (const TPoint &mouse, const TGLCamera &camera) const

Private Attributes

Bool_t fShallowRing
Bool_t fShallowFront
 does active ring form shallow angle to eye?
TGLPlane fActiveRingPlane
 front or back of the active shallow ring?
TGLVertex3 fActiveRingCenter
 plane of the active ring (widget)
TGLLine3 fRingLine
 center of active ring
TGLLine3 fRingLineOld

Detailed Description

Definition at line 20 of file TGLRotateManip.h.


Constructor & Destructor Documentation

TGLRotateManip::TGLRotateManip (  ) 

Definition at line 52 of file TGLRotateManip.cxx.

TGLRotateManip::TGLRotateManip ( TGLPhysicalShape shape  ) 

Definition at line 63 of file TGLRotateManip.cxx.

TGLRotateManip::~TGLRotateManip (  )  [virtual]

Definition at line 75 of file TGLRotateManip.cxx.

TGLRotateManip::TGLRotateManip (  ) 

TGLRotateManip::TGLRotateManip ( TGLPhysicalShape shape  ) 

virtual TGLRotateManip::~TGLRotateManip (  )  [virtual]


Member Function Documentation

void TGLRotateManip::DrawAxisRing ( const TGLVertex3 origin,
const TGLVector3 axis,
Double_t  radius,
Float_t  rgba[4] 
) const [private]

Double_t TGLRotateManip::CalculateAngleDelta ( const TPoint mouse,
const TGLCamera camera 
) [private]

Definition at line 230 of file TGLRotateManip.cxx.

References Angle(), CalculateRingLine(), camera, Dot(), Error, fActiveRingPlane, TGLManip::fLastMouse, fRingLine, fRingLineOld, fShallowFront, fShallowRing, TPoint::GetX(), TPoint::GetY(), Intersection(), TGLCamera::kNear, TGLPlane::Norm(), TGLVector3::Normalise(), TGLLine3::Start(), and TGLLine3::Vector().

Referenced by HandleMotion().

TGLLine3 TGLRotateManip::CalculateRingLine ( const TPoint mouse,
const TGLCamera camera 
) const [private]

Definition at line 262 of file TGLRotateManip.cxx.

References camera, fActiveRingCenter, fActiveRingPlane, Intersection(), and kTRUE.

Referenced by CalculateAngleDelta(), and HandleButton().

Double_t TGLRotateManip::Angle ( const TGLVector3 v1,
const TGLVector3 v2 
) [static, protected]

Definition at line 30 of file TGLRotateManip.cxx.

References TMath::ACos(), Dot(), and v1.

Referenced by Angle(), CalculateAngleDelta(), and HandleButton().

Double_t TGLRotateManip::Angle ( const TGLVector3 v1,
const TGLVector3 v2,
const TGLVector3 ref 
) [static, protected]

Definition at line 37 of file TGLRotateManip.cxx.

References Angle(), Cross(), RootCsg::cross(), Dot(), and v1.

void TGLRotateManip::Draw ( const TGLCamera camera  )  const [virtual]

Implements TGLManip.

Definition at line 81 of file TGLRotateManip.cxx.

References TGLPhysicalShape::BoundingBox(), box(), TGLManip::CalcDrawScale(), camera, TGLManip::ColorFor(), Cross(), TGLUtil::DrawLine(), TGLUtil::DrawRing(), TGLUtil::DrawSphere(), TGLManip::fActive, fActiveRingCenter, fActiveRingPlane, TGLUtil::fgGrey, TGLUtil::fgWhite, TGLUtil::fgYellow, fRingLine, fShallowFront, fShallowRing, TGLManip::fShape, TGLPhysicalShape::GetManip(), GL_BLEND, GL_CULL_FACE, GL_ONE_MINUS_SRC_ALPHA, GL_SRC_ALPHA, glBlendFunc(), glDisable(), glEnable(), glPopName(), glPushName(), TGLUtil::kLineHeadArrow, TGLUtil::kLineHeadNone, TGLPhysicalShape::kRotateX, TGLPhysicalShape::kRotateY, TGLPhysicalShape::kRotateZ, kTRUE, TGLPlane::NearestOn(), TGLPlane::Norm(), TGLVector3::Normalise(), TGLLine3::Start(), and TGLLine3::Vector().

Bool_t TGLRotateManip::HandleButton ( const Event_t event,
const TGLCamera camera 
) [virtual]

Reimplemented from TGLManip.

Definition at line 165 of file TGLRotateManip.cxx.

References Angle(), TMath::ASin(), TGLBoundingBox::Axis(), TGLPhysicalShape::BoundingBox(), CalculateRingLine(), camera, TGLBoundingBox::Center(), fActiveRingCenter, fActiveRingPlane, TGLManip::fLastMouse, fRingLine, fRingLineOld, TGLManip::fSelectedWidget, fShallowFront, fShallowRing, TGLManip::fShape, TGLManip::HandleButton(), kFALSE, kTRUE, TGLPlane::Norm(), TGLPlane::Set(), and TGLVertex3::Set().

Bool_t TGLRotateManip::HandleMotion ( const Event_t event,
const TGLCamera camera 
) [virtual]

Reimplemented from TGLManip.

Definition at line 211 of file TGLRotateManip.cxx.

References CalculateAngleDelta(), camera, TGLManip::fActive, fActiveRingCenter, fActiveRingPlane, TGLManip::fLastMouse, TGLManip::fShape, Event_t::fX, Event_t::fY, kFALSE, kTRUE, TGLPlane::Norm(), and TGLPhysicalShape::Rotate().

TGLRotateManip::ClassDef ( TGLRotateManip  ,
 
)

void TGLRotateManip::DrawAxisRing ( const TGLVertex3 origin,
const TGLVector3 axis,
Double_t  radius,
Float_t  rgba[4] 
) const [private]

Double_t TGLRotateManip::CalculateAngleDelta ( const TPoint mouse,
const TGLCamera camera 
) [private]

TGLLine3 TGLRotateManip::CalculateRingLine ( const TPoint mouse,
const TGLCamera camera 
) const [private]

static Double_t TGLRotateManip::Angle ( const TGLVector3 v1,
const TGLVector3 v2 
) [static, protected]

static Double_t TGLRotateManip::Angle ( const TGLVector3 v1,
const TGLVector3 v2,
const TGLVector3 ref 
) [static, protected]

virtual void TGLRotateManip::Draw ( const TGLCamera camera  )  const [virtual]

Implements TGLManip.

virtual Bool_t TGLRotateManip::HandleButton ( const Event_t event,
const TGLCamera camera 
) [virtual]

Reimplemented from TGLManip.

virtual Bool_t TGLRotateManip::HandleMotion ( const Event_t event,
const TGLCamera camera 
) [virtual]

Reimplemented from TGLManip.

TGLRotateManip::ClassDef ( TGLRotateManip  ,
 
)


Member Data Documentation

Bool_t TGLRotateManip::fShallowRing [private]

Definition at line 27 of file TGLRotateManip.h.

Referenced by CalculateAngleDelta(), Draw(), and HandleButton().

Bool_t TGLRotateManip::fShallowFront [private]

does active ring form shallow angle to eye?

Definition at line 28 of file TGLRotateManip.h.

Referenced by CalculateAngleDelta(), Draw(), and HandleButton().

TGLPlane TGLRotateManip::fActiveRingPlane [private]

front or back of the active shallow ring?

Definition at line 29 of file TGLRotateManip.h.

Referenced by CalculateAngleDelta(), CalculateRingLine(), Draw(), HandleButton(), and HandleMotion().

TGLVertex3 TGLRotateManip::fActiveRingCenter [private]

plane of the active ring (widget)

Definition at line 30 of file TGLRotateManip.h.

Referenced by CalculateRingLine(), Draw(), HandleButton(), and HandleMotion().

TGLLine3 TGLRotateManip::fRingLine [private]

center of active ring

Definition at line 34 of file TGLRotateManip.h.

Referenced by CalculateAngleDelta(), Draw(), and HandleButton().

TGLLine3 TGLRotateManip::fRingLineOld [private]

Definition at line 35 of file TGLRotateManip.h.

Referenced by CalculateAngleDelta(), and HandleButton().


The documentation for this class was generated from the following files:
Generated on Tue Jul 5 16:40:13 2011 for ROOT_528-00b_version by  doxygen 1.5.1