Cocos2d-x  v3.10
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups
Physics3DCollider Class Reference

Inherit from Physics3DObject, the main class for Colliders. More...

Inherits Physics3DObject.

Public Member Functions

btGhostObject * getGhostObject () const
 Get the pointer of btGhostObject.
 
void setTrigger (bool isTrigger)
 Set trigger. More...
 
bool isTrigger () const
 Check is a trigger. More...
 
void setRestitution (float rest)
 Set restitution. More...
 
float getRestitution () const
 Get restitution. More...
 
void setFriction (float frict)
 Set friction. More...
 
float getFriction () const
 Get friction. More...
 
void setRollingFriction (float frict)
 Set rolling friction. More...
 
var setRollingFriction ( var frict)
 Set rolling friction. More...
 
local setRollingFriction ( local frict)
 Set rolling friction. More...
 
float getRollingFriction () const
 Get rolling friction. More...
 
void setHitFraction (float hitFraction)
 Set hit friction. More...
 
float getHitFraction () const
 Get hit friction. More...
 
void setCcdMotionThreshold (float ccdMotionThreshold)
 Set motion threshold, don't do continuous collision detection if the motion (in one step) is less then ccdMotionThreshold. More...
 
var setCcdMotionThreshold ( var ccdMotionThreshold)
 Set motion threshold, don't do continuous collision detection if the motion (in one step) is less then ccdMotionThreshold. More...
 
local setCcdMotionThreshold ( local ccdMotionThreshold)
 Set motion threshold, don't do continuous collision detection if the motion (in one step) is less then ccdMotionThreshold. More...
 
float getCcdMotionThreshold () const
 Get motion threshold. More...
 
void setCcdSweptSphereRadius (float radius)
 Set swept sphere radius. More...
 
float getCcdSweptSphereRadius () const
 Get swept sphere radius. More...
 
virtual cocos2d::Mat4 getWorldTransform () const
 override. More...
 
- Public Member Functions inherited from Physics3DObject
virtual PhysicsObjType getObjType () const
 Get the Physics3DObject Type.
 
local getObjType ()
 Get the Physics3DObject Type.
 
void setUserData (void *userData)
 Set the user data.
 
void * getUserData () const
 Get the user data.
 
void setPhysicsWorld (Physics3DWorld *world)
 Internal method. More...
 
Physics3DWorldgetPhysicsWorld () const
 Get the pointer of Physics3DWorld.
 
void setCollisionCallback (const CollisionCallbackFunc &func)
 Set the collision callback function.
 
const CollisionCallbackFunc & getCollisionCallback () const
 Get the collision callback function.
 
bool needCollisionCallback ()
 Check has collision callback function.
 
void setMask (unsigned int mask)
 Set the mask of Physics3DObject.
 
unsigned int getMask () const
 Get the mask of Physics3DObject.
 
- 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...
 
Refautorelease ()
 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 Physics3DCollidercreate (Physics3DColliderDes *info)
 Creates a Physics3DCollider with Physics3DColliderDes. More...
 
local create ( local info)
 Creates a Physics3DCollider with Physics3DColliderDes. More...
 

Public Attributes

std::function< void(Physics3DObject
*otherObject)> 
onTriggerEnter
 Set a callback when trigger enter.
 
std::function< void(Physics3DObject
*otherObject)> 
onTriggerExit
 Set a callback when trigger exit.
 
- 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...
 

Detailed Description

Inherit from Physics3DObject, the main class for Colliders.

Member Function Documentation

static Physics3DCollider* create ( Physics3DColliderDes info)
static

Creates a Physics3DCollider with Physics3DColliderDes.

An autoreleased Physics3DCollider object.

var create ( var  info)
static

Creates a Physics3DCollider with Physics3DColliderDes.

An autoreleased Physics3DCollider object.

local create ( local  info)
static

Creates a Physics3DCollider with Physics3DColliderDes.

