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

gutz::Manip Class Reference

#include <Manip.h>

Inheritance diagram for gutz::Manip:

gutz::BaseManip gutz::Counted List of all members.

Detailed Description

A Manipulator interaction class.

(include graphicsGutz.h)

A Manipluator interaction class. Handles basic operations relating to object manipulation. The Camera is automatically set if the gutz::MouseEvent contains a valid camera, which it should if it was correctly created.

Implementation notez (users of this class can ignore this stuff):
Manipulators are composed of 3 basic transforms, a "baked" transform (B) representing all translation and rotation up to the current rotation (R) around the "center of rotation" (C). Here is how we generate the local transform (LM):
LM = B * C^{-1} * R * C
The matrix B is what I call the "baked" matrix, so called because when the center of rotation changes, we "bake" the previous C^{-1}*R*C into B, ie B = B*C^{-1}*R*C. It is also key when the user sets the matrix, there may be no way to recover a pure rotation about our current center of rotation. In this case we just set it to B and set R to identity. C is the transform that takes the local coordinate frame to the center of rotation, ie -(minus)"center of rotation". R is the rotation around that center of rotation; it is stored as a quaternion accessed through getCenterQuat() and setCenterQuat().

Events implementing rotation need to be aware of the relationships described above. Since B is applied before R, you need to do the appropriate change of basis to assign/modify R. Remember that B includes rotation. Right now, rotations are generated with respect to the current view. There is a function calld getCamQuat() that returns a quaternion representing all rotation from EYE space to this local coordinate frame, including rotations in B, but not R. This means that you can multiply R by another quaternion Q (defined in EYE space) like this:
R' = CQ^{-1} * Q * CQ * R
Where CQ is the camera quaternion. The part of the equation:
CQ^{-1} * Q * CQ
is the rotation Q in the local coordinate frame, it expresses the change of basis to get Q into the local frame. This quaternion can be stored and applied during tumbling. Take a look at gutz::RotateManipEvent to see a reference implementation of this process.

At some point, I want to lighten up this object; right now it is carying a lot of data. I am caching the matrix and its inverse since I assume that the user should have access to these, and that it be very fast.

Definition at line 102 of file Manip.h.

RTTI

bool isCamera () const
bool isManip () const

Key Transform Parameters

vec3f getCenter () const
 What is the center of rotation, defaults to (0,0,0), in LOCAL space.

void setCenter (const vec3f &center)
 Set the center of rotation, in LOCAL space.

gutz::quatf getCenterQuat () const
 get the quaternion associated with rotation around the center

void setCenterQuat (const quatf &cq)
 set the quaternion associated with rotation around the center

float getRad () const
 What is the radius of rotation, returns 0.0 if unset.

void setRad (float rad)
 Set the radius of rotation, set to 0.0 if you want default radius behavior.

float getRad (const gutz::MouseEvent &me)
 Get the radius for an event, specifically this returns the default radius if we ONLY have screen position, and no depth, if we have depth, and no user defined radius, we guess the radius based on the pick point and center of rotation.


Transformations

mat4f getMatrix () const
 Get Matrix.

mat4f getInvMatrix () const
void setMatrix (const gutz::mat4f &m)
virtual gutz::mat4f getProjectTransform () const
 get the projection transform, PROJECTION<-LOCAL

virtual gutz::mat4f getInvProjectTransform () const
 get the inverse projection transform, PROJECTION->LOCAL

virtual gutz::mat4f getScreenTransform () const
 get the screen transform, SCREEN<-PROJECT this is wierd because you must apply the Project transform, then divide by w, then apply the screen transform.

virtual gutz::mat4f getInvScreenTransform () const
 get the inverse screen transform, SCREEN->PROJECT

gutz::mat4f getEyeTransform () const
 get the eye transform, EYE<-LOCAL

gutz::mat4f getInvEyeTransform () const
 get the inverse eye transform: EYE->LOCAL

virtual gutz::mat4f getInvWorldTransform () const
 get the inverse world transform: WORLD->LOCAL

gutz::mat4f getWorldTransform () const
 get the world transform: WORLD<-LOCAL

gutz::mat4f getLocalTransform () const
 get the transform that this manipulator defines

gutz::mat4f getInvLocalTransform () const
 get the inverse transform that this manipulator defines

gutz::mat4f getProjection () const
 get the projection matrix currently associated with this transform chain

