Saga3D API Documentation
1.0-RC4
|
Defines the view frustum. That's the space visible by the camera. More...
#include <SViewFrustum.h>
Public Types | |
enum | E_PLANES { E_PLANES::FAR, E_PLANES::NEAR, E_PLANES::LEFT, E_PLANES::RIGHT, E_PLANES::BOTTOM, E_PLANES::TOP } |
Public Member Functions | |
SViewFrustum () | |
Default Constructor. More... | |
SViewFrustum (const SViewFrustum &other) | |
Copy Constructor. More... | |
SViewFrustum (const glm::mat4 &mat) | |
This constructor creates a view frustum based on a projection and/or view matrix. More... | |
void | setFrom (const glm::mat4 &mat) |
This constructor creates a view frustum based on a projection and/or view matrix. More... | |
void | transform (const glm::mat4 &mat) |
transforms the frustum by the matrix More... | |
glm::vec3 | getFarLeftUp () const |
returns the point which is on the far left upper corner inside the the view frustum. More... | |
glm::vec3 | getFarLeftDown () const |
returns the point which is on the far left bottom corner inside the the view frustum. More... | |
glm::vec3 | getFarRightUp () const |
returns the point which is on the far right top corner inside the the view frustum. More... | |
glm::vec3 | getFarRightDown () const |
returns the point which is on the far right bottom corner inside the the view frustum. More... | |
glm::vec3 | getNearLeftUp () const |
returns the point which is on the near left upper corner inside the the view frustum. More... | |
glm::vec3 | getNearLeftDown () const |
returns the point which is on the near left bottom corner inside the the view frustum. More... | |
glm::vec3 | getNearRightUp () const |
returns the point which is on the near right top corner inside the the view frustum. More... | |
glm::vec3 | getNearRightDown () const |
returns the point which is on the near right bottom corner inside the the view frustum. More... | |
const core::aabbox3d< float > & | getBoundingBox () const |
returns a bounding box enclosing the whole view frustum More... | |
void | recalculateBoundingBox () |
recalculates the bounding box and sphere based on the planes More... | |
float | getBoundingRadius () const |
get the bounding sphere's radius (of an optimized sphere, not the AABB's) More... | |
glm::vec3 | getBoundingCenter () const |
get the bounding sphere's radius (of an optimized sphere, not the AABB's) More... | |
void | setFarNearDistance (float distance) |
the cam should tell the frustum the distance between far and near More... | |
glm::mat4 & | getTransform (video::E_TRANSFORM_STATE state) |
get the given state's matrix based on frustum E_TRANSFORM_STATE More... | |
const glm::mat4 & | getTransform (video::E_TRANSFORM_STATE state) const |
get the given state's matrix based on frustum E_TRANSFORM_STATE More... | |
bool | clipLine (core::line3d< float > &line) const |
clips a line to the view frustum. More... | |
core::plane3d< float > & | plane (E_PLANES type) |
core::plane3d< float > | plane (E_PLANES type) const |
Public Attributes | |
glm::vec3 | cameraPosition |
the position of the camera More... | |
std::array< core::plane3d< float >, VIEW_FRUSTUM_PLANE_COUNT > | planes |
all planes enclosing the view frustum. More... | |
core::aabbox3d< float > | boundingBox |
bounding box around the view frustum More... | |
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 structure.
Definition at line 29 of file SViewFrustum.h.
|
strong |
Definition at line 31 of file SViewFrustum.h.
|
inline |
Default Constructor.
Definition at line 48 of file SViewFrustum.h.
|
inline |
|
inline |
This constructor creates a view frustum based on a projection and/or view matrix.
Definition at line 165 of file SViewFrustum.h.
|
inline |
clips a line to the view frustum.
Clips a line to the frustum.
Definition at line 363 of file SViewFrustum.h.
|
inline |
returns a bounding box enclosing the whole view frustum
Definition at line 259 of file SViewFrustum.h.
|
inline |
get the bounding sphere's radius (of an optimized sphere, not the AABB's)
Definition at line 282 of file SViewFrustum.h.
|
inline |
get the bounding sphere's radius (of an optimized sphere, not the AABB's)
Definition at line 277 of file SViewFrustum.h.
|
inline |
returns the point which is on the far left bottom corner inside the the view frustum.
Definition at line 189 of file SViewFrustum.h.
|
inline |
returns the point which is on the far left upper corner inside the the view frustum.
Definition at line 179 of file SViewFrustum.h.
|
inline |
returns the point which is on the far right bottom corner inside the the view frustum.
Definition at line 209 of file SViewFrustum.h.
|
inline |
returns the point which is on the far right top corner inside the the view frustum.
Definition at line 199 of file SViewFrustum.h.
|
inline |
returns the point which is on the near left bottom corner inside the the view frustum.
Definition at line 229 of file SViewFrustum.h.
|
inline |
returns the point which is on the near left upper corner inside the the view frustum.
Definition at line 219 of file SViewFrustum.h.
|
inline |
returns the point which is on the near right bottom corner inside the the view frustum.
Definition at line 249 of file SViewFrustum.h.
|
inline |
returns the point which is on the near right top corner inside the the view frustum.
Definition at line 239 of file SViewFrustum.h.
|
inline |
get the given state's matrix based on frustum E_TRANSFORM_STATE
View Frustum depends on Projection & View Matrix
Definition at line 349 of file SViewFrustum.h.
|
inline |
get the given state's matrix based on frustum E_TRANSFORM_STATE
View Frustum depends on Projection & View Matrix
Definition at line 357 of file SViewFrustum.h.
|
inline |
Definition at line 115 of file SViewFrustum.h.
|
inline |
Definition at line 117 of file SViewFrustum.h.
|
inline |
recalculates the bounding box and sphere based on the planes
Definition at line 264 of file SViewFrustum.h.
|
inline |
the cam should tell the frustum the distance between far and near
Definition at line 287 of file SViewFrustum.h.
|
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.
Definition at line 294 of file SViewFrustum.h.
|
inline |
transforms the frustum by the matrix
mat | Matrix by which the view frustum is transformed. |
Definition at line 170 of file SViewFrustum.h.
core::aabbox3d<float> saga::scene::SViewFrustum::boundingBox |
bounding box around the view frustum
Definition at line 123 of file SViewFrustum.h.
glm::vec3 saga::scene::SViewFrustum::cameraPosition |
the position of the camera
Definition at line 113 of file SViewFrustum.h.
std::array<core::plane3d<float>, VIEW_FRUSTUM_PLANE_COUNT> saga::scene::SViewFrustum::planes |
all planes enclosing the view frustum.
Definition at line 120 of file SViewFrustum.h.