cocos2d-x  3.0rc1
 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)
var setupProjectionOrthogonal ( var view, var width, var height, var near, var far)
local setupProjectionOrthogonal ( local view, local width, local height, local near, local far)
void setupProjectionPerspective (const ViewTransform &view, float left, float right, float top, float bottom, float near, float far)
var setupProjectionPerspective ( var view, var left, var right, var top, var bottom, var near, var far)
local setupProjectionPerspective ( local view, local left, local right, local top, local bottom, local near, local 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
var intersectPoint ( var point)
local intersectPoint ( local point)
IntersectResult intersectAABB (const AABB &aabb) const
local intersectAABB ( local aabb)
IntersectResult intersectSphere (const kmVec3 &center, float radius) const
var intersectSphere ( var center, var radius)
local intersectSphere ( local center, local radius)

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 
var FrustumPlane
protected
Enumerator
FRUSTUM_NEAR 
FRUSTUM_FAR 
FRUSTUM_BOTTOM 
FRUSTUM_TOP 
FRUSTUM_LEFT 
FRUSTUM_RIGHT 
FRUSTUM_NUMBER 
local FrustumPlane
protected
Enumerator
FRUSTUM_NEAR 
FRUSTUM_FAR 
FRUSTUM_BOTTOM 
FRUSTUM_TOP 
FRUSTUM_LEFT 
FRUSTUM_RIGHT 
FRUSTUM_NUMBER 
enum IntersectResult
strong
Enumerator
OUTSIDE 
INTERSECT 
INSIDE 
var IntersectResult
strong
Enumerator
OUTSIDE 
INTERSECT 
INSIDE 
local IntersectResult
strong
Enumerator
OUTSIDE 
INTERSECT 
INSIDE 

Constructor & Destructor Documentation

Frustum ( )
var Frustum ( )
local Frustum ( )
~Frustum ( )
var ~Frustum ( )
local ~Frustum ( )

Member Function Documentation

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

Member Data Documentation

kmPlane _frustumPlanes[FrustumPlane::FRUSTUM_NUMBER]
protected
kmPlane _frustumPlanes[FrustumPlane::FRUSTUM_NUMBER]
protected
kmPlane _frustumPlanes[FrustumPlane::FRUSTUM_NUMBER]
protected

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