|
NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
|
#include <game/mLib/m_frustum.hpp>
A view frustum, used to cull objects outside of the camera's field of view.
Definition at line 10 of file m_frustum.hpp.
Public Member Functions | |
| mFrustum_c () | |
| Constructs an empty frustum. | |
| void | set (f32 fovy, f32 aspect, f32 n, f32 f, const mMtx_c &cameraMtx) |
| Builds a symmetric perspective frustum. | |
| void | set (f32 top, f32 bottom, f32 left, f32 right, f32 near, f32 far, const mMtx_c &cameraMtx, bool orthographic) |
| Builds an arbitrary perspective or orthographic frustum. | |
| bool | intersectSphere (const mSphere_c *sphere) const |
| Checks whether the given sphere is at least partially inside the frustum. | |
| bool | intersectAABB (const mAABB_c *box) const |
| Checks whether the given bounding box is at least partially inside the frustum. | |
|
inline |
Constructs an empty frustum.
Definition at line 12 of file m_frustum.hpp.
| void mFrustum_c::set | ( | f32 | fovy, |
| f32 | aspect, | ||
| f32 | n, | ||
| f32 | f, | ||
| const mMtx_c & | cameraMtx ) |
Builds a symmetric perspective frustum.
| fovy | The vertical field of view, in degrees. |
| aspect | The aspect ratio (width / height). |
| near | The distance to the near clipping plane. |
| far | The distance to the far clipping plane. |
| cameraMtx | The matrix defining the camera's transform in world space. |
Definition at line 4 of file m_frustum.cpp.
| void mFrustum_c::set | ( | f32 | top, |
| f32 | bottom, | ||
| f32 | left, | ||
| f32 | right, | ||
| f32 | near, | ||
| f32 | far, | ||
| const mMtx_c & | cameraMtx, | ||
| bool | orthographic ) |
Builds an arbitrary perspective or orthographic frustum.
| top | The top boundary. |
| bottom | The bottom boundary. |
| left | The left boundary. |
| right | The right boundary. |
| near | The distance to the near clipping plane. |
| far | The distance to the far clipping plane. |
| cameraMtx | The matrix defining the camera's transform in world space. |
| orthographic | true for orthographic projection, false for perspective projection. |
Definition at line 11 of file m_frustum.cpp.
| bool mFrustum_c::intersectSphere | ( | const mSphere_c * | sphere | ) | const |
Checks whether the given sphere is at least partially inside the frustum.
Definition at line 93 of file m_frustum.cpp.
| bool mFrustum_c::intersectAABB | ( | const mAABB_c * | box | ) | const |
Checks whether the given bounding box is at least partially inside the frustum.
Definition at line 132 of file m_frustum.cpp.