Oritened Bounding Box(OBB) More...
#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 ¢er, 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) |
Oritened Bounding Box(OBB)
the OBB is similar to the AABB but the bounding box has the same direction as Sprite3D. so it's collistion detection more precise than AABB
OBB | ( | ) |
var OBB | ( | ) |
local OBB | ( | ) |
var OBB | ( | var | aabb | ) |
local OBB | ( | local | aabb | ) |
var OBB | ( | var | verts, |
var | num | ||
) |
local OBB | ( | local | verts, |
local | num | ||
) |
|
inlineprotected |
|
inlineprotected |
|
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 | ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
bool intersects | ( | const OBB & | box | ) | const |
var intersects | ( | var | box | ) |
local intersects | ( | local | box | ) |
|
protected |
|
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.
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 |