|
HDK
|
#include <Camera.h>
Public Member Functions | |
| Camera () | |
| ~Camera () | |
Transform Matrices | |
| void | setWorldMatrix (const Matrix44 &mat) |
| Set the world matrix. More... | |
| const Matrix44 & | getWorldMatrix () const |
| Return the world matrix. More... | |
| void | setViewMatrix (const Matrix44 &mat) |
| Set the view matrix. More... | |
| const Matrix44 & | getViewMatrix () const |
| Return the view matrix. More... | |
| void | setProjectionMatrix (const Matrix44 &mat) |
| Set the projection matrix. More... | |
| const Matrix44 & | getProjectionMatrix () const |
| Return the projection matrix. More... | |
| Matrix44 | getWorldViewProjMatrix () const |
| Compute our full model-view-projection matrix. More... | |
| Vector3 | getViewPosition () const |
| Derive viewer position from the view matrix. More... | |
| Vector3 | getViewDirection () const |
| Derive viewer direction from the view matrix. More... | |
Viewport | |
| void | setViewportSize (const Vector2 &size) |
| Set the size of the viewport window. More... | |
| const Vector2 & | getViewportSize () const |
| Return the size of the viewport window. More... | |
| Vector3 | projectToViewport (Vector3 v) |
| Project a position from object to viewport space. More... | |
| Vector3 | unprojectFromViewport (Vector3 v) |
| Unproject a position from viewport to object space. More... | |
Arcball | |
| void | arcballButtonEvent (const Vector2 &pos, bool pressed) |
| Indicates a button state change, with pos being the instantaneous location of the mouse. More... | |
| bool | applyArcballMotion (const Vector2 &pos) |
| Apply mouse motion to the arcball state. More... | |
| Matrix44 | arcballMatrix () const |
| Return the arcball matrix. More... | |
Static Public Member Functions | |
| static CameraPtr | create () |
| Create a new camera. More... | |
Utilities | |
| static Matrix44 | createViewMatrix (const Vector3 &eye, const Vector3 &target, const Vector3 &up) |
| Create a view matrix given an eye position, a target position and an up vector. More... | |
| static Matrix44 | createPerspectiveMatrix (float left, float right, float bottom, float top, float nearP, float farP) |
| Create a perspective projection matrix given a set of clip planes with [-1,1] projected Z. More... | |
| static Matrix44 | createOrthographicMatrix (float left, float right, float bottom, float top, float nearP, float farP) |
| Create an orthographic projection matrix given a set of clip planes with [-1,1] projected Z. More... | |
| static Matrix44 | createPerspectiveMatrixZP (float left, float right, float bottom, float top, float nearP, float farP) |
| Create a perspective projection matrix given a set of clip planes with [0,1] projected Z. More... | |
| static Matrix44 | createOrthographicMatrixZP (float left, float right, float bottom, float top, float nearP, float farP) |
| Create an orthographic projection matrix given a set of clip planes with [0,1] projected Z. More... | |
| static Vector3 | transformPointPerspective (const Matrix44 &m, const Vector3 &v) |
A simple camera class, supporting transform matrices and arcball functionality for object-viewing applications.
| bool Camera::applyArcballMotion | ( | const Vector2 & | pos | ) |
Apply mouse motion to the arcball state.
Indicates a button state change, with pos being the instantaneous location of the mouse.
|
inline |
|
inlinestatic |
|
static |
Create an orthographic projection matrix given a set of clip planes with [-1,1] projected Z.
|
static |
Create an orthographic projection matrix given a set of clip planes with [0,1] projected Z.
|
static |
Create a perspective projection matrix given a set of clip planes with [-1,1] projected Z.
|
static |
Create a perspective projection matrix given a set of clip planes with [0,1] projected Z.
|
static |
Create a view matrix given an eye position, a target position and an up vector.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
protected |
|
protected |