cocos2d-x  3.0-rc0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Frustum Class Reference

#include <CCFrustum.h>

Public Types

enum  IntersectResult { OUTSIDE = 0, INTERSECT = 1, INSIDE = 2 }
 

Public Member Functions

 Frustum ()
 ~Frustum ()
void setupProjectionOrthogonal (const ViewTransform &view, float width, float height, float near, float far)
void setupProjectionPerspective (const ViewTransform &view, float left, float right, float top, float bottom, float near, float far)
void setupProjectionPerspectiveFov (const ViewTransform &view, float fov, float ratio, float near, float far)
void setupFromMatrix (const kmMat4 &view, const kmMat4 &projection)
IntersectResult intersectPoint (const kmVec3 &point) const
IntersectResult intersectAABB (const AABB &aabb) const
IntersectResult intersectSphere (const kmVec3 &center, float radius) const

Protected Types

enum  FrustumPlane {
  FRUSTUM_NEAR = 0, FRUSTUM_FAR = 1, FRUSTUM_BOTTOM = 2, FRUSTUM_TOP = 3,
  FRUSTUM_LEFT = 4, FRUSTUM_RIGHT = 5, FRUSTUM_NUMBER = 6
}
 

Protected Attributes

kmPlane _frustumPlanes [FrustumPlane::FRUSTUM_NUMBER]

Member Enumeration Documentation

enum FrustumPlane
protected
Enumerator
FRUSTUM_NEAR 
FRUSTUM_FAR 
FRUSTUM_BOTTOM 
FRUSTUM_TOP 
FRUSTUM_LEFT 
FRUSTUM_RIGHT 
FRUSTUM_NUMBER 
enum IntersectResult
strong
Enumerator
OUTSIDE 
INTERSECT 
INSIDE 

Constructor & Destructor Documentation

Frustum ( )
~Frustum ( )

Member Function Documentation

IntersectResult intersectAABB ( const AABB aabb) const
IntersectResult intersectPoint ( const kmVec3 &  point) const
IntersectResult intersectSphere ( const kmVec3 &  center,
float  radius 
) const
void setupFromMatrix ( const kmMat4 &  view,
const kmMat4 &  projection 
)
void setupProjectionOrthogonal ( const ViewTransform view,
float  width,
float  height,
float  near,
float  far 
)
void setupProjectionPerspective ( const ViewTransform view,
float  left,
float  right,
float  top,
float  bottom,
float  near,
float  far 
)
void setupProjectionPerspectiveFov ( const ViewTransform view,
float  fov,
float  ratio,
float  near,
float  far 
)

Member Data Documentation

kmPlane _frustumPlanes[FrustumPlane::FRUSTUM_NUMBER]
protected

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