arbeit
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

gutz::RotateManipEvent Class Reference

#include <ManipEvents.h>

Inheritance diagram for gutz::RotateManipEvent:

gutz::ManipEventBase< Manip > gutz::Counted List of all members.

Detailed Description

Rotate Manip Event.

Rotates a manipulator about its center of rotation.

Definition at line 34 of file ManipEvents.h.

Event Handlers

bool startEvent (Manip *m, const MouseEvent &me)
 should be called on a Mouse-down event, starts the event

bool handleEvent (Manip *m, const MouseMoveEvent &mme)
 should be called when the mouse moves

void endEvent (Manip *m, const MouseEvent &me)
 called when the event is over, may or may not be on a Mouse-up event

bool tumble (Manip *m)
 repeat last event


Public Types

typedef Manip ManipType
 either a Camera or a Manip (LIGHT??)


Public Member Functions

 RotateManipEvent (float speed=1.0f)
 RotateManipEvent (const RotateManipEvent &mre)
virtual ~RotateManipEvent ()
RotateManipEventoperator= (const RotateManipEvent &mre)
virtual ManipEventBase< Manip > * clone () const
virtual bool startEvent (ManipType *m, const MouseEvent &me)=0
 should be called on a Mouse-down event, starts the event

virtual bool handleEvent (ManipType *m, const MouseMoveEvent &mme)=0
 should be called when the mouse moves

virtual void endEvent (ManipType *m, const MouseEvent &me)=0
 called when the event is over, may or may not be on a Mouse-up event

virtual bool tumble (ManipType *m)
float getSpeed () const
void setSpeed (float speed)

Protected Member Functions

virtual void _incCount ()
 gutz::Counted interface, increment reference count by one.

virtual void _decCount ()
 gutz::Counted interface, decrement reference count by one.

virtual int _getCount () const
 gutz::Counted interface, get the current reference count.


Protected Attributes

float _rad
quatf _tumbquat
float _speed

Friends

class SmartPtr
class SmartPtrRef


Member Typedef Documentation

typedef Manip gutz::ManipEventBase< Manip >::ManipType [inherited]
 

either a Camera or a Manip (LIGHT??)

Definition at line 52 of file ManipEventBase.h.


Constructor & Destructor Documentation

gutz::RotateManipEvent::RotateManipEvent float  speed = 1.0f  )  [inline]
 

Definition at line 36 of file ManipEvents.h.

References _tumbquat, and gutz::quatf_id.

Referenced by clone().

gutz::RotateManipEvent::RotateManipEvent const RotateManipEvent mre  )  [inline]
 

Definition at line 38 of file ManipEvents.h.

References _tumbquat.

virtual gutz::RotateManipEvent::~RotateManipEvent  )  [inline, virtual]
 

Definition at line 41 of file ManipEvents.h.


Member Function Documentation

virtual void gutz::Counted::_decCount  )  [inline, protected, virtual, inherited]
 

gutz::Counted interface, decrement reference count by one.

Not generaly used by subclasses, mostly for collaboration with gutz::SmartPtr. Sometimes you need to call this though, see the documentation for gutz::SmartPtr

Definition at line 54 of file smartptr.h.

Referenced by TFImage::clear(), NrroImage::fBlendOverRGBA(), and Nrro::updateMinMax().

virtual int gutz::Counted::_getCount  )  const [inline, protected, virtual, inherited]
 

gutz::Counted interface, get the current reference count.

Not generaly used by subclasses, mostly for collaboration with gutz::SmartPtr.

Definition at line 58 of file smartptr.h.

virtual void gutz::Counted::_incCount  )  [inline, protected, virtual, inherited]
 

gutz::Counted interface, increment reference count by one.

Not generaly used by subclasses, mostly for collaboration with gutz::SmartPtr. Sometimes you need to call this though, see the documentation for gutz::SmartPtr

Definition at line 48 of file smartptr.h.

Referenced by TFImage::clear(), NrroImage::fBlendOverRGBA(), and Nrro::updateMinMax().

virtual ManipEventBase<Manip>* gutz::RotateManipEvent::clone void   )  const [inline, virtual]
 

Implements gutz::ManipEventBase< Manip >.

Definition at line 48 of file ManipEvents.h.

