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

gutz::MouseMoveEvent Class Reference

#include <mouseEvent.h>

Inheritance diagram for gutz::MouseMoveEvent:

gutz::MouseEvent gutz::CameraEvent gutz::Counted List of all members.

Detailed Description

MouseMoveEvent, the mouse is moving.

Be sure to look up the hierarchy for more interface stuff...

Definition at line 151 of file mouseEvent.h.

screen space delta from last move event

float dx () const
float dy () const
float dz () const
vec3f getDel () const

screen space position at last move event

float lx () const
float ly () const
float lz () const
vec3f getLast () const
void setLast (const vec3f &l)

GUTZ_MOUSE_BUTTON <gutzKeyMouse.h>

unsigned int getButton () const
void setButton (unsigned int b)

is the button down or up?

bool isButtonDown () const
void setButtonDown (bool yes)

current SCREEN SPACE position

float x () const
float y () const
float z () const
vec3f getPos () const
void setZ (const float zp)
 this is convenient since the z pos can't be known till something is "picked", unless you set it (z) to zero which indicates picking on the "near clip", or image plane.


current WORLD SPACE position

vec3f getWorldPos () const

Pick Data.

public data data/ids associated with mouse event, currently used for gl style picking name ids.

void resetPickData ()
void setPickData (const DataVec &dv)
void setPickData (const unsigned int *dv, int dvSize)
DataVec pickData

Public Types

typedef std::vector< unsigned
int > 
DataVec

Public Member Functions

 MouseMoveEvent (const vec3f &pos, const vec3f &last, bool down=true, unsigned int button=gutz::GUTZ_BUTTON_NONE, const CameraSP cam=0, const ManipSP manip=0)
 MouseMoveEvent (const MouseEvent &me, const vec3f &curPos)
 for initallizing from a preceeding MouseEvent

virtual ~MouseMoveEvent ()
 using default copy and assignment

void setPos (const vec3f &pos)
 update current position, copies old pos to last pos, then sets current.

vec3f getWorldDel () const
 world space delta.

vec3f getWorldLast () const
 world space last position

const CameraSP getCamera () const
void setCamera (CameraSP cam)
const ManipSP getManip () const
void setManip (ManipSP manip)

Protected Member Functions

void setWorldLast ()
 MouseMoveEvent ()
void setWorldPos ()
 set the world pos based on the screen pos

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

vec3f _last
 not used

vec3f _wlast
unsigned int _button
 not used

bool _down
gutz::vec3f _pos
 screen space postion

gutz::vec3f _wpos
 world space position

CameraSP _cam
ManipSP _manip

Friends

class SmartPtr
class SmartPtrRef


Member Typedef Documentation

typedef std::vector<unsigned int> gutz::MouseEvent::DataVec [inherited]
 

Definition at line 35 of file mouseEvent.h.


Constructor & Destructor Documentation

gutz::MouseMoveEvent::MouseMoveEvent const vec3f pos,
const vec3f last,
bool  down = true,
unsigned int  button = gutz::GUTZ_BUTTON_NONE,
const CameraSP  cam = 0,
const ManipSP  manip = 0
[inline]
 

Definition at line 153 of file mouseEvent.h.

References _last, and setWorldLast().

gutz::MouseMoveEvent::MouseMoveEvent const MouseEvent me,
const vec3f curPos
[inline]
 

for initallizing from a preceeding MouseEvent

Definition at line 159 of file mouseEvent.h.

References _last, gutz::MouseEvent::getButton(), gutz::CameraEvent::getCamera(), gutz::CameraEvent::getManip(), gutz::MouseEvent::getPos(), gutz::MouseEvent::isButtonDown(), gutz::MouseEvent::pickData, and setWorldLast().

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

using default copy and assignment

Definition at line 165 of file mouseEvent.h.

gutz::MouseMoveEvent::MouseMoveEvent  )  [protected]
 


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().

float gutz::MouseMoveEvent::dx  )  const [inline]
 

Definition at line 174 of file mouseEvent.h.

References _last, and gutz::MouseEvent::_pos.

Referenced by gutz::TransZManipEvent::handleEvent().

float gutz::MouseMoveEvent::dy  )  const [inline]
 

Definition at line 175 of file mouseEvent.h.

References _last, and gutz::MouseEvent::_pos.

Referenced by gutz::TransZManipEvent::handleEvent().

float gutz::MouseMoveEvent::dz  )  const [inline]
 

Definition at line 176 of file mouseEvent.h.

References _last, and gutz::MouseEvent::_pos.

unsigned int gutz::MouseEvent::getButton  )  const [inline, inherited]
 

Definition at line 66 of file mouseEvent.h.

References gutz::MouseEvent::_button.

Referenced by WidgetItem::getEvent(), gutz::EventMap< MT >::getEvent(), gutz::Camera::getEvent(), gutz::Camera::getSpeed(), gutz::Camera::mouse(), and MouseMoveEvent().

const CameraSP gutz::CameraEvent::getCamera  )  const [inline, inherited]
 

Definition at line 33 of file cameraEvent.h.

References gutz::CameraEvent::_cam, and gutz::CameraSP.

