#include <frustum.h>
Collaboration diagram for salt::Frustum:
Public Types | |
enum | ePlaneID { PI_NEAR = 0, PI_LEFT = 1, PI_RIGHT = 2, PI_FAR = 3, PI_BOTTOM = 4, PI_TOP = 5 } |
plane ids used as an index into mPlanes More... | |
enum | eFrustumSide { FS_INSIDE = 0, FS_OUTSIDE = 1, FS_SPLIT = 2 } |
constants describing the result of an intersection test More... | |
Public Member Functions | |
void | Dump () const |
a debug helper method, printing the plane normals | |
void | Set (const Matrix &worldTransform, float fov=60.0f, float zNear=0.1f, float zFar=2000.0f, float aspect=0.75f) |
constructs a frustum | |
eFrustumSide | Intersects (const AABB3 &bb) const |
returns the relation that hold between between the axis aligned bounding boxx bb and this frustum as an eFrustumSide value | |
Public Attributes | |
Vector3f | mBasePos |
the position from where the frustum is cast | |
Plane | mPlanes [6] |
the 6 plane equations |
This class also provides some 'special' frustra construction methods.
Definition at line 50 of file frustum.h.
|
constants describing the result of an intersection test
|
|
plane ids used as an index into mPlanes
|
|
a debug helper method, printing the plane normals
Definition at line 28 of file frustum.cpp. References salt::Plane::d, mPlanes, salt::Plane::normal, salt::TVector3< DATATYPE, TYPE >::y(), and salt::TVector3< DATATYPE, TYPE >::z(). Here is the call graph for this function: ![]() |
|
returns the relation that hold between between the axis aligned bounding boxx bb and this frustum as an eFrustumSide value
Definition at line 91 of file frustum.cpp. References salt::Plane::ClassifyBox(), FS_INSIDE, FS_OUTSIDE, FS_SPLIT, mPlanes, salt::PLANESIDE_BACK, and salt::PLANESIDE_SPLIT. Referenced by kerosin::RenderServer::Render(). Here is the call graph for this function: ![]() |
|
constructs a frustum
Definition at line 36 of file frustum.cpp. References salt::Plane::d, salt::gDegToRad(), salt::Matrix::Identity(), salt::Matrix::InvertRotationMatrix(), salt::Matrix::m, mPlanes, salt::Plane::normal, salt::Plane::Normalize(), PI_BOTTOM, PI_FAR, PI_LEFT, PI_NEAR, PI_RIGHT, PI_TOP, and salt::TVector3< DATATYPE, TYPE >::Set(). Here is the call graph for this function: ![]() |
|
the position from where the frustum is cast
Definition at line 74 of file frustum.h. Referenced by oxygen::Camera::DescribeFrustum(). |
|
the 6 plane equations
Definition at line 77 of file frustum.h. Referenced by oxygen::Camera::DescribeFrustum(), Dump(), Intersects(), and Set(). |