An autoreleased Physics3DCollider object.

void setTrigger ( bool  isTrigger)

Set trigger.

Is a trigger.

var setTrigger ( var  isTrigger)

Set trigger.

Is a trigger.

local setTrigger ( local  isTrigger)

Set trigger.

Is a trigger.

bool isTrigger ( ) const

Check is a trigger.

Is a trigger.

var isTrigger ( )

Check is a trigger.

Is a trigger.

local isTrigger ( )

Check is a trigger.

Is a trigger.

void setRestitution ( float  rest)

Set restitution.

The restitution.

var setRestitution ( var  rest)

Set restitution.

The restitution.

local setRestitution ( local  rest)

Set restitution.

The restitution.

float getRestitution ( ) const

Get restitution.

The restitution.

var getRestitution ( )

Get restitution.

The restitution.

local getRestitution ( )

Get restitution.

The restitution.

void setFriction ( float  frict)

Set friction.

The friction.

var setFriction ( var  frict)

Set friction.

The friction.

local setFriction ( local  frict)

Set friction.

The friction.

float getFriction ( ) const

Get friction.

The friction.

var getFriction ( )

Get friction.

The friction.

local getFriction ( )

Get friction.

The friction.

void setRollingFriction ( float  frict)

Set rolling friction.

The rolling friction.

var setRollingFriction ( var  frict)

Set rolling friction.

The rolling friction.

local setRollingFriction ( local  frict)

Set rolling friction.

The rolling friction.

float getRollingFriction ( ) const

Get rolling friction.

The rolling friction.

var getRollingFriction ( )

Get rolling friction.

The rolling friction.

local getRollingFriction ( )

Get rolling friction.

The rolling friction.

void setHitFraction ( float  hitFraction)

Set hit friction.

The hit friction.

var setHitFraction ( var  hitFraction)

Set hit friction.

The hit friction.

local setHitFraction ( local  hitFraction)

Set hit friction.

The hit friction.

float getHitFraction ( ) const

Get hit friction.

The hit friction.

var getHitFraction ( )

Get hit friction.

The hit friction.

local getHitFraction ( )

Get hit friction.

The hit friction.

void setCcdMotionThreshold ( float  ccdMotionThreshold)

Set motion threshold, don't do continuous collision detection if the motion (in one step) is less then ccdMotionThreshold.

The motion threshold.

var setCcdMotionThreshold ( var  ccdMotionThreshold)

Set motion threshold, don't do continuous collision detection if the motion (in one step) is less then ccdMotionThreshold.

The motion threshold.

local setCcdMotionThreshold ( local  ccdMotionThreshold)

Set motion threshold, don't do continuous collision detection if the motion (in one step) is less then ccdMotionThreshold.

The motion threshold.

float getCcdMotionThreshold ( ) const

Get motion threshold.

The motion threshold.

var getCcdMotionThreshold ( )

Get motion threshold.

The motion threshold.

local getCcdMotionThreshold ( )

Get motion threshold.

The motion threshold.

void setCcdSweptSphereRadius ( float  radius)

Set swept sphere radius.

The swept sphere radius.

var setCcdSweptSphereRadius ( var  radius)

Set swept sphere radius.

The swept sphere radius.

local setCcdSweptSphereRadius ( local  radius)

Set swept sphere radius.

The swept sphere radius.

float getCcdSweptSphereRadius ( ) const

Get swept sphere radius.

The swept sphere radius.

var getCcdSweptSphereRadius ( )

Get swept sphere radius.

The swept sphere radius.

local getCcdSweptSphereRadius ( )

Get swept sphere radius.

The swept sphere radius.

virtual cocos2d::Mat4
getWorldTransform
( ) const
virtual

override.

Implements Physics3DObject.

var getWorldTransform ( )
virtual

override.

Implements Physics3DObject.

local getWorldTransform ( )
virtual

override.

Implements Physics3DObject.


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