Rebel Fork Framework
|
Convex constructed of 6 planes. More...
#include <Urho3D/Math/Frustum.h>
Public Member Functions | |
Frustum () noexcept=default | |
Construct a degenerate frustum with all points at origin. | |
Frustum (const Frustum &frustum) noexcept | |
Copy-construct from another frustum. | |
Frustum & | operator= (const Frustum &rhs) noexcept |
Assign from another frustum. | |
void | Define (float fov, float aspectRatio, float zoom, float nearZ, float farZ, const Matrix3x4 &transform=Matrix3x4::IDENTITY) |
Define with projection parameters and a transform matrix. | |
void | Define (const Vector3 &nearSize, const Vector3 &farSize, const Matrix3x4 &transform=Matrix3x4::IDENTITY) |
Define with near and far dimension vectors and a transform matrix. | |
void | Define (const BoundingBox &box, const Matrix3x4 &transform=Matrix3x4::IDENTITY) |
Define with a bounding box and a transform matrix. | |
void | Define (const Matrix4 &projection) |
Define from a projection or view-projection matrix. | |
void | DefineOrtho (float orthoSize, float aspectRatio, float zoom, float nearZ, float farZ, const Matrix3x4 &transform=Matrix3x4::IDENTITY) |
Define with orthographic projection parameters and a transform matrix. | |
void | DefineSplit (const Matrix4 &projection, float nearZ, float farZ) |
Define a split (limited) frustum from a projection matrix, with near & far distances specified. | |
void | Transform (const Matrix3 &transform) |
Transform by a 3x3 matrix. | |
void | Transform (const Matrix3x4 &transform) |
Transform by a 3x4 matrix. | |
Intersection | IsInside (const Vector3 &point) const |
Test if a point is inside or outside. | |
Intersection | IsInside (const Sphere &sphere) const |
Test if a sphere is inside, outside or intersects. | |
Intersection | IsInsideFast (const Sphere &sphere) const |
Test if a sphere if (partially) inside or outside. | |
Intersection | IsInside (const BoundingBox &box) const |
Test if a bounding box is inside, outside or intersects. | |
Intersection | IsInsideFast (const BoundingBox &box) const |
Test if a bounding box is (partially) inside or outside. | |
float | Distance (const Vector3 &point) const |
Return distance of a point to the frustum, or 0 if inside. | |
Frustum | Transformed (const Matrix3 &transform) const |
Return transformed by a 3x3 matrix. | |
Frustum | Transformed (const Matrix3x4 &transform) const |
Return transformed by a 3x4 matrix. | |
Rect | Projected (const Matrix4 &projection) const |
Return projected by a 4x4 projection matrix. | |
void | UpdatePlanes () |
Update the planes. Called internally. | |
Public Attributes | |
Plane | planes_ [NUM_FRUSTUM_PLANES] |
Frustum planes. | |
Vector3 | vertices_ [NUM_FRUSTUM_VERTICES] |
Frustum vertices. | |
Convex constructed of 6 planes.