It allows the body to rotate around x axis and translate along this axis. More...
Inherits Physics3DConstraint.
Public Member Functions | |
cocos2d::Mat4 | getFrameOffsetA () const |
get A's frame offset | |
cocos2d::Mat4 | getFrameOffsetB () const |
get B's frame offset | |
float | getLowerLinLimit () const |
get lower linear limit | |
var | getLowerLinLimit () |
get lower linear limit | |
local | getLowerLinLimit () |
get lower linear limit | |
void | setLowerLinLimit (float lowerLimit) |
set lower linear limit | |
float | getUpperLinLimit () const |
get upper linear limit | |
void | setUpperLinLimit (float upperLimit) |
set upper linear limit | |
var | setUpperLinLimit ( var upperLimit) |
set upper linear limit | |
local | setUpperLinLimit ( local upperLimit) |
set upper linear limit | |
float | getLowerAngLimit () const |
get lower angular limit | |
void | setLowerAngLimit (float lowerLimit) |
set lower angualr limit | |
var | setLowerAngLimit ( var lowerLimit) |
set lower angualr limit | |
local | setLowerAngLimit ( local lowerLimit) |
set lower angualr limit | |
float | getUpperAngLimit () const |
get upper anglular limit | |
void | setUpperAngLimit (float upperLimit) |
set upper anglular limit | |
var | setUpperAngLimit ( var upperLimit) |
set upper anglular limit | |
local | setUpperAngLimit ( local upperLimit) |
set upper anglular limit | |
bool | getUseLinearReferenceFrameA () const |
use A's frame as linear refference | |
bool | getUseFrameOffset () const |
access for UseFrameOffset | |
void | setUseFrameOffset (bool frameOffsetOnOff) |
set use frame offset | |
void | setFrames (const cocos2d::Mat4 &frameA, const cocos2d::Mat4 &frameB) |
set frames for rigid body A and B | |
Public Member Functions inherited from Physics3DConstraint | |
float | getBreakingImpulse () const |
get the impulse that break the constraint the impulse that break the constraint | |
var | getBreakingImpulse () |
get the impulse that break the constraint the impulse that break the constraint | |
local | getBreakingImpulse () |
get the impulse that break the constraint the impulse that break the constraint | |
void | setBreakingImpulse (float impulse) |
set the impulse that break the constraint the impulse that break the constraint | |
bool | isEnabled () const |
is it enabled whether the constraint is enabled | |
void | setEnabled (bool enabled) |
set enable or not whether the constraint will be enabled | |
Physics3DRigidBody * | getBodyA () const |
get rigid body a the Physics3DRigidBody A | |
local | getBodyA () |
get rigid body a the Physics3DRigidBody A | |
Physics3DRigidBody * | getBodyB () const |
get rigid body b the Physics3DRigidBody B | |
local | getBodyB () |
get rigid body b the Physics3DRigidBody B | |
ConstraintType | getConstraintType () const |
get constraint type the constraint type | |
var | getConstraintType () |
get constraint type the constraint type | |
local | getConstraintType () |
get constraint type the constraint type | |
void | setUserData (void *userData) |
get user data the user data will be seted | |
void * | getUserData () const |
get user data the user data | |
int | getOverrideNumSolverIterations () const |
get override number of solver iterations the override number of solver iterations | |
void | setOverrideNumSolverIterations (int overideNumIterations) |
override the number of constraint solver iterations used to solve this constraint, -1 will use the default number of iterations, as specified in SolverInfo.m_numIterations the number of constraint solver iterations | |
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 Physics3DSliderConstraint * | create (Physics3DRigidBody *rbA, Physics3DRigidBody *rbB, const cocos2d::Mat4 &frameInA, const cocos2d::Mat4 &frameInB, bool useLinearReferenceFrameA) |
create slider constraint rigid body A rigid body B frame in A's local space frame in B's local space use fixed frame A for linear limits | |
local | create ( local rbA, local rbB, local frameInA, local frameInB, local useLinearReferenceFrameA) |
create slider constraint rigid body A rigid body B frame in A's local space frame in B's local space use fixed frame A for linear limits | |
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... | |
It allows the body to rotate around x axis and translate along this axis.
softness, restitution and damping for different cases DirLin - moving inside linear limits LimLin - hitting linear limit DirAng - moving inside angular limits LimAng - hitting angular limit OrthoLin, OrthoAng - against constraint axis