Cocos2d-x  v3.10
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups
Frustum Class Reference

The frustum is a six-side geometry, usually use the frustum to do fast-culling: check a entity whether is a potential visible entity. More...

Public Member Functions

 Frustum ()
 Constructor.
 
 ~Frustum ()
 Destructor.
 
bool initFrustum (const Camera *camera)
 Init frustum from camera. More...
 
bool isOutOfFrustum (const AABB &aabb) const
 Check an AABB whether out of frustum or not. More...
 
bool isOutOfFrustum (const OBB &obb) const
 Check is an OBB whether out of frustum or not. More...
 
void setClipZ (bool clipZ)
 Set z clip. More...
 
bool isClipZ ()
 Get Z clip. More...
 

Detailed Description

The frustum is a six-side geometry, usually use the frustum to do fast-culling: check a entity whether is a potential visible entity.

Member Function Documentation

bool initFrustum ( const Camera camera)

Init frustum from camera.

The specified camera. Return true if success, otherwise return false.

bool isOutOfFrustum ( const AABB aabb) const

Check an AABB whether out of frustum or not.

The specified AABB object. Return true if the specified AABB object is out of the frustum, otherwise return false.

bool isOutOfFrustum ( const OBB obb) const

Check is an OBB whether out of frustum or not.

The specified OBB object. Return true if the specified OBB object is out of the frustum, otherwise return false.

void setClipZ ( bool  clipZ)
inline

Set z clip.

If clipz == true use the near and far plane.

bool isClipZ ( )
inline

Get Z clip.

Return true if use the near and far plane, otherwise return false.


The documentation for this class was generated from the following file: