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

gutz::ManipEventBase< MT > Class Template Reference

#include <ManipEventBase.h>

Inheritance diagram for gutz::ManipEventBase< MT >:

gutz::Counted List of all members.

Detailed Description

template<class MT>
class gutz::ManipEventBase< MT >

Generic Manipulator Event Interface class.

Defines the functions that MUST be defined for a Manipulator Constraint/Event handler. All Events should sub-class from this guy.

Template parameter MT is the ManipType, right now this is either a gutz::Manip or a gutz::Camera. See gutz::EventMap for a containter class.

The role of this class is to provide a common interface for events, this way we can map them etc... Notice that we have a pure virutal clone. This means that we would like to copy an event with out knowing anything about it. Since the copy constructor just won't due, you have to clone.

Although the name of this class is ManipEventBase, it is also the base for Camera Events too.

Definition at line 49 of file ManipEventBase.h.

Clone

virtual ManipEventBase< MT > * clone () const=0

Event Handlers

Return true if the event had an error, false if everything was ok!

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


Tumble

optional event handler, means "repeat last event"

virtual bool tumble (ManipType *m)

Speed

float getSpeed () const
void setSpeed (float speed)

Public Types

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


Public Member Functions

virtual ~ManipEventBase ()

Protected Member Functions

 ManipEventBase (float speed=1.0f)
 ManipEventBase (const ManipEventBase &m)
ManipEventBaseoperator= (const ManipEventBase &m)
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 _speed

Friends

class SmartPtr
class SmartPtrRef


Member Typedef Documentation

template<class MT>
typedef MT gutz::ManipEventBase< MT >::ManipType
 

either a Camera or a Manip (LIGHT??)

Definition at line 52 of file ManipEventBase.h.


Constructor & Destructor Documentation

template<class MT>
virtual gutz::ManipEventBase< MT >::~ManipEventBase  )  [inline, virtual]
 

Definition at line 54 of file ManipEventBase.h.

template<class MT>
gutz::ManipEventBase< MT >::ManipEventBase float  speed = 1.0f  )  [inline, protected]
 

Definition at line 86 of file ManipEventBase.h.

template<class MT>
gutz::ManipEventBase< MT >::ManipEventBase const ManipEventBase< MT > &  m  )  [inline, protected]
 

Definition at line 87 of file ManipEventBase.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().

template<class MT>
virtual ManipEventBase<MT>* gutz::ManipEventBase< MT >::clone  )  const [pure virtual]
 

Implemented in gutz::RotateManipEvent, gutz::TransXYManipEvent, gutz::TransZManipEvent, and gutz::TransPlaneManipEvent.

template<class MT>
virtual void gutz::ManipEventBase< MT >::endEvent ManipType m,
const MouseEvent me
[pure virtual]
 

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

template<class MT>
float gutz::ManipEventBase< MT >::getSpeed  )  const [inline]
 

Definition at line 81 of file ManipEventBase.h.

template<class MT>
virtual bool gutz::ManipEventBase< MT >::handleEvent ManipType m,
const MouseMoveEvent mme
[pure virtual]
 

should be called when the mouse moves

template<class MT>
ManipEventBase& gutz::ManipEventBase< MT >::operator= const ManipEventBase< MT > &  m  )  [inline, protected]
 

Definition at line 88 of file ManipEventBase.h.

template<class MT>
void gutz::ManipEventBase< MT >::setSpeed float  speed  )  [inline]
 

Definition at line 82 of file ManipEventBase.h.

template<class MT>
virtual bool gutz::ManipEventBase< MT >::startEvent ManipType m,
const MouseEvent me
[pure virtual]
 

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

template<class MT>
virtual bool gutz::ManipEventBase< MT >::tumble ManipType m  )  [inline, virtual]
 

Definition at line 76 of file ManipEventBase.h.


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

template<class MT>
float gutz::ManipEventBase< MT >::_speed [protected]
 

Definition at line 91 of file ManipEventBase.h.

Referenced by gutz::ManipEventBase< Manip >::getSpeed(), gutz::ManipEventBase< Manip >::ManipEventBase(), gutz::ManipEventBase< Manip >::operator=(), and gutz::ManipEventBase< Manip >::setSpeed().


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