Create a physical shape(box, sphere, cylinder, capsule, convexhull, mesh and heightfield) More...
Inherits Ref.
Public Member Functions | |
virtual ShapeType | getShapeType () const |
get shape type | |
Public Member Functions inherited from Ref | |
void | retain () |
Retains the ownership. More... | |
local | retain () |
Retains the ownership. More... | |
void | release () |
Releases the ownership immediately. More... | |
Ref * | autorelease () |
Releases the ownership sometime soon automatically. More... | |
unsigned int | getReferenceCount () const |
Returns the Ref's current reference count. More... | |
local | getReferenceCount () |
Returns the Ref's current reference count. More... | |
virtual | ~Ref () |
Destructor. | |
Static Public Member Functions | |
static Physics3DShape * | createBox (const cocos2d::Vec3 &extent) |
create box shape The extent of sphere. | |
local | createBox ( local extent) |
create box shape The extent of sphere. | |
static Physics3DShape * | createSphere (float radius) |
create sphere shape The radius of sphere. | |
local | createSphere ( local radius) |
create sphere shape The radius of sphere. | |
static Physics3DShape * | createCylinder (float radius, float height) |
create cylinder shape The radius of cylinder. More... | |
static Physics3DShape * | createCapsule (float radius, float height) |
create capsule shape The radius of casule. More... | |
static Physics3DShape * | createConvexHull (const cocos2d::Vec3 *points, int numPoints) |
create convex hull The vertices of convex hull The number of vertices. | |
local | createConvexHull ( local points, local numPoints) |
create convex hull The vertices of convex hull The number of vertices. | |
static Physics3DShape * | createMesh (const cocos2d::Vec3 *triangles, int numTriangles) |
create mesh The pointer of triangle list The number of triangles. | |
local | createMesh ( local triangles, local numTriangles) |
create mesh The pointer of triangle list The number of triangles. | |
static Physics3DShape * | createHeightfield (int heightStickWidth, int heightStickLength, const void *heightfieldData, float heightScale, float minHeight, float maxHeight, bool useFloatDatam, bool flipQuadEdges, bool useDiamondSubdivision=false) |
create heightfield The Width of heightfield The Length of heightfield. More... | |
var | createHeightfield ( var heightStickWidth, var heightStickLength, var heightfieldData, var heightScale, var minHeight, var maxHeight, var useFloatDatam, var flipQuadEdges, var false) |
create heightfield The Width of heightfield The Length of heightfield. More... | |
local | createHeightfield ( local heightStickWidth, local heightStickLength, local heightfieldData, local heightScale, local minHeight, local maxHeight, local useFloatDatam, local flipQuadEdges, local false) |
create heightfield The Width of heightfield The Length of heightfield. More... | |
static Physics3DShape * | createCompoundShape (const std::vector< std::pair< Physics3DShape *, Mat4 >> &shapes) |
create Compound Shape The list of child shape | |
local | createCompoundShape ( local shapes) |
create Compound Shape The list of child shape | |
Additional Inherited Members | |
Public Attributes inherited from Ref | |
unsigned int | _ID |
object id, ScriptSupport need public _ID | |
local | _ID |
object id, ScriptSupport need public _ID | |
int | _luaID |
Lua reference id. | |
local | _luaID |
Lua reference id. | |
void * | _scriptObject |
scriptObject, support for swift | |
local | _scriptObject |
scriptObject, support for swift | |
bool | _rooted |
When true, it means that the object was already rooted. | |
local | _rooted |
When true, it means that the object was already rooted. | |
bool | _scriptOwned |
The life of the object is scrolled by the scripting engine. More... | |
local | _scriptOwned |
The life of the object is scrolled by the scripting engine. More... | |
Create a physical shape(box, sphere, cylinder, capsule, convexhull, mesh and heightfield)
|
static |
create cylinder shape The radius of cylinder.
The height.
|
static |
create cylinder shape The radius of cylinder.
The height.
|
static |
create cylinder shape The radius of cylinder.
The height.
|
static |
create capsule shape The radius of casule.
The height (cylinder part).
|
static |
create capsule shape The radius of casule.
The height (cylinder part).
|
static |
create capsule shape The radius of casule.
The height (cylinder part).
|
static |
create heightfield The Width of heightfield The Length of heightfield.
The Data of heightfield. heightScale。. The minHeight of heightfield. The maxHeight of heightfield. useFloatDatam if flip QuadEdges useDiamondSubdivision
|
static |
create heightfield The Width of heightfield The Length of heightfield.
The Data of heightfield. heightScale。. The minHeight of heightfield. The maxHeight of heightfield. useFloatDatam if flip QuadEdges useDiamondSubdivision
|
static |
create heightfield The Width of heightfield The Length of heightfield.
The Data of heightfield. heightScale。. The minHeight of heightfield. The maxHeight of heightfield. useFloatDatam if flip QuadEdges useDiamondSubdivision