Base class for cameras. Override this class to set your own projection matrix.
More...
|
| Camera (vec3 lookFrom=vec3(0.0f, 0.0f, 2.0f), vec3 lookTo=vec3(0.0f), vec3 lookUp=vec3(0.0f, 1.0f, 0.0f), float nearPlane=0.01f, float farPlane=10000.0f) |
| Default parameters creates a right handed coordinate system with camera looking towards the negative z-axis. with X = (1, 0, 0), Y = (0, 1, 0), Z = (0, 0, -1) More...
|
|
| Camera (const Camera &other)=default |
|
Camera & | operator= (const Camera &other)=default |
|
virtual Camera * | clone () const =0 |
|
virtual bool | update (const Camera *source)=0 |
|
virtual void | configureProperties (CompositeProperty *comp, Config config)=0 |
|
const vec3 & | getLookFrom () const |
|
void | setLookFrom (vec3 val) |
|
const vec3 & | getLookTo () const |
|
void | setLookTo (vec3 val) |
|
const vec3 & | getLookUp () const |
|
void | setLookUp (vec3 val) |
|
virtual float | getAspectRatio () const =0 |
|
virtual void | setAspectRatio (float val)=0 |
|
vec3 | getDirection () const |
| Get unnormalized direction of camera: lookTo - lookFrom.
|
|
void | setNearPlaneDist (float distance) |
| Set distance to the near plane from lookFrom.
|
|
float | getNearPlaneDist () const |
|
void | setFarPlaneDist (float distance) |
| Set distance to the far plane from lookFrom.
|
|
float | getFarPlaneDist () const |
|
const mat4 & | getViewMatrix () const |
|
const mat4 & | getProjectionMatrix () const |
|
const mat4 & | getInverseViewMatrix () const |
|
const mat4 & | getInverseProjectionMatrix () const |
|
vec3 | getWorldPosFromNormalizedDeviceCoords (const vec3 &ndcCoords) const |
| Convert from normalized device coordinates (xyz in [-1 1]) to world coordinates. More...
|
|
vec4 | getClipPosFromNormalizedDeviceCoords (const vec3 &ndcCoords) const |
| Convert from normalized device coordinates (xyz in [-1 1]) to clip coordinates, where z value of -1 correspond to the near plane and 1 to the far plane. Coordinates outside of the [-1 1]^3 range will be clipped. More...
|
|
vec3 | getNormalizedDeviceFromNormalizedScreenAtFocusPointDepth (const vec2 &normalizedScreenCoord) const |
|
virtual void | serialize (Serializer &s) const override |
|
virtual void | deserialize (Deserializer &d) override |
|
Base class for cameras. Override this class to set your own projection matrix.
- See also
- PerspectiveCamera
-
OrthographicCamera
inviwo::Camera::Camera |
( |
vec3 |
lookFrom = vec3(0.0f, 0.0f, 2.0f) , |
|
|
vec3 |
lookTo = vec3(0.0f) , |
|
|
vec3 |
lookUp = vec3(0.0f, 1.0f, 0.0f) , |
|
|
float |
nearPlane = 0.01f , |
|
|
float |
farPlane = 10000.0f |
|
) |
| |
Default parameters creates a right handed coordinate system with camera looking towards the negative z-axis. with X = (1, 0, 0), Y = (0, 1, 0), Z = (0, 0, -1)
- Parameters
-
lookFrom | Camera position (eye) |
lookTo | Camera focus point (center) |
lookUp | Camera up direction |
nearPlane | Camera near clip-plane |
farPlane | Camera far clip-plane |