Referenced by ballPlane(), VolRenBase::drawDef(), VolRenBase::getCenter(), gutz::Manip::mouse(), MouseMoveEvent(), and AnalyticVolRen::postSlice().

vec3f gutz::MouseMoveEvent::getDel  )  const [inline]
 

Definition at line 177 of file mouseEvent.h.

References _last, gutz::MouseEvent::_pos, and gutz::vec3f.

Referenced by gutz::Camera::cameraRotAxis(), gutz::Camera::cameraTrans(), gutz::Camera::cameraZoom(), and gutz::Camera::handleCamera().

vec3f gutz::MouseMoveEvent::getLast  )  const [inline]
 

Definition at line 189 of file mouseEvent.h.

References _last, and gutz::vec3f.

Referenced by gutz::Camera::cameraRot(), gutz::Camera::cameraSwivel(), gutz::TransXYManipEvent::getDelta(), gutz::TransPlaneManipEvent::handleEvent(), and gutz::RotateManipEvent::handleEvent().

const ManipSP gutz::CameraEvent::getManip  )  const [inline, inherited]
 

Definition at line 35 of file cameraEvent.h.

References gutz::CameraEvent::_manip, and gutz::ManipSP.

Referenced by VolRenBase::drawDef(), VolRenBase::getCenter(), MouseMoveEvent(), and AnalyticVolRen::postSlice().

vec3f gutz::MouseEvent::getPos  )  const [inline, inherited]
 

Definition at line 83 of file mouseEvent.h.

References gutz::MouseEvent::_pos, and gutz::vec3f.

Referenced by gutz::Camera::cameraRot(), gutz::Camera::cameraSwivel(), gutz::TransXYManipEvent::getDelta(), gutz::Manip::getRad(), gutz::TransPlaneManipEvent::handleEvent(), gutz::RotateManipEvent::handleEvent(), gutz::Camera::mouse(), MouseMoveEvent(), and setPos().

vec3f gutz::MouseMoveEvent::getWorldDel  )  const [inline]
 

world space delta.

Definition at line 181 of file mouseEvent.h.

References _wlast, gutz::MouseEvent::_wpos, and gutz::vec3f.

Referenced by PlaneConstraint::getMoveBy(), and Constraint::getMoveBy().

vec3f gutz::MouseMoveEvent::getWorldLast  )  const [inline]
 

world space last position

Definition at line 194 of file mouseEvent.h.

References _wlast, and gutz::vec3f.

Referenced by ballPlane().

vec3f gutz::MouseEvent::getWorldPos  )  const [inline, inherited]
 

Definition at line 95 of file mouseEvent.h.

References gutz::MouseEvent::_wpos, and gutz::vec3f.

Referenced by ballPlane(), SurfaceWidget::intersectPlane(), setPos(), and gutz::TransPlaneManipEvent::startEvent().

bool gutz::MouseEvent::isButtonDown  )  const [inline, inherited]
 

Definition at line 73 of file mouseEvent.h.

References gutz::MouseEvent::_down.

Referenced by WidgetItem::getEvent(), gutz::Camera::getEvent(), gutz::EventMap< MT >::mouse(), gutz::Camera::mouse(), MouseMoveEvent(), gutz::TransPlaneManipEvent::startEvent(), gutz::TransXYManipEvent::startEvent(), and gutz::RotateManipEvent::startEvent().

float gutz::MouseMoveEvent::lx  )  const [inline]
 

Definition at line 186 of file mouseEvent.h.

References _last.

float gutz::MouseMoveEvent::ly  )  const [inline]
 

Definition at line 187 of file mouseEvent.h.

References _last.

float gutz::MouseMoveEvent::lz  )  const [inline]
 

Definition at line 188 of file mouseEvent.h.

References _last.

void gutz::MouseEvent::resetPickData  )  [inline, inherited]
 

Definition at line 106 of file mouseEvent.h.

References gutz::MouseEvent::pickData.

void gutz::MouseEvent::setButton unsigned int  b  )  [inline, inherited]
 

Definition at line 67 of file mouseEvent.h.

References gutz::MouseEvent::_button.

void gutz::MouseEvent::setButtonDown bool  yes  )  [inline, inherited]
 

Definition at line 74 of file mouseEvent.h.

References gutz::MouseEvent::_down.

void gutz::CameraEvent::setCamera CameraSP  cam  )  [inline, inherited]
 

Definition at line 34 of file cameraEvent.h.

References gutz::CameraEvent::_cam.

void gutz::MouseMoveEvent::setLast const vec3f l  )  [inline]
 

Definition at line 190 of file mouseEvent.h.

References _last, and setWorldLast().

void gutz::CameraEvent::setManip ManipSP  manip  )  [inline, inherited]
 

Definition at line 36 of file cameraEvent.h.

References gutz::CameraEvent::_manip.

void gutz::MouseEvent::setPickData const unsigned int *  dv,
int  dvSize
[inline, inherited]
 

Definition at line 116 of file mouseEvent.h.

References gutz::MouseEvent::pickData.

void gutz::MouseEvent::setPickData const DataVec dv  )  [inline, inherited]
 

