#include <frustum.h>
Inheritance diagram for Frustum:
This is a basic class holding data for a frustum. Plane normals and distances for all six frustum planes. Vertex signs used in culling octatree (or any bounding boxes).
Public Types | |
enum | FRUSTUMPLANE |
Frustum planes. | |
Public Member Functions | |
Frustum () | |
virtual bool | Intersection (const Vector3d &rkPoint) |
virtual bool | Intersection (const Line &rkLine) |
virtual bool | Intersection (const Plane &rkPlane) |
virtual bool | Intersection (const Vector3d &rkV0, const Vector3d &rkV1, const Vector3d &rkV2, const Vector3d &rkNormal=Vector3d::ORIGO) |
const Vector3d & | GetTranslation () const |
const Quaternion & | GetRotation () const |
float | GetScaling () const |
void | Translate (const Vector3d &rkTranslation, bool bNotifyUpdate=true) |
void | TranslateWorld (const Vector3d &rkTranslation, bool bNotifyUpdate=true) |
void | Rotate (const Quaternion &rkRotation, bool bNotifyUpdate=true) |
void | RotateWorld (const Quaternion &rkRotation, bool bNotifyUpdate=true) |
void | Scale (float fScaling, bool bNotifyUpdate=true) |
virtual void | SetTranslation (const Vector3d &rkTranslation, bool bNotifyUpdate=true) |
virtual void | SetRotation (const Quaternion &rkRotation, bool bNotifyUpdate=true) |
virtual void | SetScaling (float fScaling, bool bNotifyUpdate=true) |
Public Attributes | |
unsigned char | m_aiPVertexSign [6][3] |
unsigned char | m_aiNVertexSign [6][3] |
Matrix | m_kViewMatrix |
Plane | m_akPlanes [6] |
Vector3d | m_kDirection |
float | m_fZNear |
float | m_fZFar |
Protected Attributes | |
float | m_fScaling |
Quaternion | m_kRotation |
Vector3d | m_kTranslation |
|
Resets member data |
|
Test if point is inside volume
|
|
Test if line intersects with volume
|
|
Test if intersection with plane
|
|
Test if intersection with polygon
|
|
|
|
|
|
|
|
Translate node from current position, in local (along current rotated axes) coordinate system. Will call SetTranslation() for setting new translation of node, derived classes do not need to overload this method directly. Not affected by current scaling.
|
|
Translate node from current position, in world (along unrotated axes) coordinate system. Will call SetTranslation() for setting new translation of node, derived classes do not need to overload this method directly. Not affected by current scaling.
|
|
Rotate node in local (current rotation) coordinate system. Will call SetRotation() for setting new rotation of node, derived classes do not need to overload this method directly. Not affected by current scaling.
|
|
Rotate node in world (unrotated) coordinate system. Will call SetRotation() for setting new rotation of node, derived classes do not need to overload this method directly. Not affected by current scaling.
|
|
Scale node by uniform factor. Will use SetScaling for setting new scaling of node, derived classes do not need to overload this method directly. Must be >0, where a value of 1.0f indicates no scaling
|
|
Set translation for node. Derived classes used in hierarchy trees can overload this method and implement caching of world data, or use flag to indicate update needed later.
Reimplemented in HierarchyNode, HierarchyNode< Bone >, and HierarchyNode< SceneNode >. |
|
Set rotation for node. Derived classes used in hierarchy trees can overload this method and implement caching of world data, or use flag to indicate update needed later.
Reimplemented in AABB, HierarchyNode, HierarchyNode< Bone >, and HierarchyNode< SceneNode >. |
|
Set uniform scaling for node. Derived classes used in hierarchy trees can overload this method and implement caching of world data, or use flag to indicate update needed later. A value of 1.0f indicates no scaling.
Reimplemented in HierarchyNode, HierarchyNode< Bone >, and HierarchyNode< SceneNode >. |
|
Vertex signs. These indicate which box corner in the AA box should be used as near and far vertex when culling against frustum during rendering. 6 planes in frustum as first index. Second index is vertex component, 0 = x, 1 = y, 2 = z. A value of 0 is positive and 1 is negative |
|
N is inverted P but precalculate to gain speed |
|
The view matrix corresponding to this frustum |
|
The equation data (normal and distance) for the 6 frustum planes |
|
View vector (which is -zvector of rotation of course) |
|
Near plane distance along m_kDirection |
|
Far plane distance along m_kDirection |
|
Uniform scaling factor (must be >0, default 1) |
|
Rotation |
|
Translation |