Nirtcpp 2.1.0
Nirtcpp is a high-performance c++ graphics engine.
|
Defines the view frustum. That's the space visible by the camera. More...
#include <nirtcpp/core/engine/SViewFrustum.hpp>
Public Types | |
enum | VFPLANES { VF_FAR_PLANE = 0 , VF_NEAR_PLANE , VF_LEFT_PLANE , VF_RIGHT_PLANE , VF_BOTTOM_PLANE , VF_TOP_PLANE , VF_PLANE_COUNT } |
Public Member Functions | |
SViewFrustum () | |
Default Constructor. | |
SViewFrustum (const core::matrix4 &mat, bool zClipFromZero) | |
This constructor creates a view frustum based on a projection and/or view matrix. | |
void | setFrom (const core::matrix4 &mat, bool zClipFromZero) |
This constructor creates a view frustum based on a projection and/or view matrix. | |
void | transform (const core::matrix4 &mat) |
transforms the frustum by the matrix | |
core::vector3df | getFarLeftUp () const |
returns the point which is on the far left upper corner inside the the view frustum. | |
core::vector3df | getFarLeftDown () const |
returns the point which is on the far left bottom corner inside the the view frustum. | |
core::vector3df | getFarRightUp () const |
returns the point which is on the far right top corner inside the the view frustum. | |
core::vector3df | getFarRightDown () const |
returns the point which is on the far right bottom corner inside the the view frustum. | |
core::vector3df | getNearLeftUp () const |
returns the point which is on the near left upper corner inside the the view frustum. | |
core::vector3df | getNearLeftDown () const |
returns the point which is on the near left bottom corner inside the the view frustum. | |
core::vector3df | getNearRightUp () const |
returns the point which is on the near right top corner inside the the view frustum. | |
core::vector3df | getNearRightDown () const |
returns the point which is on the near right bottom corner inside the the view frustum. | |
const core::aabbox3d< f32 > & | getBoundingBox () const |
returns a bounding box enclosing the whole view frustum | |
void | recalculateBoundingBox () |
recalculates the bounding box and sphere based on the planes | |
float | getBoundingRadius () const |
get the bounding sphere's radius (of an optimized sphere, not the AABB's) | |
core::vector3df | getBoundingCenter () const |
get the bounding sphere's radius (of an optimized sphere, not the AABB's) | |
void | setFarNearDistance (float distance) |
the cam should tell the frustum the distance between far and near | |
core::matrix4 & | getTransform (video::E_TRANSFORMATION_STATE state) |
get the given state's matrix based on frustum E_TRANSFORMATION_STATE | |
const core::matrix4 & | getTransform (video::E_TRANSFORMATION_STATE state) const |
get the given state's matrix based on frustum E_TRANSFORMATION_STATE | |
bool | clipLine (core::line3d< f32 > &line) const |
clips a line to the view frustum. | |
Public Attributes | |
core::vector3df | cameraPosition |
the position of the camera | |
core::plane3d< f32 > | planes [VF_PLANE_COUNT] |
all planes enclosing the view frustum. | |
core::aabbox3d< f32 > | boundingBox |
bounding box around the view frustum | |
Defines the view frustum. That's the space visible by the camera.
The view frustum is enclosed by 6 planes. These six planes share eight points. A bounding box around these eight points is also stored in this class.
|
inline |
clips a line to the view frustum.
Clips a line to the frustum.
|
inline |
get the given state's matrix based on frustum E_TRANSFORMATION_STATE
View Frustum depends on Projection & View Matrix
|
inline |
get the given state's matrix based on frustum E_TRANSFORMATION_STATE
View Frustum depends on Projection & View Matrix
|
inline |
This constructor creates a view frustum based on a projection and/or view matrix.
This constructor creates a view frustum based on a projection and/or view matrix.
|
inline |
transforms the frustum by the matrix
mat | Matrix by which the view frustum is transformed. |