gutz::mat4f getInvProjection () const
 get the inverse projection matrix (inverse of getProjection())

gutz::quatf getEyeQuat () const
 get the quaternion that expresses rotation: EYE<-LOCAL

gutz::quatf getInvEyeQuat () const
 get the inverse quaternion for rotation: EYE->LOCAL

gutz::quatf getWorldQuat () const
 get the quaternion for rotation: WORLD<-LOCAL

gutz::quatf getInvWorldQuat () const
 get the inverse quaternion for rotation: WORLD->LOCAL

gutz::quatf getLocalQuat () const
 get the local quaternion for rotation

gutz::quatf getInvLocalQuat () const
 get the inverse local quaterinion for rotation


Position & orientation

gutz::vec3f getLocalPos () const
void setLocalPos (const vec3f &pos)
gutz::mat3f getLocalOrient () const
void setLocalQuat (const quatf &lq)

Tranformation chains

Basically implements a linked list of manipulators that can be strung together.

If you set your parent to be 0, then you effectively nuke the chain above this manipulator. Cameras are special, there can only be one, and it is always at the very top of the chain.

adds parent above this transformation (head of the transform chain)

void setParent (const BaseManipSP parent)
BaseManipSP getParent () const
 Tranformation chains (for Manip) interface Manip basically implements a linked list of manipulators that can be strung together.

void insertParent (const BaseManipSP parent)
 inserts parent just above this one

void removeParent ()
 replaces parent with our parent's parent.


Set/Get Camera,

Sets the camera so interactions are relative to the current view.

virtual void setCamera (const gutz::CameraSP cam)
CameragetCamera () const
quatf getCamQuat ()
 get Camera Quaternions, the camera is simply all rotations above this object in the chain including any baked rotation: ROT_OF(EYE<-LOCAL).

quatf getInvCamQuat ()
 get Inverse Camera Quaternion, the camera is simply all rotation above this object in the chain: ROT_OF(EYE->LOCAL)


Screen size functions

gutz::vec2ui getScreen () const
unsigned int getScreenX () const
unsigned int getScreenY () const

Projections

Given either a "SCREEN", "EYE", "WORLD", or "LOCAL" space pos

gutz::vec3f getLocalPosWorld (const gutz::vec3f &wpos) const
 You have a point in WORLD space and now you want it in LOCAL space WORLD->LOCAL.

gutz::vec3f getLocalDirWorld (const gutz::vec3f &wdir) const
 WORLD->LOCAL dir, You have a vector (direction) in WORLD, you want it in LOCAL.

gutz::vec3f getWorldPosLocal (const gutz::vec3f &lpos) const
 You have a LOCAL point and you want it in WORLD space WORLD<-LOCAL.

gutz::vec3f getWorldDirLocal (const gutz::vec3f &ldir) const
 WORLD<-LOCAL dir, You have a vector (direction) in WORLD, you want it in LOCAL.

gutz::vec3f getLocalPosEye (const gutz::vec3f &epos) const
 You have an EYE space point and want it in LOCAL space EYE->LOCAL.

gutz::vec3f getEyePosLocal (const gutz::vec3f &lpos) const
 You have a LOCAL space point and want it in EYE space EYE<-LOCAL.

gutz::vec3f getLocalPosScreen (const gutz::vec3f &spos) const
 transform a SCREEN space pos to LOCAL pos (by the inv model view) SCREEN->LOCAL

gutz::vec3f getScreenPosLocal (const gutz::vec3f &lpos) const
 You have a point in LOCAL space and want it in SCREEN space SCREEN<-LOCAL.


Vectors

Simmilar to Projections, but rather than projecting a point you are projecting/deriving a direction vector.

gutz::vec3f getLocalEyeRayLocal (const gutz::vec3f &lpos) const
 get a LOCAL direction (ray) through a LOCAL point from the eye

gutz::vec3f getLocalEyeRayScreen (const gutz::vec3f &spos) const
 get a LOCAL direction through a SCREEN point from the eye

gutz::vec3f getWorldEyeRayScreen (const gutz::vec3f &spos) const
 get a World direction through a Screen point from the eye

gutz::vec3f getWorldEyeRayWorld (const gutz::vec3f &wpos) const
 get a World direction through a World point from the eye

gutz::vec3f getLocalViewDir () const
 get the View direction in LOCAL space


Mouse Events

virtual bool mouse (const MouseEvent &me)
virtual bool move (const MouseMoveEvent &mme)

