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

#include <CCAABB.h>

Public Member Functions

 AABB ()
 Constructor. More...
 
 AABB ()
 Constructor. More...
 
 AABB ()
 Constructor. More...
 
 AABB (const Vec3 &min, const Vec3 &max)
 Constructor. More...
 
 AABB ( var min, var max)
 Constructor. More...
 
 AABB ( local min, local max)
 Constructor. More...
 
 AABB (const AABB &box)
 Constructor. More...
 
 AABB ( var box)
 Constructor. More...
 
 AABB ( local box)
 Constructor. More...
 
Vec3 getCenter ()
 Gets the center point of the bounding box. More...
 
var getCenter ()
 Gets the center point of the bounding box. More...
 
void getCorners (Vec3 *dst) const
var getCorners ( var dst)
local getCorners ( local dst)
bool intersects (const AABB &aabb) const
 Tests whether this bounding box intersects the specified bounding object. More...
 
var intersects ( var aabb)
 Tests whether this bounding box intersects the specified bounding object. More...
 
local intersects ( local aabb)
 Tests whether this bounding box intersects the specified bounding object. More...
 
bool containPoint (const Vec3 &point) const
 check whether the point is in. More...
 
var containPoint ( var point)
 check whether the point is in. More...
 
local containPoint ( local point)
 check whether the point is in. More...
 
void merge (const AABB &box)
 Sets this bounding box to the smallest bounding box that contains both this bounding object and the specified bounding box. More...
 
void set (const Vec3 &min, const Vec3 &max)
 Sets this bounding box to the specified values. More...
 
var set ( var min, var max)
 Sets this bounding box to the specified values. More...
 
local set ( local min, local max)
 Sets this bounding box to the specified values. More...
 
void reset ()
 reset min and max value. More...
 
var reset ()
 reset min and max value. More...
 
bool isEmpty () const
var isEmpty ()
local isEmpty ()
void updateMinMax (const Vec3 *point, ssize_t num)
 update the _min and _max from the given point. More...
 
var updateMinMax ( var point, var num)
 update the _min and _max from the given point. More...
 
local updateMinMax ( local point, local num)
 update the _min and _max from the given point. More...
 
void transform (const Mat4 &mat)
 Transforms the bounding box by the given transformation matrix. More...
 
var transform ( var mat)
 Transforms the bounding box by the given transformation matrix. More...
 
local transform ( local mat)
 Transforms the bounding box by the given transformation matrix. More...
 

Public Attributes

Vec3 _min
var _min
local _min
Vec3 _max
var _max
local _max

Constructor & Destructor Documentation

AABB ( )

Constructor.

var AABB ( )

Constructor.

local AABB ( )

Constructor.

AABB ( const Vec3 min,
const Vec3 max 
)

Constructor.

var AABB ( var  min,
var  max 
)

Constructor.

local AABB ( local  min,
local  max 
)

Constructor.

AABB ( const AABB box)

Constructor.

var AABB ( var  box)

Constructor.

local AABB ( local  box)

Constructor.

Member Function Documentation

bool containPoint ( const Vec3 point) const

check whether the point is in.

var containPoint ( var  point)

check whether the point is in.

local containPoint ( local  point)

check whether the point is in.

Vec3 getCenter ( )

Gets the center point of the bounding box.

var getCenter ( )

Gets the center point of the bounding box.

local getCenter ( )

Gets the center point of the bounding box.

void getCorners ( Vec3 dst) const
var getCorners ( var  dst)
local getCorners ( local  dst)
bool intersects ( const AABB aabb) const

Tests whether this bounding box intersects the specified bounding object.

var intersects ( var  aabb)

Tests whether this bounding box intersects the specified bounding object.

local intersects ( local  aabb)

Tests whether this bounding box intersects the specified bounding object.

bool isEmpty ( ) const
var isEmpty ( )
local isEmpty ( )
void merge ( const AABB box)

Sets this bounding box to the smallest bounding box that contains both this bounding object and the specified bounding box.

var merge ( var  box)

Sets this bounding box to the smallest bounding box that contains both this bounding object and the specified bounding box.

local merge ( local  box)

Sets this bounding box to the smallest bounding box that contains both this bounding object and the specified bounding box.

void reset ( )

reset min and max value.

var reset ( )

reset min and max value.

local reset ( )

reset min and max value.

void set ( const Vec3 min,
const Vec3 max 
)

Sets this bounding box to the specified values.

var set ( var  min,
var  max 
)

Sets this bounding box to the specified values.

local set ( local  min,
local  max 
)

Sets this bounding box to the specified values.

void transform ( const Mat4 mat)

Transforms the bounding box by the given transformation matrix.

var transform ( var  mat)

Transforms the bounding box by the given transformation matrix.

local transform ( local  mat)

Transforms the bounding box by the given transformation matrix.

void updateMinMax ( const Vec3 point,
ssize_t  num 
)

update the _min and _max from the given point.

var updateMinMax ( var  point,
var  num 
)

update the _min and _max from the given point.

local updateMinMax ( local  point,
local  num 
)

update the _min and _max from the given point.

Member Data Documentation

Vec3 _max
var _max
local _max
Vec3 _min
var _min
local _min

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