cocos2d-x  3.4
 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 ( var aabb)
 OBB ( local aabb)
 OBB (const Vec3 *verts, int num)
 OBB ( var verts, var num)
 OBB ( local verts, local num)
bool containPoint (const Vec3 &point) const
void set (const Vec3 &center, const Vec3 &_xAxis, const Vec3 &_yAxis, const Vec3 &_zAxis, const Vec3 &_extents)
var set ( var center, var _xAxis, var _yAxis, var _zAxis, var _extents)
local set ( local center, local _xAxis, local _yAxis, local _zAxis, local _extents)
void reset ()
void getCorners (Vec3 *verts) const
var getCorners ( var verts)
local getCorners ( local verts)
bool intersects (const OBB &box) const
var intersects ( var box)
local intersects ( local box)
void transform (const Mat4 &mat)
 Transforms the obb by the given transformation matrix. More...
 
var transform ( var mat)
 Transforms the obb by the given transformation matrix. More...
 
local transform ( local mat)
 Transforms the obb by the given transformation matrix. More...
 

Public Attributes

Vec3 _center
Vec3 _xAxis
var _xAxis
local _xAxis
Vec3 _yAxis
var _yAxis
local _yAxis
Vec3 _zAxis
var _zAxis
local _zAxis
Vec3 _extentX
var _extentX
local _extentX
Vec3 _extentY
var _extentY
local _extentY
Vec3 _extentZ
var _extentZ
local _extentZ
Vec3 _extents
var _extents
local _extents

Protected Member Functions

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

Constructor & Destructor Documentation

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

Member Function Documentation

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

Transforms the obb by the given transformation matrix.

var transform ( var  mat)

Transforms the obb by the given transformation matrix.

local transform ( local  mat)

Transforms the obb by the given transformation matrix.

Member Data Documentation

Vec3 _center
var _center
local _center
Vec3 _extents
var _extents
local _extents
Vec3 _extentX
var _extentX
local _extentX
Vec3 _extentY
var _extentY
local _extentY
Vec3 _extentZ
var _extentZ
local _extentZ
Vec3 _xAxis
var _xAxis
local _xAxis
Vec3 _yAxis
var _yAxis
local _yAxis
Vec3 _zAxis
var _zAxis
local _zAxis

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