Tumble

Update speed amount

virtual void tumble (float speed=1)
 Update tumble "speed" amout.


Position & orientation

gutz::vec3f getWorldPos () const
virtual void setWorldPos (const vec3f &wpos)
gutz::mat3f getWorldOrient () const

Tumble.

enable/disable rotations with inertia

void setTumble (bool on)
bool getTumble () const

Public Types

typedef gutz::SmartPtr< BaseManipBaseManipSP

Public Member Functions

 Manip (Camera *cam=0)
 if a Camera is passed, the parent is automatically set to the camera

 Manip (const Manip &m)
 copy constructor, copies everything, including the parent and events

Manipoperator= (const Manip &m)
 assignment, copies everything but events, including the parent

virtual ~Manip ()
virtual bool serialize (std::ostream &os, const std::string indent=std::string(""))
 Serialization.

virtual bool unserialize (std::istream &is)
 read.

virtual bool serialData (std::ostream &os, const std::string indent=std::string(""))
 serialize the data parts of this guy for momentos & transmission

virtual bool unserialData (std::istream &is)

Public Attributes

 HAS_SLOTS

Protected Member Functions

void updateMatrix ()
mat4f buildMatrix () const
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
float _userRad
vec3f _center
mat4f _baked
mat4f _om
mat4f _oinv
quatf _currquat
 eventually we could nuke these, they are just cached

quatf _objtrackquat
BaseManipSP _parent
 who is above us in the transform chain?

bool _tumble
 Tumble on???

unsigned int _currentMode
 Current mode.

float _currentSpeed
 Current speed.

float _lastd
 Last distance traveled.


Friends

class SmartPtr
class SmartPtrRef


Member Typedef Documentation

typedef gutz::SmartPtr<BaseManip> gutz::BaseManip::BaseManipSP [inherited]
 

Definition at line 85 of file baseManip.h.

Referenced by setCamera().


Constructor & Destructor Documentation

Manip::Manip Camera cam = 0  ) 
 

if a Camera is passed, the parent is automatically set to the camera

Definition at line 45 of file Manip.cpp.

References defaultRad, gutz::ManipEventMap, gutz::mat4f_id, gutz::quatf_id, and gutz::vec3f_zero.

Manip::Manip const Manip m  ) 
 

copy constructor, copies everything, including the parent and events

Definition at line 60 of file Manip.cpp.

References gutz::ManipEventMap.

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

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

mat4f Manip::buildMatrix  )  const [protected]
 

Definition at line 154 of file Manip.cpp.

References _baked, _center, _currquat, gutz::mat3f, gutz::mat3f_id, gutz::mat4f, and gutz::vec3f_zero.

Referenced by updateMatrix().

Camera * Manip::getCamera  )  const [virtual]
 

Implements gutz::BaseManip.

Definition at line 217 of file Manip.cpp.

References _parent, gutz::CameraSP, and gutz::SmartPtr< BaseManip >::cast().

quatf gutz::Manip::getCamQuat  )  [inline]
 

get Camera Quaternions, the camera is simply all rotations above this object in the chain including any baked rotation: ROT_OF(EYE<-LOCAL).

comes in handy for Events using trackballs, since this is all rotation up to the "centerQuat()".

Definition at line 258 of file Manip.h.

References _baked, _parent, and gutz::quatf.

Referenced by getInvCamQuat(), and gutz::RotateManipEvent::handleEvent().

vec3f gutz::Manip::getCenter  )  const [inline]
 

What is the center of rotation, defaults to (0,0,0), in LOCAL space.

Definition at line 126 of file Manip.h.

References _center, and gutz::vec3f.

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

gutz::quatf gutz::Manip::getCenterQuat  )  const [inline]
 

get the quaternion associated with rotation around the center

Definition at line 130 of file Manip.h.

References _currquat.

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

gutz::vec3f gutz::Manip::getEyePosLocal const gutz::vec3f lpos  )  const [inline, virtual]
 

You have a LOCAL space point and want it in EYE space EYE<-LOCAL.

Implements gutz::BaseManip.

Definition at line 324 of file Manip.h.

References _om, and _parent.

gutz::quatf gutz::Manip::getEyeQuat  )  const [inline, virtual]
 

get the quaternion that expresses rotation: EYE<-LOCAL

Implements gutz::BaseManip.

Definition at line 192 of file Manip.h.

References _parent, and getLocalQuat().

