| VRS - The Virtual Rendering System |
| version 3.3 |
#include <vrs/camerainfo.h>

Public Types | |
| enum | PrjType { Unknown, Parallel, Perspective } |
| enum | CullingPos { Outside = -1, InAndOut = 0, Inside = 1 } |
Public Member Functions | |
| CameraInfo (const Matrix &matrix=Matrix()) | |
| CameraInfo (const Engine *engine, bool objectCoordinates=false, bool useNDC=true) | |
| Vector | direction () const |
| Returns the direction of a ray that starts at the camera and goes through the middle of the view-frustum. | |
| Vector | position () const |
| Returns the camera-position in world coordinates. | |
| Vector | focus () const |
| Returns a point on the direction ray. */. | |
| Vector | rightVector () const |
| Returns a (right) spanning vector of the front- (and back-clipping) plane. | |
| Vector | upVector () const |
| Returns a (up) spanning vector of the front- (and back-clipping) plane. | |
| Vector | depthVector () const |
| Returns a perpendicular vector to the right and the up vector. | |
| Vector | leftPlaneNormal () const |
| Vector | rightPlaneNormal () const |
| See leftPlaneNormal. | |
| Vector | topPlaneNormal () const |
| See leftPlaneNormal. | |
| Vector | bottomPlaneNormal () const |
| See leftPlaneNormal. | |
| Vector | clipPlaneNormal () const |
| Returns a perpendicular vector to the front- and back clipping-plane. | |
| double | leftAngle () const |
| Returns the angle between the camera's local yz-plane and the left plane of the projection frustrum. | |
| double | rightAngle () const |
| Returns the angle between the camera's local yz-plane and the right plane of the projection frustrum. | |
| double | topAngle () const |
| Returns the angle between the cameras local xz-plane and the top plane of the projections frustum,. | |
| double | bottomAngle () const |
| Returns the angle between the cameras local xz-plane and the bottom plane of the projections frustum,. | |
| double | nearPlane () const |
| Returns the distance of the frustums front plane to camera's local xy-plane. | |
| double | farPlane () const |
| Returns the distance of the frustums back plane to camera's local xy-plane. | |
| Vector | getLLF () const |
| Returns the llf position (only for CameraInfo::Parallel). | |
| Vector | getURB () const |
| Returns the urb position (only for CameraInfo::Parallel). | |
| VRS_SERIALIZABLE_CLASS_ENUM (PrjType) | |
| PrjType | projectionType () const |
| Returns the type of the analyzed projection. | |
| void | decompose (const Matrix &matrix) |
| Analyzes a given matrix and stores the results in the attributes. | |
| const Matrix & | matrix () const |
| Returns that matrix that was last passed in a call to the constructor or decompose. | |
| VRS_SERIALIZABLE_CLASS_ENUM (CullingPos) | |
| CullingPos | culling (const Vector &point) const |
| Returns if the given point is inside or outside the view-frustum. | |
| CullingPos | culling (const Bounds &bbox) const |
| Returns if the given box is inside or outside the view-frustum. | |
| VRS_TYPEINFO (CameraInfo, SharedObj) | |
Objects of this class take the product of a projection and an orientation matrix and reverse engineer it.
| VRS::CameraInfo::CameraInfo | ( | const Engine * | engine, | |
| bool | objectCoordinates = false, |
|||
| bool | useNDC = true | |||
| ) |
If an engine is given, the constructor will extract the matrices, optionally also composing them with the current modelview matrix to get a result in object space. Both parallel and perspective transformations are detected and handled. This object is useful for renderers that specify a camera in a human-readable fashion, like POVRay or Radiance (and probably many others). If seems to be quite useful in various other places as well. The parameter "useNDC" specifies whether a modified normalized device coordinate transformation should be considered (e.g. which will lead to different results during the creation of a large scale snapshot).
| Vector VRS::CameraInfo::direction | ( | ) | const |
Returns the direction of a ray that starts at the camera and goes through the middle of the view-frustum.
| Vector VRS::CameraInfo::position | ( | ) | const |
Returns the camera-position in world coordinates.
| Vector VRS::CameraInfo::focus | ( | ) | const |
Returns a point on the direction ray. */.
| Vector VRS::CameraInfo::rightVector | ( | ) | const |
Returns a (right) spanning vector of the front- (and back-clipping) plane.
| Vector VRS::CameraInfo::upVector | ( | ) | const |
Returns a (up) spanning vector of the front- (and back-clipping) plane.
| Vector VRS::CameraInfo::depthVector | ( | ) | const |
Returns a perpendicular vector to the right and the up vector.
Note that this vector is, in general, not the same as `direction'. All these vectors are normalized.
| Vector VRS::CameraInfo::leftPlaneNormal | ( | ) | const |
The view frustum is the intersection of 6 half-spaces. Two of them are defined by the front and back clipping plane. The other four contain the view-point and are the sides of the frustum. These methods return their plane normals, oriented to point to the inside of the view volume.
| Vector VRS::CameraInfo::rightPlaneNormal | ( | ) | const |
See leftPlaneNormal.
| Vector VRS::CameraInfo::topPlaneNormal | ( | ) | const |
See leftPlaneNormal.
| Vector VRS::CameraInfo::bottomPlaneNormal | ( | ) | const |
See leftPlaneNormal.
| Vector VRS::CameraInfo::clipPlaneNormal | ( | ) | const |
Returns a perpendicular vector to the front- and back clipping-plane.
It points from the front to the back plane. It's direction is the same as the direction of the depthVector
| double VRS::CameraInfo::leftAngle | ( | ) | const |
Returns the angle between the camera's local yz-plane and the left plane of the projection frustrum.
Negative values meaning angles to the left. This functions is for perspective projections only.
| double VRS::CameraInfo::rightAngle | ( | ) | const |
Returns the angle between the camera's local yz-plane and the right plane of the projection frustrum.
This functions is for perspective projections only.
| double VRS::CameraInfo::topAngle | ( | ) | const |
Returns the angle between the cameras local xz-plane and the top plane of the projections frustum,.
Negative values meaning angles to the top. This functions is for perspective projections only.
| double VRS::CameraInfo::bottomAngle | ( | ) | const |
Returns the angle between the cameras local xz-plane and the bottom plane of the projections frustum,.
This functions is for perspective projections only.
| double VRS::CameraInfo::nearPlane | ( | ) | const |
Returns the distance of the frustums front plane to camera's local xy-plane.
| double VRS::CameraInfo::farPlane | ( | ) | const |
Returns the distance of the frustums back plane to camera's local xy-plane.
| Vector VRS::CameraInfo::getLLF | ( | ) | const |
Returns the llf position (only for CameraInfo::Parallel).
| Vector VRS::CameraInfo::getURB | ( | ) | const |
Returns the urb position (only for CameraInfo::Parallel).
| VRS::CameraInfo::VRS_SERIALIZABLE_CLASS_ENUM | ( | PrjType | ) |
| PrjType VRS::CameraInfo::projectionType | ( | ) | const |
Returns the type of the analyzed projection.
| void VRS::CameraInfo::decompose | ( | const Matrix & | matrix | ) |
Analyzes a given matrix and stores the results in the attributes.
| const Matrix& VRS::CameraInfo::matrix | ( | ) | const |
Returns that matrix that was last passed in a call to the constructor or decompose.
| VRS::CameraInfo::VRS_SERIALIZABLE_CLASS_ENUM | ( | CullingPos | ) |
| CullingPos VRS::CameraInfo::culling | ( | const Vector & | point | ) | const |
Returns if the given point is inside or outside the view-frustum.
| CullingPos VRS::CameraInfo::culling | ( | const Bounds & | bbox | ) | const |
Returns if the given box is inside or outside the view-frustum.
| VRS::CameraInfo::VRS_TYPEINFO | ( | CameraInfo | , | |
| SharedObj | ||||
| ) |