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

gutz::TransPlaneManipEvent Class Reference

#include <ManipEvents.h>

Inheritance diagram for gutz::TransPlaneManipEvent:

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

Detailed Description

Translate in Plane.

Translates only in a user-defined plane. This class "HAS_SLOTS" so that the plane can be defined dynamically. See gutz::Signal for more info on Signals & Slots. The plane is defined in WORLD space.

Definition at line 151 of file ManipEvents.h.

Set/Get Plane

The plane should be set in WORLD space

void setPlane (const gutz::planef &pln)
void setPlanePos (const gutz::vec3f &ppos)
gutz::vec3f getPlanePos () const
void setPlaneNorm (const gutz::vec3f &pnorm)
gutz::vec3f getPlaneNorm () const

Event Handlers

bool startEvent (Manip *m, const MouseEvent &me)
 TransZManipEvent.

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


Event Handlers

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

 TransPlaneManipEvent (gutz::vec3f ppos=vec3f_zero, gutz::vec3f pnorm=vec3f_z, float speed=1.0f)
 TransPlaneManipEvent (const TransPlaneManipEvent &tpme)
virtual ~TransPlaneManipEvent ()
TransPlaneManipEventoperator= (const TransPlaneManipEvent &tpme)
virtual ManipEventBase< Manip > * clone () const
 be sure to override this in any sub-classes

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)

Public Attributes

 HAS_SLOTS

Protected Member Functions

vec3f getDelta (Manip *m, const MouseMoveEvent &mme) const
 returns the translaton for this local frame (actually defined in parent's space)

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

gutz::vec3f _start
gutz::vec3f _ppos
gutz::vec3f _pnorm
vec3f _lastTrans
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::TransPlaneManipEvent::TransPlaneManipEvent gutz::vec3f  ppos = vec3f_zero,
gutz::vec3f  pnorm = vec3f_z,
float  speed = 1.0f
[inline]
 

Definition at line 155 of file ManipEvents.h.

References _pnorm, and _ppos.

Referenced by clone().

gutz::TransPlaneManipEvent::TransPlaneManipEvent const TransPlaneManipEvent tpme  )  [inline]
 

Definition at line 160 of file ManipEvents.h.

References _pnorm, and _ppos.

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

Definition at line 163 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::TransPlaneManipEvent::clone void   )  const [inline, virtual]
 

be sure to override this in any sub-classes

Reimplemented from gutz::TransXYManipEvent.

Definition at line 172 of file ManipEvents.h.

References TransPlaneManipEvent().

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 TransXYManipEvent::endEvent Manip m,
const MouseEvent me
[inherited]
 

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

Definition at line 158 of file ManipEvents.cpp.

References gutz::TransXYManipEvent::_lastTrans, and gutz::vec3f_zero.

vec3f TransXYManipEvent::getDelta Manip m,
const MouseMoveEvent mme
const [protected, inherited]
 

returns the translaton for this local frame (actually defined in parent's space)

didn't have a picked point

intersect rays with plane at our local position oriented with view direction

compute delta based on the current & last intersections

we DID have a valid pick point

else we didn't have a parent, we just have to use the points...

use ray-plane intersection to compute the delta vector get the ray through the screen points (curr&last) from the eye

therfore the points from the event just need to be translated to our (parents) LOCAL space

Definition at line 110 of file ManipEvents.cpp.

References gutz::MouseMoveEvent::getLast(), gutz::Manip::getLocalPos(), gutz::Manip::getParent(), gutz::MouseEvent::getPos(), gutz::vec3f, and gutz::MouseEvent::z().

Referenced by gutz::TransZManipEvent::handleEvent(), and gutz::TransXYManipEvent::handleEvent().

gutz::vec3f gutz::TransPlaneManipEvent::getPlaneNorm  )  const [inline]
 

Definition at line 183 of file ManipEvents.h.

References _pnorm.