Referenced by getInvEyeQuat().

gutz::mat4f gutz::Manip::getEyeTransform  )  const [inline, virtual]
 

get the eye transform, EYE<-LOCAL

Implements gutz::BaseManip.

Definition at line 170 of file Manip.h.

References _om, and _parent.

quatf gutz::Manip::getInvCamQuat  )  [inline]
 

get Inverse Camera Quaternion, the camera is simply all rotation above this object in the chain: ROT_OF(EYE->LOCAL)

Definition at line 265 of file Manip.h.

References getCamQuat(), and gutz::quatf.

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

gutz::quatf gutz::Manip::getInvEyeQuat  )  const [inline, virtual]
 

get the inverse quaternion for rotation: EYE->LOCAL

Implements gutz::BaseManip.

Definition at line 195 of file Manip.h.

References getEyeQuat().

gutz::mat4f gutz::Manip::getInvEyeTransform  )  const [inline, virtual]
 

get the inverse eye transform: EYE->LOCAL

Implements gutz::BaseManip.

Definition at line 173 of file Manip.h.

References _oinv, and _parent.

Referenced by getLocalViewDir().

gutz::quatf gutz::Manip::getInvLocalQuat  )  const [inline, virtual]
 

get the inverse local quaterinion for rotation

Implements gutz::BaseManip.

Definition at line 211 of file Manip.h.

References getLocalQuat().

Referenced by getInvWorldQuat().

gutz::mat4f gutz::Manip::getInvLocalTransform  )  const [inline, virtual]
 

get the inverse transform that this manipulator defines

Implements gutz::BaseManip.

Definition at line 184 of file Manip.h.

References _oinv.

mat4f gutz::Manip::getInvMatrix  )  const [inline]
 

Definition at line 152 of file Manip.h.

References _oinv, and gutz::mat4f.

gutz::mat4f gutz::Manip::getInvProjection  )  const [inline, virtual]
 

get the inverse projection matrix (inverse of getProjection())

Implements gutz::BaseManip.

Definition at line 189 of file Manip.h.

References _parent, and gutz::mat4f_id.

virtual gutz::mat4f gutz::Manip::getInvProjectTransform  )  const [inline, virtual]
 

get the inverse projection transform, PROJECTION->LOCAL

Implements gutz::BaseManip.

Definition at line 159 of file Manip.h.

References _oinv, and _parent.

virtual gutz::mat4f gutz::Manip::getInvScreenTransform  )  const [inline, virtual]
 

get the inverse screen transform, SCREEN->PROJECT

Implements gutz::BaseManip.

Definition at line 167 of file Manip.h.

References _parent, and gutz::mat4f_id.

gutz::quatf gutz::Manip::getInvWorldQuat  )  const [inline, virtual]
 

get the inverse quaternion for rotation: WORLD->LOCAL

Implements gutz::BaseManip.

Definition at line 203 of file Manip.h.

References _parent, and getInvLocalQuat().

virtual gutz::mat4f gutz::Manip::getInvWorldTransform  )  const [inline, virtual]
 

get the inverse world transform: WORLD->LOCAL

Implements gutz::BaseManip.

Definition at line 176 of file Manip.h.

References _oinv, and _parent.

gutz::vec3f gutz::Manip::getLocalDirWorld const gutz::vec3f wdir  )  const [inline, virtual]
 

WORLD->LOCAL dir, You have a vector (direction) in WORLD, you want it in LOCAL.

Implements gutz::BaseManip.

Definition at line 297 of file Manip.h.

References _oinv, and _parent.

gutz::vec3f gutz::Manip::getLocalEyeRayLocal const gutz::vec3f lpos  )  const [inline, virtual]
 

get a LOCAL direction (ray) through a LOCAL point from the eye

Implements gutz::BaseManip.

Definition at line 354 of file Manip.h.

References _oinv, _om, and _parent.

gutz::vec3f gutz::Manip::getLocalEyeRayScreen const gutz::vec3f spos  )  const [inline, virtual]
 

get a LOCAL direction through a SCREEN point from the eye

Implements gutz::BaseManip.

Definition at line 361 of file Manip.h.

References _oinv, and _parent.

gutz::mat3f gutz::Manip::getLocalOrient  )  const [inline, virtual]
 

Implements gutz::BaseManip.

Definition at line 221 of file Manip.h.

References _om.

gutz::vec3f gutz::Manip::getLocalPos  )  const [inline, virtual]
 

