#include <Camera.h>
Inheritance diagram for gutz::Camera:
This object maintains the Projection and View matricies. It also handles VIEWPORT transforms implicitly, you can take SCREEN space points (0-SX)(0-SY)(0-1) and get them either in EYE space or WORLD space. Where:
Definition at line 68 of file Camera.h.
Transformations | |
get the projection transform, PROJECTION<-LOCAL | |
gutz::mat4f | getProjectTransform () const |
get the projection transform, PROJECTION<-LOCAL | |
gutz::mat4f | getInvProjectTransform () const |
get the inverse projection transform, PROJECTION->LOCAL | |
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. | |
gutz::mat4f | getInvScreenTransform () const |
get the inverse screen transform, SCREEN->LOCAL | |
gutz::mat4f | getEyeTransform () const |
get the eye transform: EYE<-LOCAL, | |
gutz::mat4f | getWorldTransform () const |
get the world transform: WORLD<-LOCAL (Identity) | |
gutz::mat4f | getLocalTransform () const |
get the transform that this manipulator defines | |
gutz::mat4f | getInvEyeTransform () const |
get the inverse eye transform: EYE->LOCAL | |
gutz::mat4f | getInvWorldTransform () const |
get the inverse world transform: WORLD->LOCAL (Identity) | |
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 the total rotation in this chain gutz::quatf getEyeQuat() const { return _camquat; } | |
gutz::quatf | getInvEyeQuat () const |
get the inverse quaternion for rotation from EYE to this space | |
gutz::quatf | getWorldQuat () const |
get the quaternion for rotation: WORLD<-LOCAL (Identity) | |
gutz::quatf | getInvWorldQuat () const |
get the inverse quaternion for rotation: WORLD->LOCAL (Identity) | |
gutz::quatf | getLocalQuat () const |
get the local quaternion for rotation | |
gutz::quatf | getInvLocalQuat () const |
get the inverse local quaterinion for rotation | |
Get/Set Camera specific Matricies | |
mat4f | getViewportMatrix () const |
transform from PROJECTION space to screen space (from device normalized coords) right now this object does not own the viewport, so.. | |
mat4f | getInvViewportMatrix () const |
const mat4f & | getProjectMatrix () const |
const mat4f & | getInvProjectMatrix () const |
void | setProjectMatrix (const mat4f &m) |
external set projection | |
const mat4f & | getViewMatrix () const |
const mat4f & | getInvViewMatrix () const |
void | setViewMatrix (const mat4f &m) |
external set view, takes a guess at eye/at/up but probably a bad one | |
mat4f | getInvMatrix () const |
quatf | getCamQuat () const |
Position & orientation | |
gutz::vec3f | getLocalPos () const |
void | setLocalPos (const vec3f &pos) |
gutz::mat3f | getLocalOrient () const |
void | setLocalQuat (const quatf &lq) |
TODO: implement this!!! | |
Serialization. | |
virtual bool | serialize (std::ostream &os, const std::string indent=std::string("")) |
write. | |
virtual bool | unserialize (std::istream &is) |
read. | |
virtual bool | serialState (std::ostream &os, const std::string indent=std::string("")) |
serialize specific parts state, first all of it, then the specific ones. | |
virtual bool | unserialState (std::istream &is) |
virtual bool | serialEventMap (std::ostream &os, const std::string indent=std::string("")) |
virtual bool | serialParamMap (std::ostream &os, const std::string indent=std::string("")) |
virtual bool | unserialEventMap (std::istream &is) |
virtual bool | unserialParamMap (std::istream &is) |
virtual bool | serialData (std::ostream &os, const std::string indent=std::string("")) |
specific parts of this object serialize the data parts of this guy for momentos & transmission | |
virtual bool | unserialData (std::istream &is) |
Clipping planes, | |
virtual void | setClips (float nearClip, float farClip) |
Keep this current. | |
virtual gutz::vec2f | getClips () const |
virtual float | getNearClip () const |
virtual float | getFarClip () const |
LookAt functions | |
virtual void | setEyePos (vec3f eyePos) |
virtual void | setLookAt (vec3f lookat) |
virtual void | setUpVec (vec3f upvec) |
virtual const vec3f & | getEyePos () const |
virtual const vec3f & | getLookAt () const |
virtual const vec3f & | getUpVec () const |
virtual vec3f | getXVec () const |
virtual vec3f | getViewDir () const |
virtual float | getFocalLength () const |
Screen size functions | |
Keep this current. | |
void | setScreen (unsigned int x, unsigned int y) |
gutz::vec2ui | getScreen () const |
unsigned int | getScreenX () const |
unsigned int | getScreenY () const |
Projection | |
assumes you have set clips & screen first | |
virtual void | setPerspective (float fov) |
Sets the projection matrix based on a field of view. | |
virtual void | setFrustum (float left, float right, float bottom, float top) |
Sets the frustum explicitly, perspective. | |
gutz::vec4f | getFrustum () const |
Gets the current frustum, valid wether set via Perspective, Frustum, or Ortho. | |
virtual void | setOrtho (float left, float right, float bottom, float top) |
Sets the projection matrix to Orthographic. | |
bool | isOrtho () const |
check if we are orthographic | |
Project, Unproject, & space conversions | |
gutz::vec3f | getLocalPosWorld (const gutz::vec3f &wpos) const |
You have a point in WORLD space and now you want it in "this" (WORLD) manipulators space. | |
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, identity WORLD<-WORLD. | |
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 |
You have a point in SCREEN space and now you want it in LOCAL/WORLD space SCREEN->WORLD. | |
gutz::vec3f | getScreenPosLocal (const gutz::vec3f &lpos) const |
You have a point in LOCAL space and want it in SCREEN space SCREEN<-LOCAL, you may have to flip the y pos (screenY - pos::y). | |
gutz::vec3f | getEyePosScreen (const gutz::vec3f &scrPos) const |
Get pick pos from SCREEN (x,y,z), return in EYE space z should be in [0,1] range: 0 = nearClip, 1 = farClip . | |
gutz::vec3f | getPickPos (const gutz::vec3f &scrPos) const |
Get pick pos, takes SCREEN space (x,y,z) and returns the point in WORLD space,. | |
template<class T> gutz::vec3f | getPickPos (const T x, const T y) const |
Get pick pos, takes SCREEN space (x,y) and returns point on near clip in WORLD space,. | |
template<class T> gutz::vec3f | getPickPos (const gutz::vec2< T > &p) const |
Get pick pos, takes SCREEN space (x,y) and returns point on near clip in WORLD space, same as above. | |
gutz::ray3f | getRay (float x, float y) const |
Get the ray from the eye pointing toward a point on the near clip. | |
gutz::ray3f | getRayWorld (gutz::vec3f pos) const |
much like getRay, but for a world space point. | |
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 | |
Handle mouse events | |
returns false if there are no valid events. | |
virtual void | mapEvent (unsigned int event, unsigned int button, float speed=1.0f) |
unsigned int | getEvent (const MouseEvent &me) const |
float | getSpeed (const MouseEvent &me) const |
virtual bool | mouse (const MouseEvent &me) |
mouse up/down | |
virtual bool | move (const MouseMoveEvent &mme) |
move mouse | |
Tumble | |
virtual void | tumble (float speed=1) |
Update tumble "speed" steps. | |
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 |
Behavior implementation | |
virtual bool | handleCamera (const gutz::MouseMoveEvent &mme) |
virtual void | cameraRot (const gutz::MouseMoveEvent &mme) |
virtual void | cameraTrans (const gutz::MouseMoveEvent &mme, vec3f dxAxis, vec3f dyAxis) |
virtual void | cameraRotAxis (const gutz::MouseMoveEvent &mme, vec3f dxAxis, vec3f dyAxis) |
virtual void | cameraSwivel (const gutz::MouseMoveEvent &mme) |
virtual void | cameraZoom (const gutz::MouseMoveEvent &mme) |
Public Types | |
typedef gutz::SmartPtr< BaseManip > | BaseManipSP |
Public Member Functions | |
Camera () | |
Construtor intiallizes class reasonably, but needs window dimensions. | |
Camera (const Camera &cam) | |
virtual | ~Camera () |
bool | isCamera () const |
bool | isManip () const |
Camera * | getCamera () const |
cameras don't have cameras!!! | |
virtual gutz::SmartPtr< BaseManip > | getParent () const |
Tranformation chains (for Manip) interface Manip basically implements a linked list of manipulators that can be strung together. | |
virtual void | setParent (const BaseManipSP parent) |
virtual void | insertParent (const BaseManipSP parent) |
Protected Types | |
enum | { FRUST_LEFT = 0, FRUST_RIGHT = 1, FRUST_TOP = 2, FRUST_BOTTOM = 3 } |
index names of frustum entries More... | |
Protected Member Functions | |
void | _setProjectMatrix (const mat4f &m) |
internal set projection | |
void | _setViewMatrix (const mat4f &m) |
internal set view | |
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::vec2ui | _screen |
screen size | |
gutz::vec4ui | _viewport |
viewport | |
gutz::vec4f | _frustum |
view frustum | |
gutz::vec2f | _clips |
Clipping planes. | |
mat4f | _cm |
mat4f | _pm |
mat4f | _cinv |
mat4f | _pinv |
Camera & projection matrices. | |
vec3f | _eyePos |
vec3f | _lookat |
vec3f | _upvec |
Current Lookat parameters. | |
quatf | _camquat |
Quaternions for rotation. | |
vec3f | _lastEyePos |
"temporary" vectors for events | |
vec3f | _lastLookat |
"temporary" vectors for events | |
quatf | _camtrackquat |
"temporary" quaternions for tumbling (track is a bad name joe!!) | |
quatf | _swivtrackquat |
"temporary" quaternions for tumbling (track is a bad name joe!!) | |
bool | _ortho |
are we orthographic or perspective | |
EventKeyMap | _keymap |
maps buttons/keys to events | |
EventParamMap | _speedmap |
speed for some event | |
bool | _tumble |
Tumble on??? | |
unsigned int | _currentMode |
Current mode. | |
float | _currentSpeed |
Current speed. | |
float | _lastd |
Last distance traveled. | |
Friends | |
class | SmartPtr |
class | SmartPtrRef |
|
Definition at line 85 of file baseManip.h. Referenced by gutz::Manip::setCamera(). |
|
index names of frustum entries
|
|
Construtor intiallizes class reasonably, but needs window dimensions. Intiallized values: Near Clip = 1.0, Far Clip = 100.0, Win size = (0,0), Camera Matrix = identity, Object Matrix = identity, Eye pos = (0,0,20), Lookat = (0,0,0), Up = (0,1,0), Frustum = (-1,1,-1,1), Left Mouse = Object rotation, Right mouse = Dolly Definition at line 51 of file Camera.cpp. References _eyePos, _lookat, _setViewMatrix(), _upvec, gutz::look_at(), gutz::mat4f_id, and setFrustum(). |
|
Definition at line 78 of file Camera.cpp. |
|
Definition at line 99 of file Camera.cpp. |
|
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(). |
|
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. |
|
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(). |
|
internal set projection
Definition at line 153 of file Camera.cpp. Referenced by setFrustum(), setOrtho(), setPerspective(), and setProjectMatrix(). |
|
internal set view
Definition at line 170 of file Camera.cpp. Referenced by Camera(), cameraRot(), cameraRotAxis(), cameraSwivel(), cameraTrans(), setEyePos(), setLookAt(), setUpVec(), setViewMatrix(), and tumble(). |
|
scale and bias pick points (on screen) to (-1,1) range pt = (2*pt - sz)/sz Definition at line 723 of file Camera.cpp. References _camquat, _camtrackquat, _eyePos, _lookat, _screen, _setViewMatrix(), _upvec, getFocalLength(), gutz::MouseMoveEvent::getLast(), gutz::MouseEvent::getPos(), gutz::look_at(), gutz::mat3f, gutz::quatf, gutz::trackball(), gutz::vec2f, and gutz::vec3f. Referenced by handleCamera(). |
|
Definition at line 767 of file Camera.cpp. References _camquat, gutz::BaseManip::_currentSpeed, _eyePos, _lookat, _setViewMatrix(), _upvec, gutz::MouseMoveEvent::getDel(), gutz::look_at(), M_PI, gutz::mat3f, gutz::quatf, gutz::vec3f, and gutz::vec3f_zero. Referenced by handleCamera(). |
|
Definition at line 794 of file Camera.cpp. References _camquat, _eyePos, _lastLookat, _lookat, _screen, _setViewMatrix(), _swivtrackquat, _upvec, gutz::MouseMoveEvent::getLast(), gutz::MouseEvent::getPos(), gutz::look_at(), gutz::mat3f, gutz::quatf, gutz::trackball(), gutz::vec2f, and gutz::vec3f. Referenced by handleCamera(). |
|
Definition at line 746 of file Camera.cpp. References _cm, gutz::BaseManip::_currentSpeed, _eyePos, _lookat, _setViewMatrix(), _upvec, gutz::MouseMoveEvent::getDel(), gutz::look_at(), gutz::quatf, gutz::vec3f, and x. Referenced by handleCamera(). |
|
scale is equal to the total move (dx + dy) compute current frustum's width compute the center of current frustum compute new width (old width * scale) and divide by two orthographic projection frustum... or: perspective frustum Definition at line 693 of file Camera.cpp. References _frustum, _ortho, _screen, FRUST_BOTTOM, FRUST_LEFT, FRUST_RIGHT, FRUST_TOP, gutz::MouseMoveEvent::getDel(), scale, setFrustum(), setOrtho(), and gutz::vec2f. Referenced by handleCamera(). |
|
cameras don't have cameras!!!
Implements gutz::BaseManip. |
|
Definition at line 146 of file Camera.h. References _camquat, and gutz::quatf. |
|
Definition at line 188 of file Camera.h. References _clips. |
|
Definition at line 108 of file Camera.cpp. References _keymap, gutz::MouseEvent::getButton(), and gutz::MouseEvent::isButtonDown(). Referenced by handleCamera(), and mouse(). |
|
Definition at line 201 of file Camera.h. References _eyePos, and gutz::vec3f. Referenced by getFocalLength(), getRay(), getRayWorld(), and getViewDir(). |
|
You have a LOCAL space point and want it in EYE space EYE<-LOCAL.
Implements gutz::BaseManip. Definition at line 267 of file Camera.h. References _cm. |
|
Get pick pos from SCREEN (x,y,z), return in EYE space z should be in [0,1] range: 0 = nearClip, 1 = farClip
Definition at line 287 of file Camera.h. References _pinv, getScreenY(), and gutz::vec4f. Referenced by getLocalPosScreen(). |
|
get the quaternion that expresses the total rotation in this chain gutz::quatf getEyeQuat() const { return _camquat; }
Implements gutz::BaseManip. Definition at line 111 of file Camera.h. References _cm, and gutz::quatf. Referenced by getInvEyeQuat(). |
|
get the eye transform: EYE<-LOCAL,
Implements gutz::BaseManip. Definition at line 94 of file Camera.h. References _cm. |
|
Definition at line 417 of file Camera.cpp. References _clips. |
|
Definition at line 208 of file Camera.h. References getEyePos(), and getLookAt(). Referenced by cameraRot(). |
|
Gets the current frustum, valid wether set via Perspective, Frustum, or Ortho.
Definition at line 234 of file Camera.h. References _frustum. |
|
get the inverse quaternion for rotation from EYE to this space
Implements gutz::BaseManip. Definition at line 113 of file Camera.h. References getEyeQuat(). |
|
get the inverse eye transform: EYE->LOCAL
Implements gutz::BaseManip. Definition at line 100 of file Camera.h. References _cinv. |
|
get the inverse local quaterinion for rotation
Implements gutz::BaseManip. Definition at line 121 of file Camera.h. References _camquat. |
|
get the inverse transform that this manipulator defines
Implements gutz::BaseManip. Definition at line 104 of file Camera.h. References _cinv. |
|
Definition at line 145 of file Camera.h. References _cinv, _pinv, and gutz::mat4f. |
|
get the inverse projection matrix (inverse of getProjection())
Implements gutz::BaseManip. Definition at line 108 of file Camera.h. References _pinv. |
|
Definition at line 140 of file Camera.h. References _pinv, and gutz::mat4f. |
|
get the inverse projection transform, PROJECTION->LOCAL
Implements gutz::BaseManip. |
|
get the inverse screen transform, SCREEN->LOCAL
Implements gutz::BaseManip. Definition at line 92 of file Camera.h. References getInvViewportMatrix(). |
|
Definition at line 143 of file Camera.h. References _cinv, and gutz::mat4f. |
|
Definition at line 138 of file Camera.cpp. References _screen, and gutz::mat4f. Referenced by getInvScreenTransform(). |
|
get the inverse quaternion for rotation: WORLD->LOCAL (Identity)
Implements gutz::BaseManip. Definition at line 117 of file Camera.h. References gutz::quatf_id. |
|
get the inverse world transform: WORLD->LOCAL (Identity)
Implements gutz::BaseManip. Definition at line 102 of file Camera.h. References gutz::mat4f. |
|
WORLD->LOCAL dir, You have a vector (direction) in WORLD, you want it in LOCAL.
Implements gutz::BaseManip. |
|
get a LOCAL direction (ray) through a LOCAL point from the eye
Implements gutz::BaseManip. Definition at line 359 of file Camera.h. References getViewDir(), gutz::BaseManip::getWorldPos(), and isOrtho(). Referenced by getWorldEyeRayWorld(). |
|
get a LOCAL direction through a SCREEN point from the eye
Implements gutz::BaseManip. Definition at line 365 of file Camera.h. References getLocalPosScreen(), getViewDir(), gutz::BaseManip::getWorldPos(), and isOrtho(). Referenced by getWorldEyeRayScreen(). |
|
Implements gutz::BaseManip. Definition at line 155 of file Camera.h. References _cm. |
|
Implements gutz::BaseManip. Definition at line 152 of file Camera.h. References _eyePos. |
|
You have an EYE space point and want it in LOCAL space EYE->LOCAL.
Implements gutz::BaseManip. Definition at line 263 of file Camera.h. References _cinv. |
|
You have a point in SCREEN space and now you want it in LOCAL/WORLD space SCREEN->WORLD.
Implements gutz::BaseManip. Definition at line 271 of file Camera.h. References _cinv, and getEyePosScreen(). Referenced by getLocalEyeRayScreen(), and getPickPos(). |
|
You have a point in WORLD space and now you want it in "this" (WORLD) manipulators space. WORLD->WORLD space, identity transform. Implements gutz::BaseManip. |
|
get the local quaternion for rotation
Implements gutz::BaseManip. Definition at line 119 of file Camera.h. References _camquat. |
|
get the transform that this manipulator defines
Implements gutz::BaseManip. Definition at line 98 of file Camera.h. References _cm. |
|
get the View direction in LOCAL space
Implements gutz::BaseManip. Definition at line 377 of file Camera.h. References getViewDir(). |
|
Definition at line 202 of file Camera.h. References _lookat, and gutz::vec3f. Referenced by getFocalLength(), and getViewDir(). |
|
Definition at line 412 of file Camera.cpp. References _clips. |
|
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 in gutz::Manip. Definition at line 105 of file baseManip.h. Referenced by gutz::BaseManip::getWorldPos(), and gutz::BaseManip::setWorldPos(). |
|
Get pick pos, takes SCREEN space (x,y) and returns point on near clip in WORLD space, same as above.
Definition at line 319 of file Camera.h. References getPickPos(), gutz::vec2< T >::x, and gutz::vec2< T >::y. |
|
Get pick pos, takes SCREEN space (x,y) and returns point on near clip in WORLD space,.
Definition at line 310 of file Camera.h. References getPickPos(), x, and y. |
|
Get pick pos, takes SCREEN space (x,y,z) and returns the point in WORLD space,.
Definition at line 301 of file Camera.h. References getLocalPosScreen(). Referenced by getPickPos(). |
|
get the projection matrix currently associated with this transform chain
Implements gutz::BaseManip. Definition at line 106 of file Camera.h. References _pm. |
|
Definition at line 139 of file Camera.h. References _pm, and gutz::mat4f. |
|
get the projection transform, PROJECTION<-LOCAL
Implements gutz::BaseManip. |
|
Get the ray from the eye pointing toward a point on the near clip. x,y given in SCREEN Space, returns ray in WORLD space. Needed since there is an algorithmic difference between ray computation with perspective and ortho projections, and we could like to have algorithms that don't care what "kind" of camera it is. Definition at line 332 of file Camera.h. References getEyePos(), getViewDir(), isOrtho(), gutz::ray3f, x, and y. |
|
much like getRay, but for a world space point. returns the ray from the eye through the given point Definition at line 343 of file Camera.h. References getEyePos(), getViewDir(), isOrtho(), and gutz::ray3f. |
|
Implements gutz::BaseManip. Definition at line 218 of file Camera.h. References _screen. |
|
You have a point in LOCAL space and want it in SCREEN space SCREEN<-LOCAL, you may have to flip the y pos (screenY - pos::y).
Implements gutz::BaseManip. Definition at line 275 of file Camera.h. References _cm, _pm, _screen, and gutz::vec4f. |
|
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 90 of file Camera.h. References getViewportMatrix(). |
|
Implements gutz::BaseManip. Definition at line 219 of file Camera.h. References _screen. |
|
Implements gutz::BaseManip. Definition at line 220 of file Camera.h. References _screen. Referenced by getEyePosScreen(). |
|
Definition at line 117 of file Camera.cpp. References _speedmap, and gutz::MouseEvent::getButton(). Referenced by mouse(). |
|
Definition at line 209 of file baseManip.h. References gutz::BaseManip::_tumble. |
|
Definition at line 203 of file Camera.h. References _upvec, and gutz::vec3f. |
|
Definition at line 206 of file Camera.h. References getEyePos(), getLookAt(), and gutz::vec3f. Referenced by getLocalEyeRayLocal(), getLocalEyeRayScreen(), getLocalViewDir(), getRay(), and getRayWorld(). |
|
Definition at line 142 of file Camera.h. References _cm, and gutz::mat4f. |
|
transform from PROJECTION space to screen space (from device normalized coords) right now this object does not own the viewport, so.. we are just using the viewport (0,0,w,h), need to fix that!!! Definition at line 128 of file Camera.cpp. References _screen, and gutz::mat4f. Referenced by getScreenTransform(). |
|
WORLD<-LOCAL dir, You have a vector (direction) in WORLD, you want it in LOCAL.
Implements gutz::BaseManip. |
|
get a World direction through a Screen point from the eye
Implements gutz::BaseManip. Definition at line 371 of file Camera.h. References getLocalEyeRayScreen(). |
|
get a World direction through a World point from the eye
Implements gutz::BaseManip. Definition at line 374 of file Camera.h. References getLocalEyeRayLocal(). |
|
Definition at line 187 of file baseManip.h. References gutz::BaseManip::getLocalOrient(), gutz::BaseManip::getWorldQuat(), and gutz::mat3f. |
|
Definition at line 177 of file baseManip.h. References gutz::BaseManip::getLocalPos(), and gutz::BaseManip::getParent(). Referenced by getLocalEyeRayLocal(), and getLocalEyeRayScreen(). |
|
You have a LOCAL point and you want it in WORLD space, identity WORLD<-WORLD.
Implements gutz::BaseManip. |
|
get the quaternion for rotation: WORLD<-LOCAL (Identity)
Implements gutz::BaseManip. Definition at line 115 of file Camera.h. References gutz::quatf_id. |
|
get the world transform: WORLD<-LOCAL (Identity)
Implements gutz::BaseManip. Definition at line 96 of file Camera.h. References gutz::mat4f. |
|
Definition at line 204 of file Camera.h. References _eyePos, _lookat, _upvec, gutz::vec3f, and z. |
|
last delta, for deciding if we should tumble Definition at line 625 of file Camera.cpp. References gutz::BaseManip::_lastd, gutz::CAM_DOLLY, gutz::CAM_MODE_NONE, gutz::CAM_PITCH, gutz::CAM_ROLL, gutz::CAM_ROT, gutz::CAM_SWIVEL, gutz::CAM_TRANS_XY, gutz::CAM_TRANS_XZ, gutz::CAM_TRANS_ZY, gutz::CAM_YAW, gutz::CAM_ZOOM, cameraRot(), cameraRotAxis(), cameraSwivel(), cameraTrans(), cameraZoom(), gutz::g_abs(), gutz::g_max(), gutz::MouseMoveEvent::getDel(), getEvent(), gutz::vec3f_neg_y, gutz::vec3f_x, gutz::vec3f_y, gutz::vec3f_z, and gutz::vec3f_zero. |
|
Reimplemented in gutz::Manip. Definition at line 108 of file baseManip.h. |
|
Implements gutz::BaseManip. |
|
Implements gutz::BaseManip. |
|
check if we are orthographic
Definition at line 238 of file Camera.h. References _ortho. Referenced by getLocalEyeRayLocal(), getLocalEyeRayScreen(), getRay(), and getRayWorld(). |
|
|
|
mouse up/down
Implements gutz::BaseManip. Definition at line 460 of file Camera.cpp. References _camtrackquat, _cinv, _cm, gutz::BaseManip::_currentMode, gutz::BaseManip::_currentSpeed, _eyePos, _lastEyePos, _lastLookat, _lookat, _pinv, _pm, _screen, _swivtrackquat, gutz::MouseEvent::getButton(), getEvent(), gutz::MouseEvent::getPos(), getSpeed(), gutz::GUTZ_DOWN_ARROW, gutz::GUTZ_LEFT_ARROW, gutz::GUTZ_RIGHT_ARROW, gutz::GUTZ_UP_ARROW, handleCamera(), gutz::isArrow(), gutz::MouseEvent::isButtonDown(), gutz::isMouse(), gutz::quatf_id, gutz::MouseMoveEvent::setPos(), gutz::vec3f, gutz::vec3f_x, and gutz::vec3f_y. |
|
move mouse
Implements gutz::BaseManip. Definition at line 514 of file Camera.cpp. References _cinv, _cm, _pinv, _pm, and handleCamera(). |
|
specific parts of this object serialize the data parts of this guy for momentos & transmission frustum clips Reimplemented from gutz::BaseManip. Definition at line 355 of file Camera.cpp. References _eyePos, _lookat, _upvec, EYE_POS_STR(), LOOK_AT_STR(), and UP_VEC_STR(). Referenced by serialize(). |
|
Definition at line 278 of file Camera.cpp. References _keymap. Referenced by serialState(). |
|
write. serial data Reimplemented from gutz::BaseManip. Reimplemented in gutz::Light. Definition at line 189 of file Camera.cpp. References DATA_STR(), END_SECTION_STR(), serialData(), serialState(), and string. |
|
Definition at line 293 of file Camera.cpp. References _keymap, and _speedmap. Referenced by serialState(). |
|
serialize specific parts state, first all of it, then the specific ones. serialState calls SerialEventMap & SerialParamMap & sets up tags Definition at line 233 of file Camera.cpp. References END_SECTION_STR(), EVENT_MAP_STR(), PARAM_MAP_STR(), serialEventMap(), serialParamMap(), and string. Referenced by serialize(). |
|
Keep this current.
Definition at line 405 of file Camera.cpp. References _clips, _frustum, FRUST_BOTTOM, FRUST_LEFT, FRUST_RIGHT, FRUST_TOP, setFrustum(), and gutz::vec2f. |
|
Definition at line 433 of file Camera.cpp. References _eyePos, _lookat, _setViewMatrix(), _upvec, and gutz::look_at(). Referenced by unserialData(). |
|
Sets the frustum explicitly, perspective.
Definition at line 544 of file Camera.cpp. References _clips, _frustum, _ortho, _setProjectMatrix(), FRUST_BOTTOM, FRUST_LEFT, FRUST_RIGHT, FRUST_TOP, and gutz::frustum(). Referenced by Camera(), cameraZoom(), setClips(), and unserialData(). |
|
Implements gutz::BaseManip. Definition at line 153 of file Camera.h. References _cm. |
|
TODO: implement this!!!
Implements gutz::BaseManip. |
|
Definition at line 439 of file Camera.cpp. References _eyePos, _lookat, _setViewMatrix(), _upvec, and gutz::look_at(). Referenced by unserialData(). |
|
Sets the projection matrix to Orthographic.
Definition at line 556 of file Camera.cpp. References _clips, _frustum, _ortho, _setProjectMatrix(), FRUST_BOTTOM, FRUST_LEFT, FRUST_RIGHT, FRUST_TOP, and gutz::ortho(). Referenced by cameraZoom(). |
|
Reimplemented in gutz::Manip. Definition at line 107 of file baseManip.h. |
|
Sets the projection matrix based on a field of view.
Definition at line 528 of file Camera.cpp. References _clips, _frustum, _ortho, _screen, _setProjectMatrix(), FRUST_BOTTOM, FRUST_LEFT, FRUST_RIGHT, FRUST_TOP, gutz::frustum(), and m_PI. |
|
external set projection
Definition at line 147 of file Camera.cpp. References _setProjectMatrix(). |
|
Definition at line 425 of file Camera.cpp. References _screen, gutz::vec2ui, x, and y. |
|
Definition at line 208 of file baseManip.h. References gutz::BaseManip::_tumble. |
|
Definition at line 445 of file Camera.cpp. References _eyePos, _lookat, _setViewMatrix(), _upvec, and gutz::look_at(). Referenced by unserialData(). |
|
external set view, takes a guess at eye/at/up but probably a bad one
Definition at line 160 of file Camera.cpp. References _camquat, _cm, _eyePos, _lookat, _setViewMatrix(), _upvec, and gutz::vec3f. |
|
Definition at line 181 of file baseManip.h. References gutz::BaseManip::getLocalPosWorld(), gutz::BaseManip::getParent(), and gutz::BaseManip::setLocalPos(). |
|
Update tumble "speed" steps.
Reimplemented from gutz::BaseManip. Definition at line 571 of file Camera.cpp. References _camquat, _camtrackquat, gutz::BaseManip::_currentMode, _eyePos, gutz::BaseManip::_lastd, _lastEyePos, _lastLookat, _lookat, _setViewMatrix(), _swivtrackquat, gutz::BaseManip::_tumble, _upvec, gutz::CAM_ROT, gutz::CAM_SWIVEL, gutz::look_at(), gutz::mat3f, gutz::quatf, gutz::quatf_id, and gutz::vec3f. |
|
Eye AT Up Reimplemented from gutz::BaseManip. Definition at line 369 of file Camera.cpp. References _eyePos, _frustum, _lookat, _upvec, EYE_POS_STR(), FRUST_BOTTOM, FRUST_LEFT, FRUST_RIGHT, FRUST_TOP, LOOK_AT_STR(), setEyePos(), setFrustum(), setLookAt(), setUpVec(), string, unserialKeyCheck(), and UP_VEC_STR(). Referenced by unserialize(). |
|
Definition at line 308 of file Camera.cpp. References _keymap, and value. Referenced by unserialState(). |
|
read. unserial data Reimplemented from gutz::BaseManip. Reimplemented in gutz::Light. Definition at line 211 of file Camera.cpp. References DATA_STR(), END_SECTION_STR(), string, unserialData(), unserialKeyCheck(), and unserialState(). |
|
Definition at line 328 of file Camera.cpp. References _speedmap, and value. Referenced by unserialState(). |
|
unserial event map unserial param map Definition at line 254 of file Camera.cpp. References END_SECTION_STR(), EVENT_MAP_STR(), PARAM_MAP_STR(), string, unserialEventMap(), unserialKeyCheck(), and unserialParamMap(). Referenced by unserialize(). |
|
Definition at line 40 of file smartptr.h. Referenced by Nrro::NrroIter< T >::NrroIter(). |
|
Definition at line 41 of file smartptr.h. |
|
Quaternions for rotation.
Definition at line 449 of file Camera.h. Referenced by cameraRot(), cameraRotAxis(), cameraSwivel(), getCamQuat(), getInvLocalQuat(), getLocalQuat(), setViewMatrix(), and tumble(). |
|
"temporary" quaternions for tumbling (track is a bad name joe!!)
Definition at line 454 of file Camera.h. Referenced by cameraRot(), mouse(), and tumble(). |
|
Definition at line 445 of file Camera.h. Referenced by _setViewMatrix(), getInvEyeTransform(), getInvLocalTransform(), getInvMatrix(), getInvProjectTransform(), getInvViewMatrix(), getLocalPosEye(), getLocalPosScreen(), mouse(), and move(). |
|
Clipping planes.
Definition at line 443 of file Camera.h. Referenced by getClips(), getFarClip(), getNearClip(), setClips(), setFrustum(), setOrtho(), and setPerspective(). |
|
Definition at line 445 of file Camera.h. Referenced by _setViewMatrix(), cameraTrans(), getEyePosLocal(), getEyeQuat(), getEyeTransform(), getLocalOrient(), getLocalTransform(), getProjectTransform(), getScreenPosLocal(), getViewMatrix(), mouse(), move(), setLocalPos(), and setViewMatrix(). |
|
Current mode.
Definition at line 303 of file baseManip.h. |
|
Current speed.
Definition at line 304 of file baseManip.h. Referenced by cameraRotAxis(), cameraTrans(), and mouse(). |
|
Definition at line 447 of file Camera.h. Referenced by Camera(), cameraRot(), cameraRotAxis(), cameraSwivel(), cameraTrans(), getEyePos(), getLocalPos(), getXVec(), mouse(), serialData(), setEyePos(), setLookAt(), setUpVec(), setViewMatrix(), tumble(), and unserialData(). |
|
view frustum
Definition at line 441 of file Camera.h. Referenced by cameraZoom(), getFrustum(), setClips(), setFrustum(), setOrtho(), setPerspective(), and unserialData(). |
|
maps buttons/keys to events
Definition at line 460 of file Camera.h. Referenced by getEvent(), mapEvent(), serialEventMap(), serialParamMap(), and unserialEventMap(). |
|
Last distance traveled.
Definition at line 307 of file baseManip.h. Referenced by handleCamera(), and tumble(). |
|
"temporary" vectors for events
|
|
"temporary" vectors for events
Definition at line 452 of file Camera.h. Referenced by cameraSwivel(), mouse(), and tumble(). |
|
Definition at line 447 of file Camera.h. Referenced by Camera(), cameraRot(), cameraRotAxis(), cameraSwivel(), cameraTrans(), getLookAt(), getXVec(), mouse(), serialData(), setEyePos(), setLookAt(), setUpVec(), setViewMatrix(), tumble(), and unserialData(). |
|
are we orthographic or perspective
Definition at line 456 of file Camera.h. Referenced by cameraZoom(), isOrtho(), setFrustum(), setOrtho(), and setPerspective(). |
|
Camera & projection matrices.
Definition at line 445 of file Camera.h. Referenced by _setProjectMatrix(), getEyePosScreen(), getInvMatrix(), getInvProjection(), getInvProjectMatrix(), getInvProjectTransform(), mouse(), and move(). |
|
Definition at line 445 of file Camera.h. Referenced by _setProjectMatrix(), getProjection(), getProjectMatrix(), getProjectTransform(), getScreenPosLocal(), mouse(), and move(). |
|
screen size
Definition at line 433 of file Camera.h. Referenced by cameraRot(), cameraSwivel(), cameraZoom(), getInvViewportMatrix(), getScreen(), getScreenPosLocal(), getScreenX(), getScreenY(), getViewportMatrix(), mouse(), setPerspective(), and setScreen(). |
|
speed for some event
Definition at line 461 of file Camera.h. Referenced by getSpeed(), mapEvent(), serialParamMap(), and unserialParamMap(). |
|
"temporary" quaternions for tumbling (track is a bad name joe!!)
Definition at line 454 of file Camera.h. Referenced by cameraSwivel(), mouse(), and tumble(). |
|
Tumble on???
Definition at line 299 of file baseManip.h. Referenced by gutz::BaseManip::BaseManip(), gutz::BaseManip::getTumble(), gutz::BaseManip::setTumble(), and tumble(). |
|
Current Lookat parameters.
Definition at line 447 of file Camera.h. Referenced by Camera(), cameraRot(), cameraRotAxis(), cameraSwivel(), cameraTrans(), getUpVec(), getXVec(), serialData(), setEyePos(), setLookAt(), setUpVec(), setViewMatrix(), tumble(), and unserialData(). |
|
viewport we are just using the viewport (0,0,w,h), need to fix that!!!, should keep all info relative to the screen in this variable not _screen!!!!!!!!!!!! |