cocos2d-x  3.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
OBB Class Reference

#include <CCOBB.h>

Public Member Functions

 OBB ()
 
 OBB (const AABB &aabb)
 
 OBB (const Vec3 *verts, int num)
 
bool containPoint (const Vec3 &point) const
 
void set (const Vec3 &center, const Vec3 &_xAxis, const Vec3 &_yAxis, const Vec3 &_zAxis, const Vec3 &_extents)
 
void reset ()
 
void getCorners (Vec3 *verts) const
 
bool intersects (const OBB &box) const
 
void transform (const Mat4 &mat)
 Transforms the obb by the given transformation matrix. More...
 

Public Attributes

Vec3 _center
 
Vec3 _xAxis
 
Vec3 _yAxis
 
Vec3 _zAxis
 
Vec3 _extents
 

Protected Member Functions

float projectPoint (const Vec3 &point, const Vec3 &axis) const
 
void getInterval (const OBB &box, const Vec3 &axis, float &min, float &max) const
 
Vec3 getEdgeDirection (int index) const
 
Vec3 getFaceDirection (int index) const
 

Constructor & Destructor Documentation

OBB ( )
OBB ( const AABB aabb)
OBB ( const Vec3 verts,
int  num 
)

Member Function Documentation

bool containPoint ( const Vec3 point) const
void getCorners ( Vec3 verts) const
Vec3 getEdgeDirection ( int  index) const
protected
Vec3 getFaceDirection ( int  index) const
protected
void getInterval ( const OBB box,
const Vec3 axis,
float &  min,
float &  max 
) const
protected
bool intersects ( const OBB box) const
float projectPoint ( const Vec3 point,
const Vec3 axis 
) const
protected
void reset ( )
void set ( const Vec3 center,
const Vec3 _xAxis,
const Vec3 _yAxis,
const Vec3 _zAxis,
const Vec3 _extents 
)
void transform ( const Mat4 mat)

Transforms the obb by the given transformation matrix.

Member Data Documentation

Vec3 _center
Vec3 _extents
Vec3 _xAxis
Vec3 _yAxis
Vec3 _zAxis

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