Implements gutz::BaseManip.

Definition at line 219 of file Manip.h.

References _om.

Referenced by gutz::TransXYManipEvent::getDelta(), gutz::TransPlaneManipEvent::handleEvent(), gutz::TransZManipEvent::handleEvent(), gutz::TransXYManipEvent::handleEvent(), setLocalPos(), and gutz::TransXYManipEvent::tumble().

gutz::vec3f gutz::Manip::getLocalPosEye const gutz::vec3f epos  )  const [inline, virtual]
 

You have an EYE space point and want it in LOCAL space EYE->LOCAL.

Implements gutz::BaseManip.

Definition at line 317 of file Manip.h.

References _oinv, and _parent.

gutz::vec3f gutz::Manip::getLocalPosScreen const gutz::vec3f spos  )  const [inline, virtual]
 

transform a SCREEN space pos to LOCAL pos (by the inv model view) SCREEN->LOCAL

Implements gutz::BaseManip.

Definition at line 331 of file Manip.h.

References _oinv, and _parent.

Referenced by getRad().

gutz::vec3f gutz::Manip::getLocalPosWorld const gutz::vec3f wpos  )  const [inline, virtual]
 

You have a point in WORLD space and now you want it in LOCAL space WORLD->LOCAL.

Implements gutz::BaseManip.

Definition at line 291 of file Manip.h.

References _oinv, and _parent.

gutz::quatf gutz::Manip::getLocalQuat  )  const [inline, virtual]
 

get the local quaternion for rotation

Implements gutz::BaseManip.

Definition at line 209 of file Manip.h.

References _om, and gutz::quatf.

Referenced by getEyeQuat(), getInvLocalQuat(), and getWorldQuat().

gutz::mat4f gutz::Manip::getLocalTransform  )  const [inline, virtual]
 

get the transform that this manipulator defines

Implements gutz::BaseManip.

Definition at line 182 of file Manip.h.

References _om.

gutz::vec3f gutz::Manip::getLocalViewDir  )  const [inline, virtual]
 

get the View direction in LOCAL space

Implements gutz::BaseManip.

Definition at line 374 of file Manip.h.

References _parent, getInvEyeTransform(), and gutz::vec3f_z.

mat4f gutz::Manip::getMatrix  )  const [inline]
 

Get Matrix.

Get the 4x4 homogenious transformation matrix, equiv to getLocalTransform()

Definition at line 151 of file Manip.h.

References _om, and gutz::mat4f.

BaseManipSP gutz::Manip::getParent  )  const [inline, virtual]
 

Tranformation chains (for Manip) interface Manip basically implements a linked list of manipulators that can be strung together.

If you set your parent to be 0, then you effectively nuke the chain above this manipulator. Cameras are special, there can only be one, and it is always at the very top of the chain (ie has no parent). See gutz::Manip for the rest of this interface

Reimplemented from gutz::BaseManip.

Definition at line 236 of file Manip.h.

References _parent.

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

gutz::mat4f gutz::Manip::getProjection  )  const [inline, virtual]
 

get the projection matrix currently associated with this transform chain

Implements gutz::BaseManip.

Definition at line 186 of file Manip.h.

References _parent, and gutz::mat4f_id.

virtual gutz::mat4f gutz::Manip::getProjectTransform  )  const [inline, virtual]
 

get the projection transform, PROJECTION<-LOCAL

Implements gutz::BaseManip.

Definition at line 156 of file Manip.h.

References _om, and _parent.

float Manip::getRad const gutz::MouseEvent me  ) 
 

Get the radius for an event, specifically this returns the default radius if we ONLY have screen position, and no depth, if we have depth, and no user defined radius, we guess the radius based on the pick point and center of rotation.

user specifed a radius

figure out the correct radius for rotation

project center to screen

add one increment in x direction

project back to local space

get local x vector

normalize that

multiply by the radius

project that point to the screen

rad is the norm of this vector

determine radius for trackball rotation

compute the difference in screen space

Definition at line 95 of file Manip.cpp.

References _center, _rad, _userRad, defaultRad, getLocalPosScreen(), gutz::MouseEvent::getPos(), getScreenPosLocal(), getScreenX(), gutz::vec3f, and gutz::vec3f_x.

float gutz::Manip::getRad  )  const [inline]
 

What is the radius of rotation, returns 0.0 if unset.

Definition at line 134 of file Manip.h.