References RotateManipEvent().

virtual void gutz::ManipEventBase< Manip >::endEvent ManipType m,
const MouseEvent me
[pure virtual, inherited]
 

called when the event is over, may or may not be on a Mouse-up event

void RotateManipEvent::endEvent Manip m,
const MouseEvent me
 

called when the event is over, may or may not be on a Mouse-up event

Definition at line 72 of file ManipEvents.cpp.

References _tumbquat, and gutz::quatf_id.

float gutz::ManipEventBase< Manip >::getSpeed  )  const [inline, inherited]
 

Definition at line 81 of file ManipEventBase.h.

References gutz::ManipEventBase< MT >::_speed.

virtual bool gutz::ManipEventBase< Manip >::handleEvent ManipType m,
const MouseMoveEvent mme
[pure virtual, inherited]
 

should be called when the mouse moves

bool RotateManipEvent::handleEvent Manip m,
const MouseMoveEvent mme
 

should be called when the mouse moves

compute the projection of the center onto the screen

flip the y position of screen center

set the trackquat, for tumble

offset screen center to the objects center projected to the screen, and scale-bias so that we are in the [-1,1] range

Definition at line 45 of file ManipEvents.cpp.

References _rad, _tumbquat, gutz::Manip::getCamQuat(), gutz::Manip::getCenter(), gutz::Manip::getCenterQuat(), gutz::Manip::getInvCamQuat(), gutz::MouseMoveEvent::getLast(), gutz::MouseEvent::getPos(), gutz::Manip::getScreenPosLocal(), gutz::Manip::getScreenX(), gutz::Manip::getScreenY(), gutz::quatf, gutz::Manip::setCenterQuat(), gutz::trackball(), gutz::vec2f, and gutz::vec3f.

RotateManipEvent& gutz::RotateManipEvent::operator= const RotateManipEvent mre  )  [inline]
 

Definition at line 43 of file ManipEvents.h.

References _tumbquat.

void gutz::ManipEventBase< Manip >::setSpeed float  speed  )  [inline, inherited]
 

Definition at line 82 of file ManipEventBase.h.

References gutz::ManipEventBase< MT >::_speed.

virtual bool gutz::ManipEventBase< Manip >::startEvent ManipType m,
const MouseEvent me
[pure virtual, inherited]
 

should be called on a Mouse-down event, starts the event

bool RotateManipEvent::startEvent Manip m,
const MouseEvent me
 

should be called on a Mouse-down event, starts the event

Definition at line 35 of file ManipEvents.cpp.

References _rad, _tumbquat, gutz::Manip::getRad(), gutz::MouseEvent::isButtonDown(), and gutz::quatf_id.

virtual bool gutz::ManipEventBase< Manip >::tumble ManipType m  )  [inline, virtual, inherited]
 

Definition at line 76 of file ManipEventBase.h.

bool RotateManipEvent::tumble Manip m  ) 
 

repeat last event

Definition at line 78 of file ManipEvents.cpp.

References gutz::ManipEventBase< Manip >::_speed, _tumbquat, gutz::g_abs(), gutz::Manip::getCenterQuat(), gutz::quatf, gutz::Manip::setCenterQuat(), and gutz::vec3f.


Friends And Related Function Documentation

friend class SmartPtr [friend, inherited]
 

Definition at line 40 of file smartptr.h.

Referenced by Nrro::NrroIter< T >::NrroIter().

friend class SmartPtrRef [friend, inherited]
 

Definition at line 41 of file smartptr.h.


Member Data Documentation

float gutz::RotateManipEvent::_rad [protected]
 

Definition at line 64 of file ManipEvents.h.

Referenced by handleEvent(), and startEvent().

float gutz::ManipEventBase< Manip >::_speed [protected, inherited]
 

Definition at line 91 of file ManipEventBase.h.

Referenced by gutz::TransXYManipEvent::tumble(), and tumble().

quatf gutz::RotateManipEvent::_tumbquat [protected]
 

Definition at line 65 of file ManipEvents.h.

Referenced by endEvent(), handleEvent(), operator=(), RotateManipEvent(), startEvent(), and tumble().


The documentation for this class was generated from the following files:
Send questions, comments, and bug reports to:
jmk