gutz::vec3f gutz::TransPlaneManipEvent::getPlanePos  )  const [inline]
 

Definition at line 181 of file ManipEvents.h.

References _ppos.

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 TransPlaneManipEvent::handleEvent Manip m,
const MouseMoveEvent mme
 

should be called when the mouse moves

Reimplemented from gutz::TransXYManipEvent.

Definition at line 214 of file ManipEvents.cpp.

References gutz::TransXYManipEvent::_lastTrans, _pnorm, _start, gutz::MouseMoveEvent::getLast(), gutz::Manip::getLocalPos(), gutz::Manip::getParent(), gutz::MouseEvent::getPos(), gutz::Manip::setLocalPos(), and gutz::vec3f.

TransPlaneManipEvent& gutz::TransPlaneManipEvent::operator= const TransPlaneManipEvent tpme  )  [inline]
 

Definition at line 165 of file ManipEvents.h.

References _pnorm, and _ppos.

void gutz::TransPlaneManipEvent::setPlane const gutz::planef pln  )  [inline]
 

Definition at line 178 of file ManipEvents.h.

References _pnorm, and _ppos.

void gutz::TransPlaneManipEvent::setPlaneNorm const gutz::vec3f pnorm  )  [inline]
 

Definition at line 182 of file ManipEvents.h.

References _pnorm.

void gutz::TransPlaneManipEvent::setPlanePos const gutz::vec3f ppos  )  [inline]
 

Definition at line 180 of file ManipEvents.h.

References _ppos.

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 TransPlaneManipEvent::startEvent Manip m,
const MouseEvent me
 

TransZManipEvent.

Reimplemented from gutz::TransXYManipEvent.

Definition at line 194 of file ManipEvents.cpp.

References gutz::TransXYManipEvent::_lastTrans, _pnorm, _ppos, _start, gutz::MouseEvent::getWorldPos(), gutz::MouseEvent::isButtonDown(), gutz::vec3f_zero, and gutz::MouseEvent::z().

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

Definition at line 76 of file ManipEventBase.h.

bool TransXYManipEvent::tumble Manip m  )  [inherited]
 

repeat last event

Definition at line 163 of file ManipEvents.cpp.

References gutz::TransXYManipEvent::_lastTrans, gutz::ManipEventBase< Manip >::_speed, gutz::Manip::getLocalPos(), gutz::Manip::setLocalPos(), and gutz::vec3f_zero.


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

vec3f gutz::TransXYManipEvent::_lastTrans [protected, inherited]
 

Definition at line 110 of file ManipEvents.h.

Referenced by gutz::TransXYManipEvent::endEvent(), handleEvent(), gutz::TransZManipEvent::handleEvent(), gutz::TransXYManipEvent::handleEvent(), gutz::TransXYManipEvent::operator=(), startEvent(), gutz::TransXYManipEvent::startEvent(), gutz::TransXYManipEvent::TransXYManipEvent(), and gutz::TransXYManipEvent::tumble().

gutz::vec3f gutz::TransPlaneManipEvent::_pnorm [protected]
 

Definition at line 197 of file ManipEvents.h.

Referenced by getPlaneNorm(), handleEvent(), operator=(), setPlane(), setPlaneNorm(), startEvent(), and TransPlaneManipEvent().

gutz::vec3f gutz::TransPlaneManipEvent::_ppos [protected]
 

Definition at line 196 of file ManipEvents.h.

Referenced by getPlanePos(), operator=(), setPlane(), setPlanePos(), startEvent(), and TransPlaneManipEvent().

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

Definition at line 91 of file ManipEventBase.h.

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

gutz::vec3f gutz::TransPlaneManipEvent::_start [protected]
 

Definition at line 195 of file ManipEvents.h.

Referenced by handleEvent(), and startEvent().

gutz::TransPlaneManipEvent::HAS_SLOTS
 

Definition at line 153 of file ManipEvents.h.


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