References _userRad.

Referenced by gutz::RotateManipEvent::startEvent().

gutz::vec2ui gutz::Manip::getScreen  )  const [inline, virtual]
 

Implements gutz::BaseManip.

Definition at line 274 of file Manip.h.

References _parent, and gutz::vec2ui.

gutz::vec3f gutz::Manip::getScreenPosLocal const gutz::vec3f lpos  )  const [inline, virtual]
 

You have a point in LOCAL space and want it in SCREEN space SCREEN<-LOCAL.

Implements gutz::BaseManip.

Definition at line 338 of file Manip.h.

References _om, and _parent.

Referenced by getRad(), and gutz::RotateManipEvent::handleEvent().

virtual gutz::mat4f gutz::Manip::getScreenTransform  )  const [inline, virtual]
 

get the screen transform, SCREEN<-PROJECT this is wierd because you must apply the Project transform, then divide by w, then apply the screen transform.

Implements gutz::BaseManip.

Definition at line 164 of file Manip.h.

References _parent, and gutz::mat4f_id.

unsigned int gutz::Manip::getScreenX  )  const [inline, virtual]
 

Implements gutz::BaseManip.

Definition at line 276 of file Manip.h.

References _parent.

Referenced by getRad(), and gutz::RotateManipEvent::handleEvent().

unsigned int gutz::Manip::getScreenY  )  const [inline, virtual]
 

Implements gutz::BaseManip.

Definition at line 278 of file Manip.h.

References _parent.

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

bool gutz::BaseManip::getTumble  )  const [inline, inherited]
 

Definition at line 209 of file baseManip.h.

References gutz::BaseManip::_tumble.

gutz::vec3f gutz::Manip::getWorldDirLocal const gutz::vec3f ldir  )  const [inline, virtual]
 

WORLD<-LOCAL dir, You have a vector (direction) in WORLD, you want it in LOCAL.

Implements gutz::BaseManip.

Definition at line 310 of file Manip.h.

References _om, and _parent.

gutz::vec3f gutz::Manip::getWorldEyeRayScreen const gutz::vec3f spos  )  const [inline, virtual]
 

get a World direction through a Screen point from the eye

Implements gutz::BaseManip.

Definition at line 368 of file Manip.h.

References _parent.

gutz::vec3f gutz::Manip::getWorldEyeRayWorld const gutz::vec3f wpos  )  const [inline, virtual]
 

get a World direction through a World point from the eye

Implements gutz::BaseManip.

Definition at line 371 of file Manip.h.

References _parent.

gutz::mat3f gutz::BaseManip::getWorldOrient  )  const [inline, inherited]
 

Definition at line 187 of file baseManip.h.

References gutz::BaseManip::getLocalOrient(), gutz::BaseManip::getWorldQuat(), and gutz::mat3f.

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

Definition at line 177 of file baseManip.h.

References gutz::BaseManip::getLocalPos(), and gutz::BaseManip::getParent().

Referenced by gutz::Camera::getLocalEyeRayLocal(), and gutz::Camera::getLocalEyeRayScreen().

gutz::vec3f gutz::Manip::getWorldPosLocal const gutz::vec3f lpos  )  const [inline, virtual]
 

You have a LOCAL point and you want it in WORLD space WORLD<-LOCAL.

Implements gutz::BaseManip.

Definition at line 304 of file Manip.h.

References _om, and _parent.

gutz::quatf gutz::Manip::getWorldQuat  )  const [inline, virtual]
 

get the quaternion for rotation: WORLD<-LOCAL

Implements gutz::BaseManip.

Definition at line 200 of file Manip.h.

References _parent, and getLocalQuat().

gutz::mat4f gutz::Manip::getWorldTransform  )  const [inline, virtual]
 

get the world transform: WORLD<-LOCAL

Implements gutz::BaseManip.

Definition at line 179 of file Manip.h.

References _om, and _parent.

void Manip::insertParent const BaseManipSP  parent  )  [virtual]
 

inserts parent just above this one

can't insert a "0" parent, use setParent()

we currently have a parent

if our new parent is a camera

and our current parent is a camera

exchange old camera for new one

new parent isn't a camera, just insert new parent between current and us

Reimplemented from gutz::BaseManip.

Definition at line 186 of file Manip.cpp.

References _parent.

Referenced by setCamera().

bool gutz::Manip::isCamera  )  const [inline, virtual]
 

