3ds Max C++ API Reference
Frustum Struct Reference

#include <frustum.h>

Public Types

enum  FrustumPlane {
  FP_Near = 0 , FP_Far , FP_Left , FP_Right ,
  FP_Top , FP_Bottom , FP_Num
}
 

Public Member Functions

 Frustum ()
 
 Frustum (bool bPerspective, float fNear, float fFar, Matrix3 &matAffine, float fFOV, float fAspect, float fWidth, float fHeight)
 
 Frustum (Point3 &Origin, Point3 &Direction, Point3 &Up, float Width, float Height, float Length)
 
 Frustum (Point3 &Origin, Point3 &Direction, Point3 &Up, Box3 &AABB)
 
 Frustum (Point3 &Origin, Point3 &Direction, Point3 &Up, Frustum &Fru)
 
 Frustum (Frustum &Fru, Box3 &AABB)
 
 Frustum (Point3 &Origin, Point3 &Direction, Point3 &Up, Point3 Vertices[], int nVertex)
 
 Frustum (Point3 &Origin, Point3 Vertices[], int nVertex, bool x_major)
 
 Frustum (Point3 &Origin, Point3 &Direction, Point3 &Up, float FovX, float FovY, float NearClip, float FarClip)
 
void UpdateDerivedData ()
 
void GetViewMatrix (float Matrix[4][4]) const
 
void GetProjMatrix (float Matrix[4][4]) const
 
int IntersectSphere (FSphere &Sphere) const
 
int IntersectOBB (Box3 &LocalB, const Matrix3 &LocalToWorld) const
 
int IntersectAABB (Box3 &AABB) const
 
bool IntersectSphereFast (FSphere &Sphere) const
 
bool IntersectOBBFast (Box3 &LocalB, const Matrix3 &LocalToWorld) const
 
bool IntersectAABBFast (Box3 &AABB) const
 

Public Attributes

Point3 m_posEye
 
Point3 m_dirEye
 
Point3 m_dirUp
 
Point2 m_centerBias
 
Point2 m_centerScale
 
float m_fNearClip
 
float m_fFarClip
 
bool m_bPerspective
 
bool m_bEnaBiasScale
 
float m_fFovX
 
float m_fFovY
 
float m_fAspect
 
float m_fWidth
 
float m_fHeight
 
Point3 m_Vertex [8]
 
FPlane m_Plane [6]
 

Member Enumeration Documentation

◆ FrustumPlane

Enumerator
FP_Near 
FP_Far 
FP_Left 
FP_Right 
FP_Top 
FP_Bottom 
FP_Num 
58  {
59  FP_Near = 0,
60  FP_Far,
61  FP_Left,
62  FP_Right,
63  FP_Top,
64  FP_Bottom,
65 
66  FP_Num,
67  };
@ FP_Num
Definition: frustum.h:66
@ FP_Left
Definition: frustum.h:61
@ FP_Top
Definition: frustum.h:63
@ FP_Bottom
Definition: frustum.h:64
@ FP_Near
Definition: frustum.h:59
@ FP_Far
Definition: frustum.h:60
@ FP_Right
Definition: frustum.h:62

Constructor & Destructor Documentation

◆ Frustum() [1/9]

Frustum ( )
inline
112  {
113  m_bPerspective = true;
114  }
bool m_bPerspective
Definition: frustum.h:79

◆ Frustum() [2/9]

Frustum ( bool  bPerspective,
float  fNear,
float  fFar,
Matrix3 matAffine,
float  fFOV,
float  fAspect,
float  fWidth,
float  fHeight 
)

◆ Frustum() [3/9]

Frustum ( Point3 Origin,
Point3 Direction,
Point3 Up,
float  Width,
float  Height,
float  Length 
)

◆ Frustum() [4/9]

Frustum ( Point3 Origin,
Point3 Direction,
Point3 Up,
Box3 AABB 
)

◆ Frustum() [5/9]

Frustum ( Point3 Origin,
Point3 Direction,
Point3 Up,
Frustum Fru 
)

◆ Frustum() [6/9]

Frustum ( Frustum Fru,
Box3 AABB 
)

◆ Frustum() [7/9]

Frustum ( Point3 Origin,
Point3 Direction,
Point3 Up,
Point3  Vertices[],
int  nVertex 
)

◆ Frustum() [8/9]

Frustum ( Point3 Origin,
Point3  Vertices[],
int  nVertex,
bool  x_major 
)

◆ Frustum() [9/9]

Frustum ( Point3 Origin,
Point3 Direction,
Point3 Up,
float  FovX,
float  FovY,
float  NearClip,
float  FarClip 
)

Member Function Documentation

◆ UpdateDerivedData()

void UpdateDerivedData ( )

◆ GetViewMatrix()

void GetViewMatrix ( float  Matrix[4][4]) const

◆ GetProjMatrix()

void GetProjMatrix ( float  Matrix[4][4]) const

◆ IntersectSphere()

int IntersectSphere ( FSphere Sphere) const

◆ IntersectOBB()

int IntersectOBB ( Box3 LocalB,
const Matrix3 LocalToWorld 
) const

◆ IntersectAABB()

int IntersectAABB ( Box3 AABB) const

◆ IntersectSphereFast()

bool IntersectSphereFast ( FSphere Sphere) const

◆ IntersectOBBFast()

bool IntersectOBBFast ( Box3 LocalB,
const Matrix3 LocalToWorld 
) const

◆ IntersectAABBFast()

bool IntersectAABBFast ( Box3 AABB) const

Member Data Documentation

◆ m_posEye

Point3 m_posEye

◆ m_dirEye

Point3 m_dirEye

◆ m_dirUp

Point3 m_dirUp

◆ m_centerBias

Point2 m_centerBias

◆ m_centerScale

Point2 m_centerScale

◆ m_fNearClip

float m_fNearClip

◆ m_fFarClip

float m_fFarClip

◆ m_bPerspective

bool m_bPerspective

◆ m_bEnaBiasScale

bool m_bEnaBiasScale

◆ m_fFovX

float m_fFovX

◆ m_fFovY

float m_fFovY

◆ m_fAspect

float m_fAspect

◆ m_fWidth

float m_fWidth

◆ m_fHeight

float m_fHeight

◆ m_Vertex

Point3 m_Vertex[8]

◆ m_Plane

FPlane m_Plane[6]