Definition at line 110 of file mouseEvent.h.

References gutz::MouseEvent::pickData.

void gutz::MouseMoveEvent::setPos const vec3f pos  )  [inline, virtual]
 

update current position, copies old pos to last pos, then sets current.

Reimplemented from gutz::MouseEvent.

Definition at line 168 of file mouseEvent.h.

References _last, _wlast, gutz::MouseEvent::getPos(), and gutz::MouseEvent::getWorldPos().

Referenced by gutz::Camera::mouse().

void gutz::MouseMoveEvent::setWorldLast  )  [inline, protected]
 

Definition at line 197 of file mouseEvent.h.

References gutz::CameraEvent::_cam, _last, and _wlast.

Referenced by MouseMoveEvent(), and setLast().

void gutz::MouseEvent::setWorldPos  )  [inline, protected, inherited]
 

set the world pos based on the screen pos

Definition at line 127 of file mouseEvent.h.

References gutz::CameraEvent::_cam, gutz::MouseEvent::_pos, and gutz::MouseEvent::_wpos.

Referenced by gutz::MouseEvent::MouseEvent(), gutz::MouseEvent::setPos(), and gutz::MouseEvent::setZ().

void gutz::MouseEvent::setZ const float  zp  )  [inline, inherited]
 

this is convenient since the z pos can't be known till something is "picked", unless you set it (z) to zero which indicates picking on the "near clip", or image plane.

usually, z is in the range [0,1]: 0 =near clip, 1 =far clip

Definition at line 89 of file mouseEvent.h.

References gutz::MouseEvent::_pos, and gutz::MouseEvent::setWorldPos().

float gutz::MouseEvent::x  )  const [inline, inherited]
 

Definition at line 80 of file mouseEvent.h.

References gutz::MouseEvent::_pos.

float gutz::MouseEvent::y  )  const [inline, inherited]
 

Definition at line 81 of file mouseEvent.h.

References gutz::MouseEvent::_pos.

float gutz::MouseEvent::z  )  const [inline, inherited]
 

Definition at line 82 of file mouseEvent.h.

References gutz::MouseEvent::_pos.

Referenced by gutz::TransXYManipEvent::getDelta(), and gutz::TransPlaneManipEvent::startEvent().


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

unsigned int gutz::MouseEvent::_button [protected, inherited]
 

not used

Definition at line 138 of file mouseEvent.h.

Referenced by gutz::MouseEvent::getButton(), gutz::MouseEvent::MouseEvent(), and gutz::MouseEvent::setButton().

CameraSP gutz::CameraEvent::_cam [protected, inherited]
 

Definition at line 39 of file cameraEvent.h.

Referenced by gutz::CameraEvent::CameraEvent(), gutz::CameraEvent::getCamera(), gutz::CameraEvent::setCamera(), setWorldLast(), gutz::MouseEvent::setWorldPos(), and gutz::CameraEvent::~CameraEvent().

bool gutz::MouseEvent::_down [protected, inherited]
 

Definition at line 139 of file mouseEvent.h.

Referenced by gutz::MouseEvent::isButtonDown(), gutz::MouseEvent::MouseEvent(), and gutz::MouseEvent::setButtonDown().

vec3f gutz::MouseMoveEvent::_last [protected]
 

not used

Definition at line 209 of file mouseEvent.h.

Referenced by dx(), dy(), dz(), getDel(), getLast(), lx(), ly(), lz(), MouseMoveEvent(), setLast(), setPos(), and setWorldLast().

ManipSP gutz::CameraEvent::_manip [protected, inherited]
 

Definition at line 40 of file cameraEvent.h.

Referenced by gutz::CameraEvent::CameraEvent(), gutz::CameraEvent::getManip(), gutz::CameraEvent::setManip(), and gutz::CameraEvent::~CameraEvent().

gutz::vec3f gutz::MouseEvent::_pos [protected, inherited]
 

screen space postion

Definition at line 140 of file mouseEvent.h.

Referenced by dx(), dy(), dz(), getDel(), gutz::MouseEvent::getPos(), gutz::MouseEvent::MouseEvent(), gutz::MouseEvent::setPos(), gutz::MouseEvent::setWorldPos(), gutz::MouseEvent::setZ(), gutz::MouseEvent::x(), gutz::MouseEvent::y(), and gutz::MouseEvent::z().

vec3f gutz::MouseMoveEvent::_wlast [protected]
 

Definition at line 210 of file mouseEvent.h.

Referenced by getWorldDel(), getWorldLast(), setPos(), and setWorldLast().

gutz::vec3f gutz::MouseEvent::_wpos [protected, inherited]
 

world space position

Definition at line 141 of file mouseEvent.h.

Referenced by getWorldDel(), gutz::MouseEvent::getWorldPos(), and gutz::MouseEvent::setWorldPos().

DataVec gutz::MouseEvent::pickData [inherited]
 

Definition at line 104 of file mouseEvent.h.

Referenced by gutz::MouseEvent::MouseEvent(), MouseMoveEvent(), gutz::MouseEvent::resetPickData(), and gutz::MouseEvent::setPickData().


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