Implements gutz::BaseManip.

Definition at line 117 of file Manip.h.

bool gutz::Manip::isManip  )  const [inline, virtual]
 

Implements gutz::BaseManip.

Definition at line 118 of file Manip.h.

bool Manip::mouse const MouseEvent me  )  [virtual]
 

Implements gutz::BaseManip.

Definition at line 314 of file Manip.cpp.

References gutz::CameraEvent::getCamera(), and setCamera().

bool Manip::move const MouseMoveEvent mme  )  [virtual]
 

Implements gutz::BaseManip.

Definition at line 320 of file Manip.cpp.

Manip & Manip::operator= const Manip m  ) 
 

assignment, copies everything but events, including the parent

Definition at line 76 of file Manip.cpp.

References _baked, _center, _currquat, _objtrackquat, _oinv, _om, _parent, _rad, and _userRad.

void gutz::Manip::removeParent  )  [inline]
 

replaces parent with our parent's parent.

Definition at line 240 of file Manip.h.

References _parent.

bool Manip::serialData std::ostream &  os,
const std::string  indent = std::string("")
[virtual]
 

serialize the data parts of this guy for momentos & transmission

Reimplemented from gutz::BaseManip.

Definition at line 285 of file Manip.cpp.

References _om, and MAT_STR().

Referenced by serialize().

bool Manip::serialize std::ostream &  os,
const std::string  indent = std::string("")
[virtual]
 

Serialization.

write.

Reimplemented from gutz::BaseManip.

Definition at line 243 of file Manip.cpp.

References DATA_STR(), END_SECTION_STR(), serialData(), and string.

virtual void gutz::Manip::setCamera const gutz::CameraSP  cam  )  [inline, virtual]
 

Definition at line 250 of file Manip.h.

References gutz::BaseManip::BaseManipSP, and insertParent().

Referenced by mouse().

void Manip::setCenter const vec3f center  ) 
 

Set the center of rotation, in LOCAL space.

Definition at line 135 of file Manip.cpp.

References _center, _om, and setMatrix().

void gutz::Manip::setCenterQuat const quatf cq  )  [inline]
 

set the quaternion associated with rotation around the center

Definition at line 132 of file Manip.h.

References _currquat, and updateMatrix().

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

void Manip::setLocalPos const vec3f pos  )  [virtual]
 

Implements gutz::BaseManip.

Definition at line 147 of file Manip.cpp.

References _baked, getLocalPos(), and updateMatrix().

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

void Manip::setLocalQuat const quatf lq  )  [virtual]
 

Implements gutz::BaseManip.

Definition at line 142 of file Manip.cpp.

References _om, gutz::mat3f, gutz::mat4f, and setMatrix().

void Manip::setMatrix const gutz::mat4f m  ) 
 

Definition at line 160 of file Manip.cpp.

References _baked, _currquat, _oinv, _om, and gutz::quatf_id.

Referenced by setCenter(), and setLocalQuat().

void Manip::setParent const BaseManipSP  parent  )  [virtual]
 

Reimplemented from gutz::BaseManip.

Definition at line 178 of file Manip.cpp.

References _parent.

void gutz::Manip::setRad float  rad  )  [inline]
 

Set the radius of rotation, set to 0.0 if you want default radius behavior.

Definition at line 136 of file Manip.h.

References _userRad.

void gutz::BaseManip::setTumble bool  on  )  [inline, inherited]
 

Definition at line 208 of file baseManip.h.

References gutz::BaseManip::_tumble.

virtual void gutz::BaseManip::setWorldPos const vec3f wpos  )  [inline, virtual, inherited]
 

Definition at line 181 of file baseManip.h.

References gutz::BaseManip::getLocalPosWorld(), gutz::BaseManip::getParent(), and gutz::BaseManip::setLocalPos().

void Manip::tumble float  speed = 1  )  [virtual]
 

Update tumble "speed" amout.

Reimplemented from gutz::BaseManip.

Definition at line 325 of file Manip.cpp.

bool Manip::unserialData std::istream &  is  )  [virtual]
 

frustum

clips

Reimplemented from gutz::BaseManip.

Definition at line 297 of file Manip.cpp.

References _currquat, _om, MAT_STR(), string, and unserialKeyCheck().

Referenced by unserialize().

bool Manip::unserialize std::istream &  is  )  [virtual]
 

read.

unserial data

Reimplemented from gutz::BaseManip.

Definition at line 262 of file Manip.cpp.

References DATA_STR(), END_SECTION_STR(), string, unserialData(), and unserialKeyCheck().

void Manip::updateMatrix  )  [protected]
 

Definition at line 169 of file Manip.cpp.

References _oinv, _om, and buildMatrix().

Referenced by setCenterQuat(), and setLocalPos().


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

mat4f gutz::Manip::_baked [protected]
 

Definition at line 432 of file Manip.h.

Referenced by buildMatrix(), getCamQuat(), operator=(), setLocalPos(), and setMatrix().

vec3f gutz::Manip::_center [protected]
 

Definition at line 431 of file Manip.h.

Referenced by buildMatrix(), getCenter(), getRad(), operator=(), and setCenter().

unsigned int gutz::BaseManip::_currentMode [protected, inherited]
 

Current mode.

Definition at line 303 of file baseManip.h.

Referenced by gutz::Camera::mouse(), and gutz::Camera::tumble().

float gutz::BaseManip::_currentSpeed [protected, inherited]
 

Current speed.

Definition at line 304 of file baseManip.h.

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

quatf gutz::Manip::_currquat [protected]
 

eventually we could nuke these, they are just cached

Definition at line 436 of file Manip.h.

Referenced by buildMatrix(), getCenterQuat(), operator=(), setCenterQuat(), setMatrix(), and unserialData().

float gutz::BaseManip::_lastd [protected, inherited]
 

Last distance traveled.

Definition at line 307 of file baseManip.h.

Referenced by gutz::Camera::handleCamera(), and gutz::Camera::tumble().

quatf gutz::Manip::_objtrackquat [protected]
 

Definition at line 437 of file Manip.h.

Referenced by operator=().

mat4f gutz::Manip::_oinv [protected]
 

Definition at line 434 of file Manip.h.

Referenced by getInvEyeTransform(), getInvLocalTransform(), getInvMatrix(), getInvProjectTransform(), getInvWorldTransform(), getLocalDirWorld(), getLocalEyeRayLocal(), getLocalEyeRayScreen(), getLocalPosEye(), getLocalPosScreen(), getLocalPosWorld(), operator=(), setMatrix(), and updateMatrix().

mat4f gutz::Manip::_om [protected]
 

Definition at line 434 of file Manip.h.

Referenced by getEyePosLocal(), getEyeTransform(), getLocalEyeRayLocal(), getLocalOrient(), getLocalPos(), getLocalQuat(), getLocalTransform(), getMatrix(), getProjectTransform(), getScreenPosLocal(), getWorldDirLocal(), getWorldPosLocal(), getWorldTransform(), operator=(), serialData(), setCenter(), setLocalQuat(), setMatrix(), unserialData(), and updateMatrix().

BaseManipSP gutz::Manip::_parent [protected]
 

who is above us in the transform chain?

Definition at line 439 of file Manip.h.

Referenced by getCamera(), getCamQuat(), getEyePosLocal(), getEyeQuat(), getEyeTransform(), getInvEyeTransform(), getInvProjection(), getInvProjectTransform(), getInvScreenTransform(), getInvWorldQuat(), getInvWorldTransform(), getLocalDirWorld(), getLocalEyeRayLocal(), getLocalEyeRayScreen(), getLocalPosEye(), getLocalPosScreen(), getLocalPosWorld(), getLocalViewDir(), getParent(), getProjection(), getProjectTransform(), getScreen(), getScreenPosLocal(), getScreenTransform(), getScreenX(), getScreenY(), getWorldDirLocal(), getWorldEyeRayScreen(), getWorldEyeRayWorld(), getWorldPosLocal(), getWorldQuat(), getWorldTransform(), insertParent(), operator=(), removeParent(), and setParent().

float gutz::Manip::_rad [protected]
 

Definition at line 429 of file Manip.h.

Referenced by getRad(), and operator=().

bool gutz::BaseManip::_tumble [protected, inherited]
 

Tumble on???

Definition at line 299 of file baseManip.h.

Referenced by gutz::BaseManip::BaseManip(), gutz::BaseManip::getTumble(), gutz::BaseManip::setTumble(), and gutz::Camera::tumble().

float gutz::Manip::_userRad [protected]
 

Definition at line 430 of file Manip.h.

Referenced by getRad(), operator=(), and setRad().

gutz::Manip::HAS_SLOTS
 

Definition at line 104 of file Manip.h.


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