Main   GitHub

Methods | List of all members
Scene Class Reference

Inherits BehaviorComponent, and BehaviorComponent.

Methods

void add (sceneObject)
 
void add (sceneObject)
 
void addAssetPreload (assetId)
 
void addAssetPreload (assetId)
 
void clear ([deleteObjects])
 
void clear ([deleteObjects])
 
void clearAssetPreloads ()
 
void clearAssetPreloads ()
 
int createDistanceJoint (sceneObjectA, sceneObjectB,[localAnchorA X/Y],[localAnchorB X/Y],[distance],[frequency],[dampingRatio],[collideConnected])
 
int createDistanceJoint (sceneObjectA, sceneObjectB,[localAnchorA X/Y],[localAnchorB X/Y],[distance],[frequency],[dampingRatio],[collideConnected])
 
int createFrictionJoint (sceneObjectA, sceneObjectB,[localAnchorA X/Y],[localAnchorB X/Y],[maxForce],[maxTorque],[collideConnected])
 
int createFrictionJoint (sceneObjectA, sceneObjectB,[localAnchorA X/Y],[localAnchorB X/Y],[maxForce],[maxTorque],[collideConnected])
 
int createMotorJoint (sceneObjectA, sceneObjectB,[linearOffset X/Y],[angularOffset],[maxForce],[maxTorque],[correctionFactor],[collideConnected])
 
int createMotorJoint (sceneObjectA, sceneObjectB,[linearOffset X/Y],[angularOffset],[maxForce],[maxTorque],[correctionFactor],[collideConnected])
 
int createPrismaticJoint (sceneObjectA, sceneObjectB, localAnchorA X/Y, localAnchorB X/Y, worldAxis X/Y,[collideConnected])
 
int createPrismaticJoint (sceneObjectA, sceneObjectB, localAnchorA X/Y, localAnchorB X/Y, worldAxis X/Y,[collideConnected])
 
int createPulleyJoint (sceneObjectA, sceneObjectB, localAnchorA X/Y, localAnchorB X/Y, worldGroundAnchorA X/Y, worldGroundAnchorB X/Y, ratio,[lengthA],[lengthB],[collideConnected])
 
int createPulleyJoint (sceneObjectA, sceneObjectB, localAnchorA X/Y, localAnchorB X/Y, worldGroundAnchorA X/Y, worldGroundAnchorB X/Y, ratio,[lengthA],[lengthB],[collideConnected])
 
int createRevoluteJoint (sceneObjectA, sceneObjectB,[localAnchorA X/Y],[localAnchorB X/Y],[collideConnected])
 
int createRevoluteJoint (sceneObjectA, sceneObjectB,[localAnchorA X/Y],[localAnchorB X/Y],[collideConnected])
 
int createRopeJoint (sceneObjectA, sceneObjectB,[localAnchorA X/Y],[localAnchorB X/Y],[maxLength],[collideConnected])
 
int createRopeJoint (sceneObjectA, sceneObjectB,[localAnchorA X/Y],[localAnchorB X/Y],[maxLength],[collideConnected])
 
int createTargetJoint (sceneObject, worldTarget X/Y, maxForce,[useCenterOfMass?],[frequency],[dampingRatio],[collideConnected])
 
int createTargetJoint (sceneObject, worldTarget X/Y, maxForce,[useCenterOfMass?],[frequency],[dampingRatio],[collideConnected])
 
int createWeldJoint (sceneObjectA, sceneObjectB,[localAnchorA X/Y],[localAnchorB X/Y],[frequency],[dampingRatio],[collideConnected])
 
int createWeldJoint (sceneObjectA, sceneObjectB,[localAnchorA X/Y],[localAnchorB X/Y],[frequency],[dampingRatio],[collideConnected])
 
int createWheelJoint (sceneObjectA, sceneObjectB, localAnchorA X/Y, localAnchorB X/Y, worldAxis X/Y,[collideConnected])
 
int createWheelJoint (sceneObjectA, sceneObjectB, localAnchorA X/Y, localAnchorB X/Y, worldAxis X/Y,[collideConnected])
 
bool deleteJoint (int jointId)
 
bool deleteJoint (int jointId)
 
string getAssetPreload (index)
 
string getAssetPreload (index)
 
int getAssetPreloadCount ()
 
int getAssetPreloadCount ()
 
string getControllers ()
 
string getControllers ()
 
int getCount ()
 
int getCount ()
 
string getDebugOn ()
 
string getDebugOn ()
 
float getDistanceJointDampingRatio (jointId)
 
float getDistanceJointDampingRatio (jointId)
 
float getDistanceJointFrequency (jointId)
 
float getDistanceJointFrequency (jointId)
 
float getDistanceJointLength (jointId)
 
float getDistanceJointLength (jointId)
 
float getFrictionJointMaxForce (jointId)
 
float getFrictionJointMaxForce (jointId)
 
float getFrictionJointMaxTorque (jointId)
 
float getFrictionJointMaxTorque (jointId)
 
string getGravity ()
 
string getGravity ()
 
int getJointCount ()
 
int getJointCount ()
 
string getJointType (int jointId)
 
string getJointType (int jointId)
 
float getMotorJointAngularOffset (jointId)
 
float getMotorJointAngularOffset (jointId)
 
string getMotorJointLinearOffset (jointId)
 
string getMotorJointLinearOffset (jointId)
 
float getMotorJointMaxForce (jointId)
 
float getMotorJointMaxForce (jointId)
 
float getMotorJointMaxTorque (jointId)
 
float getMotorJointMaxTorque (jointId)
 
int getObject (sceneObjectIndex)
 
int getObject (sceneObjectIndex)
 
int getPositionIterations ()
 
int getPositionIterations ()
 
string getPrismaticJointLimit (jointId)
 
string getPrismaticJointLimit (jointId)
 
string getPrismaticJointMotor (jointId)
 
string getPrismaticJointMotor (jointId)
 
float getRevoluteJointAngle (jointId)
 
float getRevoluteJointAngle (jointId)
 
string getRevoluteJointLimit (jointId)
 
string getRevoluteJointLimit (jointId)
 
string getRevoluteJointMotor (jointId)
 
string getRevoluteJointMotor (jointId)
 
float getRevoluteJointSpeed (jointId)
 
float getRevoluteJointSpeed (jointId)
 
float getRopeJointMaxLength (jointId)
 
float getRopeJointMaxLength (jointId)
 
string getSceneObjectList ()
 
string getSceneObjectList ()
 
bool getScenePause ()
 
bool getScenePause ()
 
float getSceneTime ()
 
float getSceneTime ()
 
float getTargetJointDampingRatio (jointId)
 
float getTargetJointDampingRatio (jointId)
 
float getTargetJointFrequency (jointId)
 
float getTargetJointFrequency (jointId)
 
string getTargetJointTarget (jointId)
 
string getTargetJointTarget (jointId)
 
int getVelocityIterations ()
 
int getVelocityIterations ()
 
float getWeldJointDampingRatio (jointId)
 
float getWeldJointDampingRatio (jointId)
 
float getWeldJointFrequency (jointId)
 
float getWeldJointFrequency (jointId)
 
float getWheelJointDampingRatio (jointId)
 
float getWheelJointDampingRatio (jointId)
 
float getWheelJointFrequency (jointId)
 
float getWheelJointFrequency (jointId)
 
string getWheelJointMotor (jointId)
 
string getWheelJointMotor (jointId)
 
bool isJoint (int jointId)
 
bool isJoint (int jointId)
 
void mergeScene (scene)
 
void mergeScene (scene)
 
string pickArea (startx/y, endx/y,[sceneGroupMask],[sceneLayerMask],[pickMode])
 
string pickArea (startx/y, endx/y,[sceneGroupMask],[sceneLayerMask],[pickMode])
 
string pickCircle (x/y, radius,[sceneGroupMask],[sceneLayerMask],[pickMode])
 
string pickCircle (x/y, radius,[sceneGroupMask],[sceneLayerMask],[pickMode])
 
string pickPoint (x/y,[sceneGroupMask],[sceneLayerMask],[pickMode])
 
string pickPoint (x/y,[sceneGroupMask],[sceneLayerMask],[pickMode])
 
string pickRay (startx/y, endx/y,[sceneGroupMask],[sceneLayerMask],[pickMode])
 
string pickRay (startx/y, endx/y,[sceneGroupMask],[sceneLayerMask],[pickMode])
 
string pickRayCollision (startx/y, endx/y,[sceneGroupMask],[sceneLayerMask])
 
string pickRayCollision (startx/y, endx/y,[sceneGroupMask],[sceneLayerMask])
 
void remove (sceneObject)
 
void remove (sceneObject)
 
void removeAssetPreload (assetId)
 
void removeAssetPreload (assetId)
 
void setDebugOff (debugOptions)
 
void setDebugOff (debugOptions)
 
void setDebugOn (debugOptions)
 
void setDebugOn (debugOptions)
 
void setDebugSceneObject (sceneObject)
 
void setDebugSceneObject (sceneObject)
 
void setDistanceJointDampingRatio (jointId, dampingRatio)
 
void setDistanceJointDampingRatio (jointId, dampingRatio)
 
void setDistanceJointFrequency (jointId, frequency)
 
void setDistanceJointFrequency (jointId, frequency)
 
void setDistanceJointLength (jointId, length)
 
void setDistanceJointLength (jointId, length)
 
void setFrictionJointMaxForce (jointId, maxForce)
 
void setFrictionJointMaxForce (jointId, maxForce)
 
void setFrictionJointMaxTorque (jointId, maxTorque)
 
void setFrictionJointMaxTorque (jointId, maxTorque)
 
void setGravity (forceX/forceY)
 
void setGravity (forceX/forceY)
 
void setMotorJointAngularOffset (jointId, angularOffset)
 
void setMotorJointAngularOffset (jointId, angularOffset)
 
void setMotorJointLinearOffset (jointId, linearOffset X/Y)
 
void setMotorJointLinearOffset (jointId, linearOffset X/Y)
 
void setMotorJointMaxForce (jointId, maxForce)
 
void setMotorJointMaxForce (jointId, maxForce)
 
void setMotorJointMaxTorque (jointId, maxTorque)
 
void setMotorJointMaxTorque (jointId, maxTorque)
 
void setPositionIterations (int iterations)
 
void setPositionIterations (int iterations)
 
void setPrismaticJointLimit (jointId, enableLimit,[lowerTranslation],[upperTranslation])
 
void setPrismaticJointLimit (jointId, enableLimit,[lowerTranslation],[upperTranslation])
 
void setPrismaticJointMotor (jointId, enableMotor,[motorSpeed],[maxMotorForce])
 
void setPrismaticJointMotor (jointId, enableMotor,[motorSpeed],[maxMotorForce])
 
void setRevoluteJointLimit (jointId, enableLimit,[lowerAngle],[upperAngle])
 
void setRevoluteJointLimit (jointId, enableLimit,[lowerAngle],[upperAngle])
 
void setRevoluteJointMotor (jointId, enableMotor,[motorSpeed],[maxMotorTorque])
 
void setRevoluteJointMotor (jointId, enableMotor,[motorSpeed],[maxMotorTorque])
 
void setRopeJointMaxLength (jointId, maxLength)
 
void setRopeJointMaxLength (jointId, maxLength)
 
void setScenePause (status)
 
void setScenePause (status)
 
void setTargetJointDampingRatio (jointId, dampingRatio)
 
void setTargetJointDampingRatio (jointId, dampingRatio)
 
void setTargetJointFrequency (jointId, frequency)
 
void setTargetJointFrequency (jointId, frequency)
 
void setTargetJointTarget (jointId, worldTarget X/Y)
 
void setTargetJointTarget (jointId, worldTarget X/Y)
 
void setVelocityIterations (int iterations)
 
void setVelocityIterations (int iterations)
 
void setWeldJointDampingRatio (jointId, dampingRatio)
 
void setWeldJointDampingRatio (jointId, dampingRatio)
 
void setWeldJointFrequency (jointId, frequency)
 
void setWeldJointFrequency (jointId, frequency)
 
void setWheelJointDampingRatio (jointId, dampingRatio)
 
void setWheelJointDampingRatio (jointId, dampingRatio)
 
void setWheelJointFrequency (jointId, frequency)
 
void setWheelJointFrequency (jointId, frequency)
 
void setWheelJointMotor (jointId, enableMotor,[motorSpeed],[maxMotorTorque])
 
void setWheelJointMotor (jointId, enableMotor,[motorSpeed],[maxMotorTorque])
 
- Methods inherited from BehaviorComponent
bool addBehavior (BehaviorInstance bi)
 
bool addBehavior (BehaviorInstance bi)
 
void clearBehaviors ()
 
void clearBehaviors ()
 
bool connect (outputBehavior, inputBehavior, outputName, inputName)
 
bool connect (outputBehavior, inputBehavior, outputName, inputName)
 
bool disconnect (outputBehavior, inputBehavior, outputName, inputName)
 
bool disconnect (outputBehavior, inputBehavior, outputName, inputName)
 
int getBehavior (string BehaviorTemplateName)
 
int getBehavior (string BehaviorTemplateName)
 
int getBehaviorByIndex (int index)
 
int getBehaviorByIndex (int index)
 
string getBehaviorConnection (outputBehavior, outputName, connectionIndex)
 
string getBehaviorConnection (outputBehavior, outputName, connectionIndex)
 
int getBehaviorConnectionCount (outputBehavior, outputName)
 
int getBehaviorConnectionCount (outputBehavior, outputName)
 
int getBehaviorCount ()
 
int getBehaviorCount ()
 
bool raise (outputBehavior, outputName,[deltaTime])
 
bool raise (outputBehavior, outputName,[deltaTime])
 
bool removeBehavior (BehaviorInstance bi,[bool deleteBehavior=true])
 
bool removeBehavior (BehaviorInstance bi,[bool deleteBehavior=true])
 
bool reOrder (BehaviorInstance inst,[int desiredIndex=0])
 
bool reOrder (BehaviorInstance inst,[int desiredIndex=0])
 
- Methods inherited from DynamicConsoleMethodComponent
string callOnBehaviors (methodName, argi)
 
string callOnBehaviors (methodName, argi)
 
- Methods inherited from SimComponent
bool addComponents (%compObjName,%compObjName2,...)
 
bool addComponents (%compObjName,%compObjName2,...)
 
int getComponent (idx)
 
int getComponent (idx)
 
int getComponentCount ()
 
int getComponentCount ()
 
bool isEnabled ()
 
bool isEnabled ()
 
bool removeComponents (%compObjName,%compObjName2,...)
 
bool removeComponents (%compObjName,%compObjName2,...)
 
void setEnabled (enabled)
 
void setEnabled (enabled)
 
- Methods inherited from SimObject
void addFieldFilter (fieldName)
 
void addFieldFilter (fieldName)
 
string call (%args)
 
string call (%args)
 
int clone ([bool copyDynamicFields?=false])
 
int clone ([bool copyDynamicFields?=false])
 
void delete ()
 
void delete ()
 
void dump ()
 
void dump ()
 
void dumpClassHierarchy ()
 
void dumpClassHierarchy ()
 
string getClassName ()
 
string getClassName ()
 
string getClassNamespace ()
 
string getClassNamespace ()
 
string getDynamicField (index)
 
string getDynamicField (index)
 
int getDynamicFieldCount ()
 
int getDynamicFieldCount ()
 
string getField (int index)
 
string getField (int index)
 
int getFieldCount ()
 
int getFieldCount ()
 
string getFieldType (fieldName)
 
string getFieldType (fieldName)
 
string getFieldValue (fieldName)
 
string getFieldValue (fieldName)
 
int getGroup ()
 
int getGroup ()
 
int getId ()
 
int getId ()
 
string getInternalName ()
 
string getInternalName ()
 
string getName ()
 
string getName ()
 
string getProgenitorFile ()
 
string getProgenitorFile ()
 
string getSuperClassNamespace ()
 
string getSuperClassNamespace ()
 
int getType ()
 
int getType ()
 
bool isChildOfGroup ()
 
bool isChildOfGroup ()
 
bool isMemberOfClass (string classname)
 
bool isMemberOfClass (string classname)
 
bool isMethod (string method name)
 
bool isMethod (string method name)
 
bool isTimerActive ()
 
bool isTimerActive ()
 
void removeFieldFilter (fieldName)
 
void removeFieldFilter (fieldName)
 
bool save (fileName,[selectedOnly])
 
bool save (fileName,[selectedOnly])
 
int schedule (time, command,< arg1...argN >)
 
int schedule (time, command,< arg1...argN >)
 
void setClassNamespace ()
 
void setClassNamespace ()
 
bool setFieldValue (fieldName, value)
 
bool setFieldValue (fieldName, value)
 
void setInternalName ()
 
void setInternalName ()
 
void setName (newName)
 
void setName (newName)
 
void setProgenitorFile (file)
 
void setProgenitorFile (file)
 
void setSuperClassNamespace ()
 
void setSuperClassNamespace ()
 
bool startTimer (callbackFunction, float timePeriod,[repeat])
 
bool startTimer (callbackFunction, float timePeriod,[repeat])
 
void stopTimer ()
 
void stopTimer ()
 

Additional Inherited Members

- Fields inherited from BehaviorComponent
bool Enabled
 
bool canSaveDynamicFields
 
string internalName
 
SimObjectPtr parentGroup
 
string superclass
 
string class
 

Methods

void Scene::add ( sceneObject  )

Add the SceneObject to the scene.

Parameters
sceneObjectThe SceneObject to add to the scene.
Returns
No return value.
void Scene::add ( sceneObject  )

Add the SceneObject to the scene.

Parameters
sceneObjectThe SceneObject to add to the scene.
Returns
No return value.
void Scene::addAssetPreload ( assetId  )

Adds the asset Id so that it is preloaded when the scene is loaded. The asset loaded immediately by this operation. Duplicate assets are ignored.

Parameters
assetIdThe asset Id to be added.
Returns
No return value.
void Scene::addAssetPreload ( assetId  )

Adds the asset Id so that it is preloaded when the scene is loaded. The asset loaded immediately by this operation. Duplicate assets are ignored.

Parameters
assetIdThe asset Id to be added.
Returns
No return value.
void Scene::clear ( )

Clear the scene of all scene objects.

Parameters
deleteObjectsA boolean flag that sets whether to delete the objects as well as remove them from the scene (default is true).
Returns
No return value.
void Scene::clear ( )

Clear the scene of all scene objects.

Parameters
deleteObjectsA boolean flag that sets whether to delete the objects as well as remove them from the scene (default is true).
Returns
No return value.
void Scene::clearAssetPreloads ( )

Clears all assets added as a preload.

Returns
No return value.
void Scene::clearAssetPreloads ( )

Clears all assets added as a preload.

Returns
No return value.
int Scene::createDistanceJoint ( sceneObjectA  ,
sceneObjectB   
)

Creates a distance joint.

Parameters
sceneObjectAThe first scene object to connect to the joint. Use an empty string to indicate the Scene ground body.
sceneObjectBThe second scene object to connect to the joint. Use an empty string to indicate the Scene ground body.
localAnchorAThe local point of the first scene object where the joint connects.
localAnchorBThe local point of the second scene object where the joint connects.
distanceThe distance the joint should maintain between scene objects. The default is the distance currently between the scene objects.
frequencyThe mass-spring-damper frequency in Hertz. A value of 0 disables softness (default).
dampingRatioThe damping ratio. 0 = no damping (default), 1 = critical damping.
collideConnectedWhether the scene objects can collide with each other while connected with this joint.
Returns
The joint Id (-1 if error).
int Scene::createDistanceJoint ( sceneObjectA  ,
sceneObjectB   
)

Creates a distance joint.

Parameters
sceneObjectAThe first scene object to connect to the joint. Use an empty string to indicate the Scene ground body.
sceneObjectBThe second scene object to connect to the joint. Use an empty string to indicate the Scene ground body.
localAnchorAThe local point of the first scene object where the joint connects.
localAnchorBThe local point of the second scene object where the joint connects.
distanceThe distance the joint should maintain between scene objects. The default is the distance currently between the scene objects.
frequencyThe mass-spring-damper frequency in Hertz. A value of 0 disables softness (default).
dampingRatioThe damping ratio. 0 = no damping (default), 1 = critical damping.
collideConnectedWhether the scene objects can collide with each other while connected with this joint.
Returns
The joint Id (-1 if error).
int Scene::createFrictionJoint ( sceneObjectA  ,
sceneObjectB   
)

Creates a friction joint.

Parameters
sceneObjectAThe first scene object to connect to the joint. Use an empty string to indicate the Scene ground body.
sceneObjectBThe second scene object to connect to the joint. Use an empty string to indicate the Scene ground body.
localAnchorAThe local point of the first scene object where the joint connects.
localAnchorBThe local point of the second scene object where the joint connects.
maxForceThe maximum friction force (N).
maxTorqueThe maximum torque force (N-m).
collideConnectedWhether the scene objects can collide with each other while connected with this joint.
Returns
The joint Id (-1 if error).
int Scene::createFrictionJoint ( sceneObjectA  ,
sceneObjectB   
)

Creates a friction joint.

Parameters
sceneObjectAThe first scene object to connect to the joint. Use an empty string to indicate the Scene ground body.
sceneObjectBThe second scene object to connect to the joint. Use an empty string to indicate the Scene ground body.
localAnchorAThe local point of the first scene object where the joint connects.
localAnchorBThe local point of the second scene object where the joint connects.
maxForceThe maximum friction force (N).
maxTorqueThe maximum torque force (N-m).
collideConnectedWhether the scene objects can collide with each other while connected with this joint.
Returns
The joint Id (-1 if error).
int Scene::createMotorJoint ( sceneObjectA  ,
sceneObjectB   
)

Creates a motor joint.

Parameters
sceneObjectAThe first scene object to connect to the joint. Use an empty string to indicate the Scene ground body.
sceneObjectBThe second scene object to connect to the joint. Use an empty string to indicate the Scene ground body.
linearOffsetX/YThe linear offset in sceneObjectA space.
angularOffsetThe angularOffset between the bodies.
maxForceThe maximum friction force (N).
maxTorqueThe maximum torque force (N-m).
correctionFactorThe correction factor (tolerance).
collideConnectedWhether the scene objects can collide with each other while connected with this joint.
Returns
The joint Id (-1 if error).
int Scene::createMotorJoint ( sceneObjectA  ,
sceneObjectB   
)

Creates a motor joint.

Parameters
sceneObjectAThe first scene object to connect to the joint. Use an empty string to indicate the Scene ground body.
sceneObjectBThe second scene object to connect to the joint. Use an empty string to indicate the Scene ground body.
linearOffsetX/YThe linear offset in sceneObjectA space.
angularOffsetThe angularOffset between the bodies.
maxForceThe maximum friction force (N).
maxTorqueThe maximum torque force (N-m).
correctionFactorThe correction factor (tolerance).
collideConnectedWhether the scene objects can collide with each other while connected with this joint.
Returns
The joint Id (-1 if error).
int Scene::createPrismaticJoint ( sceneObjectA  ,
sceneObjectB  ,
localAnchorA X/  Y,
localAnchorB X/  Y,
worldAxis X/  Y 
)

Creates a prismatic joint.

Parameters
sceneObjectAThe first scene object to connect to the joint. Use an empty string to indicate the Scene ground body.
sceneObjectBThe second scene object to connect to the joint. Use an empty string to indicate the Scene ground body.
localAnchorAThe local point of the first scene object where the joint connects.
localAnchorBThe local point of the second scene object where the joint connects.
worldAxisThe world axis defining the translational degree of freedom.
collideConnectedWhether the scene objects can collide with each other while connected with this joint.
Returns
The joint Id (-1 if error).
int Scene::createPrismaticJoint ( sceneObjectA  ,
sceneObjectB  ,
localAnchorA X/  Y,
localAnchorB X/  Y,
worldAxis X/  Y 
)

Creates a prismatic joint.

Parameters
sceneObjectAThe first scene object to connect to the joint. Use an empty string to indicate the Scene ground body.
sceneObjectBThe second scene object to connect to the joint. Use an empty string to indicate the Scene ground body.
localAnchorAThe local point of the first scene object where the joint connects.
localAnchorBThe local point of the second scene object where the joint connects.
worldAxisThe world axis defining the translational degree of freedom.
collideConnectedWhether the scene objects can collide with each other while connected with this joint.
Returns
The joint Id (-1 if error).
int Scene::createPulleyJoint ( sceneObjectA  ,
sceneObjectB  ,
localAnchorA X/  Y,
localAnchorB X/  Y,
worldGroundAnchorA X/  Y,
worldGroundAnchorB X/  Y,
ratio   
)

Creates a prismatic joint.

Parameters
sceneObjectAThe first scene object to connect to the joint. Use an empty string to indicate the Scene ground body.
sceneObjectBThe second scene object to connect to the joint. Use an empty string to indicate the Scene ground body.
localAnchorAThe local point of the first scene object where the joint connects.
localAnchorBThe local point of the second scene object where the joint connects.
worldGroundAnchorAThe world point of the first ground anchor. This point never moves.
worldGroundAnchorBThe world point of the second ground anchor. This point never moves.
ratioThe pulley ratio used to simulate a block-and-tackle pulley.
lengthAThe reference pulley length for the segment attached to scene object A. Defaults to the distance between the first scene object and the first ground anchor.
lengthBThe reference pulley length for the segment attached to scene object B. Defaults to the distance between the second scene object and the second ground anchor.
collideConnectedWhether the scene objects can collide with each other while connected with this joint.
Returns
The joint Id (-1 if error).
int Scene::createPulleyJoint ( sceneObjectA  ,
sceneObjectB  ,
localAnchorA X/  Y,
localAnchorB X/  Y,
worldGroundAnchorA X/  Y,
worldGroundAnchorB X/  Y,
ratio   
)

Creates a prismatic joint.

Parameters
sceneObjectAThe first scene object to connect to the joint. Use an empty string to indicate the Scene ground body.
sceneObjectBThe second scene object to connect to the joint. Use an empty string to indicate the Scene ground body.
localAnchorAThe local point of the first scene object where the joint connects.
localAnchorBThe local point of the second scene object where the joint connects.
worldGroundAnchorAThe world point of the first ground anchor. This point never moves.
worldGroundAnchorBThe world point of the second ground anchor. This point never moves.
ratioThe pulley ratio used to simulate a block-and-tackle pulley.
lengthAThe reference pulley length for the segment attached to scene object A. Defaults to the distance between the first scene object and the first ground anchor.
lengthBThe reference pulley length for the segment attached to scene object B. Defaults to the distance between the second scene object and the second ground anchor.
collideConnectedWhether the scene objects can collide with each other while connected with this joint.
Returns
The joint Id (-1 if error).
int Scene::createRevoluteJoint ( sceneObjectA  ,
sceneObjectB   
)

Creates a revolute joint.

Parameters
sceneObjectAThe first scene object to connect to the joint. Use an empty string to indicate the Scene ground body.
sceneObjectBThe second scene object to connect to the joint. Use an empty string to indicate the Scene ground body.
localAnchorAThe local point of the first scene object where the joint connects.
localAnchorBThe local point of the second scene object where the joint connects.
collideConnectedWhether the scene objects can collide with each other while connected with this joint.
Returns
The joint Id (-1 if error).
int Scene::createRevoluteJoint ( sceneObjectA  ,
sceneObjectB   
)

Creates a revolute joint.

Parameters
sceneObjectAThe first scene object to connect to the joint. Use an empty string to indicate the Scene ground body.
sceneObjectBThe second scene object to connect to the joint. Use an empty string to indicate the Scene ground body.
localAnchorAThe local point of the first scene object where the joint connects.
localAnchorBThe local point of the second scene object where the joint connects.
collideConnectedWhether the scene objects can collide with each other while connected with this joint.
Returns
The joint Id (-1 if error).
int Scene::createRopeJoint ( sceneObjectA  ,
sceneObjectB   
)

Creates a rope joint.

Parameters
sceneObjectAThe first scene object to connect to the joint. Use an empty string to indicate the Scene ground body.
sceneObjectBThe second scene object to connect to the joint. Use an empty string to indicate the Scene ground body.
localAnchorAThe local point of the first scene object where the joint connects.
localAnchorBThe local point of the second scene object where the joint connects.
maxLengthThe maximum rigid length of the rope.
collideConnectedWhether the scene objects can collide with each other while connected with this joint.
Returns
The joint Id (-1 if error).
int Scene::createRopeJoint ( sceneObjectA  ,
sceneObjectB   
)

Creates a rope joint.

Parameters
sceneObjectAThe first scene object to connect to the joint. Use an empty string to indicate the Scene ground body.
sceneObjectBThe second scene object to connect to the joint. Use an empty string to indicate the Scene ground body.
localAnchorAThe local point of the first scene object where the joint connects.
localAnchorBThe local point of the second scene object where the joint connects.
maxLengthThe maximum rigid length of the rope.
collideConnectedWhether the scene objects can collide with each other while connected with this joint.
Returns
The joint Id (-1 if error).
int Scene::createTargetJoint ( sceneObject  ,
worldTarget X/  Y,
maxForce   
)

Creates a target joint.

Parameters
sceneObjectThe scene object to connect to the joint.
worldTargetThe world point target to move the scene object to.
maxForceThe maximum force the joint should use to position the scene object at the target.
useCenterOfMassWhether to use the center of mass as the point which the joint is attached or not. Defaults to false.
frequencyThe mass-spring-damper frequency in Hertz. A value of 0 disables softness (default=0.7).
dampingRatioThe damping ratio. 0 = no damping (default), 1 = critical damping.
collideConnectedWhether the scene objects can collide with each other while connected with this joint.
Returns
The joint Id (-1 if error).
int Scene::createTargetJoint ( sceneObject  ,
worldTarget X/  Y,
maxForce   
)

Creates a target joint.

Parameters
sceneObjectThe scene object to connect to the joint.
worldTargetThe world point target to move the scene object to.
maxForceThe maximum force the joint should use to position the scene object at the target.
useCenterOfMassWhether to use the center of mass as the point which the joint is attached or not. Defaults to false.
frequencyThe mass-spring-damper frequency in Hertz. A value of 0 disables softness (default=0.7).
dampingRatioThe damping ratio. 0 = no damping (default), 1 = critical damping.
collideConnectedWhether the scene objects can collide with each other while connected with this joint.
Returns
The joint Id (-1 if error).
int Scene::createWeldJoint ( sceneObjectA  ,
sceneObjectB   
)

Creates a weld joint.

Parameters
sceneObjectAThe first scene object to connect to the joint. Use an empty string to indicate the Scene ground body.
sceneObjectBThe second scene object to connect to the joint. Use an empty string to indicate the Scene ground body.
localAnchorAThe local point of the first scene object where the joint connects.
localAnchorBThe local point of the second scene object where the joint connects.
frequencyThe mass-spring-damper frequency in Hertz. A value of 0 disables softness (default).
dampingRatioThe damping ratio. 0 = no damping (default), 1 = critical damping.
collideConnectedWhether the scene objects can collide with each other while connected with this joint.
Returns
The joint Id (-1 if error).
int Scene::createWeldJoint ( sceneObjectA  ,
sceneObjectB   
)

Creates a weld joint.

Parameters
sceneObjectAThe first scene object to connect to the joint. Use an empty string to indicate the Scene ground body.
sceneObjectBThe second scene object to connect to the joint. Use an empty string to indicate the Scene ground body.
localAnchorAThe local point of the first scene object where the joint connects.
localAnchorBThe local point of the second scene object where the joint connects.
frequencyThe mass-spring-damper frequency in Hertz. A value of 0 disables softness (default).
dampingRatioThe damping ratio. 0 = no damping (default), 1 = critical damping.
collideConnectedWhether the scene objects can collide with each other while connected with this joint.
Returns
The joint Id (-1 if error).
int Scene::createWheelJoint ( sceneObjectA  ,
sceneObjectB  ,
localAnchorA X/  Y,
localAnchorB X/  Y,
worldAxis X/  Y 
)

Creates a wheel joint.

Parameters
sceneObjectAThe first scene object to connect to the joint. Use an empty string to indicate the Scene ground body.
sceneObjectBThe second scene object to connect to the joint. Use an empty string to indicate the Scene ground body.
localAnchorAThe local point of the first scene object where the joint connects.
localAnchorBThe local point of the second scene object where the joint connects.
worldAxisThe world axis of the wheel suspension spring.
collideConnectedWhether the scene objects can collide with each other while connected with this joint.
Returns
The joint Id (-1 if error).
int Scene::createWheelJoint ( sceneObjectA  ,
sceneObjectB  ,
localAnchorA X/  Y,
localAnchorB X/  Y,
worldAxis X/  Y 
)

Creates a wheel joint.

Parameters
sceneObjectAThe first scene object to connect to the joint. Use an empty string to indicate the Scene ground body.
sceneObjectBThe second scene object to connect to the joint. Use an empty string to indicate the Scene ground body.
localAnchorAThe local point of the first scene object where the joint connects.
localAnchorBThe local point of the second scene object where the joint connects.
worldAxisThe world axis of the wheel suspension spring.
collideConnectedWhether the scene objects can collide with each other while connected with this joint.
Returns
The joint Id (-1 if error).
bool Scene::deleteJoint ( int  jointId)

Deletes the specified joint Id.

Parameters
jointIdThe Id of the joint.
Returns
Whether the joint was successfully deleted or not.
bool Scene::deleteJoint ( int  jointId)

Deletes the specified joint Id.

Parameters
jointIdThe Id of the joint.
Returns
Whether the joint was successfully deleted or not.
string Scene::getAssetPreload ( index  )

Gets the asset to be preloaded at the specified index.

Parameters
indexThe index of the preloaded asset.
Returns
The asset to be preloaded at the specified index.
string Scene::getAssetPreload ( index  )

Gets the asset to be preloaded at the specified index.

Parameters
indexThe index of the preloaded asset.
Returns
The asset to be preloaded at the specified index.
int Scene::getAssetPreloadCount ( )

Gets the number of assets set to preload for this scene.

Returns
The number of assets set to preload for this scene.
int Scene::getAssetPreloadCount ( )

Gets the number of assets set to preload for this scene.

Returns
The number of assets set to preload for this scene.
string Scene::getControllers ( )

Gets the Scene Controllers.

Returns
Gets the scene controllers.
string Scene::getControllers ( )

Gets the Scene Controllers.

Returns
Gets the scene controllers.
int Scene::getCount ( )

Gets the count of scene objects in the scnee.

Returns
Returns the number of scene objects in current scene as an integer.
int Scene::getCount ( )

Gets the count of scene objects in the scnee.

Returns
Returns the number of scene objects in current scene as an integer.
string Scene::getDebugOn ( )

Gets the state of the debug modes.

Returns
Returns a space separated list of debug modes that are active.
string Scene::getDebugOn ( )

Gets the state of the debug modes.

Returns
Returns a space separated list of debug modes that are active.
float Scene::getDistanceJointDampingRatio ( jointId  )

Gets the damping ratio.

Parameters
jointIdThe Id of the joint to use.
Returns
Returns the damping ratio (-1 indicates error).
float Scene::getDistanceJointDampingRatio ( jointId  )

Gets the damping ratio.

Parameters
jointIdThe Id of the joint to use.
Returns
Returns the damping ratio (-1 indicates error).
float Scene::getDistanceJointFrequency ( jointId  )

Gets the mass-spring-damper frequency in Hertz.

Parameters
jointIdThe Id of the joint to use.
Returns
Returns the mass-spring-damper frequency in Hertz (-1 indicates error).
float Scene::getDistanceJointFrequency ( jointId  )

Gets the mass-spring-damper frequency in Hertz.

Parameters
jointIdThe Id of the joint to use.
Returns
Returns the mass-spring-damper frequency in Hertz (-1 indicates error).
float Scene::getDistanceJointLength ( jointId  )

Gets the distance the joint should maintain between scene objects.

Parameters
jointIdThe Id of the joint to use.
Returns
Returns the distance the joint should maintain between scene objects (-1 indicates error).
float Scene::getDistanceJointLength ( jointId  )

Gets the distance the joint should maintain between scene objects.

Parameters
jointIdThe Id of the joint to use.
Returns
Returns the distance the joint should maintain between scene objects (-1 indicates error).
float Scene::getFrictionJointMaxForce ( jointId  )

Sets the maximum friction force.

Parameters
jointIdThe Id of the joint to use.
Returns
Returns the maximum friction force (-1 indicates error).
float Scene::getFrictionJointMaxForce ( jointId  )

Sets the maximum friction force.

Parameters
jointIdThe Id of the joint to use.
Returns
Returns the maximum friction force (-1 indicates error).
float Scene::getFrictionJointMaxTorque ( jointId  )

Gets the maximum torque force.

Parameters
jointIdThe Id of the joint to use.
Returns
Returns the maximum torque force (-1 indicates error).
float Scene::getFrictionJointMaxTorque ( jointId  )

Gets the maximum torque force.

Parameters
jointIdThe Id of the joint to use.
Returns
Returns the maximum torque force (-1 indicates error).
string Scene::getGravity ( )

Gets the gravity force applied to all objects in the scene.

Returns
The gravity force applied to all objects in the scene.
string Scene::getGravity ( )

Gets the gravity force applied to all objects in the scene.

Returns
The gravity force applied to all objects in the scene.
int Scene::getJointCount ( )

Gets the joint count.

Returns
Returns no value
int Scene::getJointCount ( )

Gets the joint count.

Returns
Returns no value
string Scene::getJointType ( int  jointId)

Gets the joint type of the specified joint Id.

Parameters
jointIdThe Id of the joint.
Returns
The type of joint of the specified joint Id.
string Scene::getJointType ( int  jointId)

Gets the joint type of the specified joint Id.

Parameters
jointIdThe Id of the joint.
Returns
The type of joint of the specified joint Id.
float Scene::getMotorJointAngularOffset ( jointId  )

Gets angularOffset between the bodies.

Parameters
jointIdThe Id of the joint to use.
Returns
Returns the angularOffset between the bodies (-1 indicates error).
float Scene::getMotorJointAngularOffset ( jointId  )

Gets angularOffset between the bodies.

Parameters
jointIdThe Id of the joint to use.
Returns
Returns the angularOffset between the bodies (-1 indicates error).
string Scene::getMotorJointLinearOffset ( jointId  )

Gets the linear offset in sceneObjectA space.

Parameters
jointIdThe Id of the joint to use.
Returns
Returns the linear offset in sceneObjectA space (always 0,0 if error).
string Scene::getMotorJointLinearOffset ( jointId  )

Gets the linear offset in sceneObjectA space.

Parameters
jointIdThe Id of the joint to use.
Returns
Returns the linear offset in sceneObjectA space (always 0,0 if error).
float Scene::getMotorJointMaxForce ( jointId  )

Sets the maximum motor force.

Parameters
jointIdThe Id of the joint to use.
Returns
Returns the maximum motor force (-1 indicates error).
float Scene::getMotorJointMaxForce ( jointId  )

Sets the maximum motor force.

Parameters
jointIdThe Id of the joint to use.
Returns
Returns the maximum motor force (-1 indicates error).
float Scene::getMotorJointMaxTorque ( jointId  )

Gets the maximum motor torque force.

Parameters
jointIdThe Id of the joint to use.
Returns
Returns the maximum motor torque force (-1 indicates error).
float Scene::getMotorJointMaxTorque ( jointId  )

Gets the maximum motor torque force.

Parameters
jointIdThe Id of the joint to use.
Returns
Returns the maximum motor torque force (-1 indicates error).
int Scene::getObject ( sceneObjectIndex  )

Gets the scene object at the selected index.

Parameters
sceneObjectIndexThe index of the desired object
Returns
The scene object at the specified index.
int Scene::getObject ( sceneObjectIndex  )

Gets the scene object at the selected index.

Parameters
sceneObjectIndexThe index of the desired object
Returns
The scene object at the specified index.
int Scene::getPositionIterations ( )

Gets the number of position iterations the physics solver uses. (

Returns
The number of position iterations the physics solver uses.
int Scene::getPositionIterations ( )

Gets the number of position iterations the physics solver uses. (

Returns
The number of position iterations the physics solver uses.
string Scene::getPrismaticJointLimit ( jointId  )

Gets whether the joint has translational limits or not and the limits themselves.

Returns
Returns whether the joint has translational limits or not and the limits themselves (empty string indicates error).
string Scene::getPrismaticJointLimit ( jointId  )

Gets whether the joint has translational limits or not and the limits themselves.

Returns
Returns whether the joint has translational limits or not and the limits themselves (empty string indicates error).
string Scene::getPrismaticJointMotor ( jointId  )

Gets whether the joint has a motor or not and the motor settings.

Returns
Returns whether the joint has a motor or not and the motor settings (empty string indicates error).
string Scene::getPrismaticJointMotor ( jointId  )

Gets whether the joint has a motor or not and the motor settings.

Returns
Returns whether the joint has a motor or not and the motor settings (empty string indicates error).
float Scene::getRevoluteJointAngle ( jointId  )

Gets the current angle of a revolute joint.

Parameters
jointIdThe Id of the joint to use.
Returns
Returns the joint angle.
float Scene::getRevoluteJointAngle ( jointId  )

Gets the current angle of a revolute joint.

Parameters
jointIdThe Id of the joint to use.
Returns
Returns the joint angle.
string Scene::getRevoluteJointLimit ( jointId  )

Gets whether the joint has angular limits or not and the limits themselves.

Parameters
jointIdThe Id of the joint to use.
Returns
Returns whether the joint has angular limits or not and the limits themselves (empty string indicates error).
string Scene::getRevoluteJointLimit ( jointId  )

Gets whether the joint has angular limits or not and the limits themselves.

Parameters
jointIdThe Id of the joint to use.
Returns
Returns whether the joint has angular limits or not and the limits themselves (empty string indicates error).
string Scene::getRevoluteJointMotor ( jointId  )

Gets whether the joint has a motor or not and the motor settings.

Parameters
jointIdThe Id of the joint to use.
Returns
Returns whether the joint has a motor or not and the motor settings (empty string indicates error).
string Scene::getRevoluteJointMotor ( jointId  )

Gets whether the joint has a motor or not and the motor settings.

Parameters
jointIdThe Id of the joint to use.
Returns
Returns whether the joint has a motor or not and the motor settings (empty string indicates error).
float Scene::getRevoluteJointSpeed ( jointId  )

Gets the current speed of a revolute joint.

Parameters
jointIdThe Id of the joint to use.
Returns
Returns the joint speed as Angular Velocity
float Scene::getRevoluteJointSpeed ( jointId  )

Gets the current speed of a revolute joint.

Parameters
jointIdThe Id of the joint to use.
Returns
Returns the joint speed as Angular Velocity
float Scene::getRopeJointMaxLength ( jointId  )

Gets the maximum rigid length of the rope.

Parameters
jointIdThe Id of the joint to use.
Returns
Returns the maximum rigid length of the rope (-1 indicates error).
float Scene::getRopeJointMaxLength ( jointId  )

Gets the maximum rigid length of the rope.

Parameters
jointIdThe Id of the joint to use.
Returns
Returns the maximum rigid length of the rope (-1 indicates error).
string Scene::getSceneObjectList ( )

Gets the Scene Object-List.

Returns
Returns a string with a list of object IDs
string Scene::getSceneObjectList ( )

Gets the Scene Object-List.

Returns
Returns a string with a list of object IDs
bool Scene::getScenePause ( )

Gets scene pause status.

Returns
Returns a boolean value. True if pause status, false otherwise.
bool Scene::getScenePause ( )

Gets scene pause status.

Returns
Returns a boolean value. True if pause status, false otherwise.
float Scene::getSceneTime ( )

Gets the Scene Time.

Returns
Returns the time as a floating point number
float Scene::getSceneTime ( )

Gets the Scene Time.

Returns
Returns the time as a floating point number
float Scene::getTargetJointDampingRatio ( jointId  )

Sets the damping ratio.

Parameters
jointIdThe Id of the joint to use.
Returns
Returns the damping ratio (-1 indicates error).
float Scene::getTargetJointDampingRatio ( jointId  )

Sets the damping ratio.

Parameters
jointIdThe Id of the joint to use.
Returns
Returns the damping ratio (-1 indicates error).
float Scene::getTargetJointFrequency ( jointId  )

Gets the mass-spring-damper frequency in Hertz.

Parameters
jointIdThe Id of the joint to use.
Returns
Returns the mass-spring-damper frequency in Hertz (-1 indicates error).
float Scene::getTargetJointFrequency ( jointId  )

Gets the mass-spring-damper frequency in Hertz.

Parameters
jointIdThe Id of the joint to use.
Returns
Returns the mass-spring-damper frequency in Hertz (-1 indicates error).
string Scene::getTargetJointTarget ( jointId  )

Gets the target world point for the scene object.

Parameters
jointIdThe Id of the joint to use.
Returns
Returns the target world point for the scene object (always 0,0 if error).
string Scene::getTargetJointTarget ( jointId  )

Gets the target world point for the scene object.

Parameters
jointIdThe Id of the joint to use.
Returns
Returns the target world point for the scene object (always 0,0 if error).
int Scene::getVelocityIterations ( )

Gets the number of velocity iterations the physics solver uses. (

Returns
The number of velocity iterations the physics solver uses.
int Scene::getVelocityIterations ( )

Gets the number of velocity iterations the physics solver uses. (

Returns
The number of velocity iterations the physics solver uses.
float Scene::getWeldJointDampingRatio ( jointId  )

Gets the damping ratio.

Parameters
jointIdThe Id of the joint to use.
Returns
Returns the damping ratio (-1 indicates error).
float Scene::getWeldJointDampingRatio ( jointId  )

Gets the damping ratio.

Parameters
jointIdThe Id of the joint to use.
Returns
Returns the damping ratio (-1 indicates error).
float Scene::getWeldJointFrequency ( jointId  )

Gets the mass-spring-damper frequency in Hertz.

Parameters
jointIdThe Id of the joint to use.
Returns
Returns the mass-spring-damper frequency in Hertz (-1 indicates error).
float Scene::getWeldJointFrequency ( jointId  )

Gets the mass-spring-damper frequency in Hertz.

Parameters
jointIdThe Id of the joint to use.
Returns
Returns the mass-spring-damper frequency in Hertz (-1 indicates error).
float Scene::getWheelJointDampingRatio ( jointId  )

Gets the damping ratio.

Parameters
jointIdThe Id of the joint to use.
Returns
Returns the damping ratio (-1 indicates error).
float Scene::getWheelJointDampingRatio ( jointId  )

Gets the damping ratio.

Parameters
jointIdThe Id of the joint to use.
Returns
Returns the damping ratio (-1 indicates error).
float Scene::getWheelJointFrequency ( jointId  )

Gets the mass-spring-damper frequency in Hertz.

Parameters
jointIdThe Id of the joint to use.
Returns
Returns the mass-spring-damper frequency in Hertz (-1 indicates error).
float Scene::getWheelJointFrequency ( jointId  )

Gets the mass-spring-damper frequency in Hertz.

Parameters
jointIdThe Id of the joint to use.
Returns
Returns the mass-spring-damper frequency in Hertz (-1 indicates error).
string Scene::getWheelJointMotor ( jointId  )

Gets whether the joint has a motor or not and the motor settings.

Parameters
jointIdThe Id of the joint to use.
Returns
Returns whether the joint has a motor or not and the motor settings (empty string indicates error).
string Scene::getWheelJointMotor ( jointId  )

Gets whether the joint has a motor or not and the motor settings.

Parameters
jointIdThe Id of the joint to use.
Returns
Returns whether the joint has a motor or not and the motor settings (empty string indicates error).
bool Scene::isJoint ( int  jointId)

Gets whether the joint Id is valid or not.

Parameters
jointIdThe Id of the joint.
Returns
whether the joint Id is valid or not.
bool Scene::isJoint ( int  jointId)

Gets whether the joint Id is valid or not.

Parameters
jointIdThe Id of the joint.
Returns
whether the joint Id is valid or not.
void Scene::mergeScene ( scene  )

Merges the specified scene into this scene by cloning the scenes contents.

void Scene::mergeScene ( scene  )

Merges the specified scene into this scene by cloning the scenes contents.

string Scene::pickArea ( startx/  y,
endx/  y 
)

Picks objects intersecting the specified area with optional group/layer masks.

Parameters
startx/yThe coordinates of the start point as either ("x y") or (x,y)
endx/yThe coordinates of the end point as either ("x y") or (x,y)
sceneGroupMaskOptional scene group mask. (-1) or empty string selects all groups.
sceneLayerMaskOptional scene layer mask. (-1) or empty string selects all layers.
pickModeOptional mode 'any', 'aabb', 'oobb' or 'collision' (default is 'oobb').
Returns
Returns list of object IDs.
string Scene::pickArea ( startx/  y,
endx/  y 
)

Picks objects intersecting the specified area with optional group/layer masks.

Parameters
startx/yThe coordinates of the start point as either ("x y") or (x,y)
endx/yThe coordinates of the end point as either ("x y") or (x,y)
sceneGroupMaskOptional scene group mask. (-1) or empty string selects all groups.
sceneLayerMaskOptional scene layer mask. (-1) or empty string selects all layers.
pickModeOptional mode 'any', 'aabb', 'oobb' or 'collision' (default is 'oobb').
Returns
Returns list of object IDs.
string Scene::pickCircle ( x/  y,
radius   
)

Picks objects intersecting the specified circle with optional group/layer masks.

Parameters
x/yThe coordinate of the point as either ("x y") or (x,y)
radiusThe radius of the circle.
sceneGroupMaskOptional scene group mask. (-1) or empty string selects all groups.
sceneLayerMaskOptional scene layer mask. (-1) or empty string selects all layers.
pickModeOptional mode 'any', 'aabb', 'oobb' or 'collision' (default is 'ooabb').
Returns
Returns list of object IDs.
string Scene::pickCircle ( x/  y,
radius   
)

Picks objects intersecting the specified circle with optional group/layer masks.

Parameters
x/yThe coordinate of the point as either ("x y") or (x,y)
radiusThe radius of the circle.
sceneGroupMaskOptional scene group mask. (-1) or empty string selects all groups.
sceneLayerMaskOptional scene layer mask. (-1) or empty string selects all layers.
pickModeOptional mode 'any', 'aabb', 'oobb' or 'collision' (default is 'ooabb').
Returns
Returns list of object IDs.
string Scene::pickPoint ( x/  y)

Picks objects intersecting the specified point with optional group/layer masks.

Parameters
x/yThe coordinate of the point as either ("x y") or (x,y)
sceneGroupMaskOptional scene group mask. (-1) or empty string selects all groups.
sceneLayerMaskOptional scene layer mask. (-1) or empty string selects all layers.
pickModeOptional mode 'any', 'aabb', 'oobb' or 'collision' (default is 'ooabb').
Returns
Returns list of object IDs.
string Scene::pickPoint ( x/  y)

Picks objects intersecting the specified point with optional group/layer masks.

Parameters
x/yThe coordinate of the point as either ("x y") or (x,y)
sceneGroupMaskOptional scene group mask. (-1) or empty string selects all groups.
sceneLayerMaskOptional scene layer mask. (-1) or empty string selects all layers.
pickModeOptional mode 'any', 'aabb', 'oobb' or 'collision' (default is 'ooabb').
Returns
Returns list of object IDs.
string Scene::pickRay ( startx/  y,
endx/  y 
)

Picks objects intersecting the specified ray with optional group/layer masks.

Parameters
startx/yThe coordinates of the start point as either ("x y") or (x,y)
endx/yThe coordinates of the end point as either ("x y") or (x,y)
sceneGroupMaskOptional scene group mask. (-1) or empty string selects all groups.
sceneLayerMaskOptional scene layer mask. (-1) or empty string selects all layers.
pickModeOptional mode 'any', 'aabb', 'oobb' or 'collision' (default is 'oobb').
Returns
Returns list of object IDs.
string Scene::pickRay ( startx/  y,
endx/  y 
)

Picks objects intersecting the specified ray with optional group/layer masks.

Parameters
startx/yThe coordinates of the start point as either ("x y") or (x,y)
endx/yThe coordinates of the end point as either ("x y") or (x,y)
sceneGroupMaskOptional scene group mask. (-1) or empty string selects all groups.
sceneLayerMaskOptional scene layer mask. (-1) or empty string selects all layers.
pickModeOptional mode 'any', 'aabb', 'oobb' or 'collision' (default is 'oobb').
Returns
Returns list of object IDs.
string Scene::pickRayCollision ( startx/  y,
endx/  y 
)

Picks objects with collision shapes intersecting the specified ray with optional group/layer masks. Unlike other pick methods, this returns the complete detail for each object encountered, returning the collision point, normal and fraction of the ray intersection.

Parameters
startx/yThe coordinates of the start point as either ("x y") or (x,y)
endx/yThe coordinates of the end point as either ("x y") or (x,y)
sceneGroupMaskOptional scene group mask. (-1) or empty string selects all groups.
sceneLayerMaskOptional scene layer mask. (-1) or empty string selects all layers.
Returns
Returns a list of objects in blocks of detail items where each block represents a single object and its collision detail in the format:<ObjectId pointx="" pointy="" normalx="" normaly="" rayfraction="" shapeindex>=""> <ObjectId pointx="" pointy="" normalx="" normaly="" rayfraction="" shapeindex>=""> <ObjectId pointx="" pointy="" normalx="" normaly="" rayfraction="" shapeindex>=""> etc.
string Scene::pickRayCollision ( startx/  y,
endx/  y 
)

Picks objects with collision shapes intersecting the specified ray with optional group/layer masks. Unlike other pick methods, this returns the complete detail for each object encountered, returning the collision point, normal and fraction of the ray intersection.

Parameters
startx/yThe coordinates of the start point as either ("x y") or (x,y)
endx/yThe coordinates of the end point as either ("x y") or (x,y)
sceneGroupMaskOptional scene group mask. (-1) or empty string selects all groups.
sceneLayerMaskOptional scene layer mask. (-1) or empty string selects all layers.
Returns
Returns a list of objects in blocks of detail items where each block represents a single object and its collision detail in the format:<ObjectId pointx="" pointy="" normalx="" normaly="" rayfraction="" shapeindex>=""> <ObjectId pointx="" pointy="" normalx="" normaly="" rayfraction="" shapeindex>=""> <ObjectId pointx="" pointy="" normalx="" normaly="" rayfraction="" shapeindex>=""> etc.
void Scene::remove ( sceneObject  )

Remove the SceneObject from the scene.

Parameters
sceneObjectThe SceneObject to remove from the scene.
Returns
No return value.
void Scene::remove ( sceneObject  )

Remove the SceneObject from the scene.

Parameters
sceneObjectThe SceneObject to remove from the scene.
Returns
No return value.
void Scene::removeAssetPreload ( assetId  )

Removes the asset Id from being preloaded when the scene is loaded. The asset may be unloaded immediately by this operation if it has no other references.

Parameters
assetIdThe asset Id to be removed.
Returns
No return value.
void Scene::removeAssetPreload ( assetId  )

Removes the asset Id from being preloaded when the scene is loaded. The asset may be unloaded immediately by this operation if it has no other references.

Parameters
assetIdThe asset Id to be removed.
Returns
No return value.
void Scene::setDebugOff ( debugOptions  )

Sets Debug options(s) off.

Parameters
debugOptionsEither a list of debug modes to turn off (comma-separated) or a string (space-separated)
Returns
No return value.
void Scene::setDebugOff ( debugOptions  )

Sets Debug options(s) off.

Parameters
debugOptionsEither a list of debug modes to turn off (comma-separated) or a string (space-separated)
Returns
No return value.
void Scene::setDebugOn ( debugOptions  )

Sets Debug option(s) on.

Parameters
debugOptionsEither a list of debug modes (comma-separated), or a string with the modes (space-separated)
Returns
No return value.
void Scene::setDebugOn ( debugOptions  )

Sets Debug option(s) on.

Parameters
debugOptionsEither a list of debug modes (comma-separated), or a string with the modes (space-separated)
Returns
No return value.
void Scene::setDebugSceneObject ( sceneObject  )

Sets the scene object to monitor in the debug metrics.

Parameters
SceneObjectThe scene object to monitor in the debug metrics.
Returns
No return value.
void Scene::setDebugSceneObject ( sceneObject  )

Sets the scene object to monitor in the debug metrics.

Parameters
SceneObjectThe scene object to monitor in the debug metrics.
Returns
No return value.
void Scene::setDistanceJointDampingRatio ( jointId  ,
dampingRatio   
)

Sets the damping ratio.

Parameters
jointIdThe Id of the joint to use.
dampingRatioThe damping ratio. 0 = no damping, 1 = critical damping.
Returns
Returns no value.
void Scene::setDistanceJointDampingRatio ( jointId  ,
dampingRatio   
)

Sets the damping ratio.

Parameters
jointIdThe Id of the joint to use.
dampingRatioThe damping ratio. 0 = no damping, 1 = critical damping.
Returns
Returns no value.
void Scene::setDistanceJointFrequency ( jointId  ,
frequency   
)

Sets the mass-spring-damper frequency in Hertz.

Parameters
jointIdThe Id of the joint to use.
frequencyThe mass-spring-damper frequency in Hertz. A value of 0 disables softness.
Returns
Returns no value.
void Scene::setDistanceJointFrequency ( jointId  ,
frequency   
)

Sets the mass-spring-damper frequency in Hertz.

Parameters
jointIdThe Id of the joint to use.
frequencyThe mass-spring-damper frequency in Hertz. A value of 0 disables softness.
Returns
Returns no value.
void Scene::setDistanceJointLength ( jointId  ,
length   
)

Sets the distance the joint should maintain between scene objects.

Parameters
jointIdThe Id of the joint to use.
lengthThe length the joint should maintain between scene objects.
Returns
Returns no value.
void Scene::setDistanceJointLength ( jointId  ,
length   
)

Sets the distance the joint should maintain between scene objects.

Parameters
jointIdThe Id of the joint to use.
lengthThe length the joint should maintain between scene objects.
Returns
Returns no value.
void Scene::setFrictionJointMaxForce ( jointId  ,
maxForce   
)

Sets the maximum friction force.

Parameters
jointIdThe Id of the joint to use.
maxForceThe maximum friction force (N).
Returns
Returns no value.
void Scene::setFrictionJointMaxForce ( jointId  ,
maxForce   
)

Sets the maximum friction force.

Parameters
jointIdThe Id of the joint to use.
maxForceThe maximum friction force (N).
Returns
Returns no value.
void Scene::setFrictionJointMaxTorque ( jointId  ,
maxTorque   
)

Sets the maximum torque force.

Parameters
jointIdThe Id of the joint to use.
maxTorqueThe maximum torque force (N).
Returns
Returns no value.
void Scene::setFrictionJointMaxTorque ( jointId  ,
maxTorque   
)

Sets the maximum torque force.

Parameters
jointIdThe Id of the joint to use.
maxTorqueThe maximum torque force (N).
Returns
Returns no value.
void Scene::setGravity ( forceX/  forceY)

The gravity force to apply to all objects in the scene.

Parameters
forceX/forceYThe direction and magnitude of the force in each direction. Formatted as either ("forceX forceY") or (forceX, forceY)
Returns
No return value.
void Scene::setGravity ( forceX/  forceY)

The gravity force to apply to all objects in the scene.

Parameters
forceX/forceYThe direction and magnitude of the force in each direction. Formatted as either ("forceX forceY") or (forceX, forceY)
Returns
No return value.
void Scene::setMotorJointAngularOffset ( jointId  ,
angularOffset   
)

Sets the angularOffset between the bodies.

Parameters
jointIdThe Id of the joint to use.
angularOffsetThe angularOffset between the bodies.
Returns
Returns no value.
void Scene::setMotorJointAngularOffset ( jointId  ,
angularOffset   
)

Sets the angularOffset between the bodies.

Parameters
jointIdThe Id of the joint to use.
angularOffsetThe angularOffset between the bodies.
Returns
Returns no value.
void Scene::setMotorJointLinearOffset ( jointId  ,
linearOffset X/  Y 
)

Sets the linear offset in sceneObjectA space.

Parameters
jointIdThe Id of the joint to use.
linearOffsetX/YThe linear offset in sceneObjectA space.
Returns
Returns no value.
void Scene::setMotorJointLinearOffset ( jointId  ,
linearOffset X/  Y 
)

Sets the linear offset in sceneObjectA space.

Parameters
jointIdThe Id of the joint to use.
linearOffsetX/YThe linear offset in sceneObjectA space.
Returns
Returns no value.
void Scene::setMotorJointMaxForce ( jointId  ,
maxForce   
)

Sets the maximum motor force.

Parameters
jointIdThe Id of the joint to use.
maxForceThe maximum motor force (N).
Returns
Returns no value.
void Scene::setMotorJointMaxForce ( jointId  ,
maxForce   
)

Sets the maximum motor force.

Parameters
jointIdThe Id of the joint to use.
maxForceThe maximum motor force (N).
Returns
Returns no value.
void Scene::setMotorJointMaxTorque ( jointId  ,
maxTorque   
)

Sets the maximum motor torque force.

Parameters
jointIdThe Id of the joint to use.
maxTorqueThe maximum motor torque force (N).
Returns
Returns no value.
void Scene::setMotorJointMaxTorque ( jointId  ,
maxTorque   
)

Sets the maximum motor torque force.

Parameters
jointIdThe Id of the joint to use.
maxTorqueThe maximum motor torque force (N).
Returns
Returns no value.
void Scene::setPositionIterations ( int  iterations)

Sets the number of position iterations the physics solver uses.

Returns
No return value.
void Scene::setPositionIterations ( int  iterations)

Sets the number of position iterations the physics solver uses.

Returns
No return value.
void Scene::setPrismaticJointLimit ( jointId  ,
enableLimit   
)

Sets whether the joint has translational limits or not and the limits themselves.

Parameters
jointIdThe Id of the joint to use.
enableLimitWhether the joint has angular limits or not.
lowerTranslationThe lower translation limit.
upperTranslationThe upper translation limit.
Returns
Returns no value.
void Scene::setPrismaticJointLimit ( jointId  ,
enableLimit   
)

Sets whether the joint has translational limits or not and the limits themselves.

Parameters
jointIdThe Id of the joint to use.
enableLimitWhether the joint has angular limits or not.
lowerTranslationThe lower translation limit.
upperTranslationThe upper translation limit.
Returns
Returns no value.
void Scene::setPrismaticJointMotor ( jointId  ,
enableMotor   
)

Sets whether the joint has a motor or not and the motor settings.

Parameters
jointIdThe Id of the joint to use.
enableMotorWhether the joint has a motor or not.
motorSpeedThe motor speed (degrees per/sec).
maxMotorForceThe maximum motor force used to achieve the specified motor speed (N-m).
Returns
Returns no value.
void Scene::setPrismaticJointMotor ( jointId  ,
enableMotor   
)

Sets whether the joint has a motor or not and the motor settings.

Parameters
jointIdThe Id of the joint to use.
enableMotorWhether the joint has a motor or not.
motorSpeedThe motor speed (degrees per/sec).
maxMotorForceThe maximum motor force used to achieve the specified motor speed (N-m).
Returns
Returns no value.
void Scene::setRevoluteJointLimit ( jointId  ,
enableLimit   
)

Sets whether the joint has angular limits or not and the limits themselves.

Parameters
jointIdThe Id of the joint to use.
enableLimitWhether the joint has angular limits or not.
lowerAngleThe lower angle of the angular limit.
upperAngleThe upper angle of the angular limit.
Returns
Returns no value.
void Scene::setRevoluteJointLimit ( jointId  ,
enableLimit   
)

Sets whether the joint has angular limits or not and the limits themselves.

Parameters
jointIdThe Id of the joint to use.
enableLimitWhether the joint has angular limits or not.
lowerAngleThe lower angle of the angular limit.
upperAngleThe upper angle of the angular limit.
Returns
Returns no value.
void Scene::setRevoluteJointMotor ( jointId  ,
enableMotor   
)

Sets whether the joint has a motor or not and the motor settings.

Parameters
jointIdThe Id of the joint to use.
enableMotorWhether the joint has a motor or not.
motorSpeedThe motor speed (degrees per/sec).
maxMotorTorqueThe maximum motor torque used to achieve the specified motor speed (N-m).
Returns
Returns no value.
void Scene::setRevoluteJointMotor ( jointId  ,
enableMotor   
)

Sets whether the joint has a motor or not and the motor settings.

Parameters
jointIdThe Id of the joint to use.
enableMotorWhether the joint has a motor or not.
motorSpeedThe motor speed (degrees per/sec).
maxMotorTorqueThe maximum motor torque used to achieve the specified motor speed (N-m).
Returns
Returns no value.
void Scene::setRopeJointMaxLength ( jointId  ,
maxLength   
)

Sets the maximum rigid length of the rope.

Parameters
jointIdThe Id of the joint to use.
maxLengthThe maximum rigid length of the rope.
Returns
Returns no value.
void Scene::setRopeJointMaxLength ( jointId  ,
maxLength   
)

Sets the maximum rigid length of the rope.

Parameters
jointIdThe Id of the joint to use.
maxLengthThe maximum rigid length of the rope.
Returns
Returns no value.
void Scene::setScenePause ( status  )

Sets scene pause status.

Returns
No return value.
void Scene::setScenePause ( status  )

Sets scene pause status.

Returns
No return value.
void Scene::setTargetJointDampingRatio ( jointId  ,
dampingRatio   
)

Sets the damping ratio.

Parameters
jointIdThe Id of the joint to use.
dampingRatioThe damping ratio. 0 = no damping, 1 = critical damping.
Returns
Returns no value.
void Scene::setTargetJointDampingRatio ( jointId  ,
dampingRatio   
)

Sets the damping ratio.

Parameters
jointIdThe Id of the joint to use.
dampingRatioThe damping ratio. 0 = no damping, 1 = critical damping.
Returns
Returns no value.
void Scene::setTargetJointFrequency ( jointId  ,
frequency   
)

Sets the mass-spring-damper frequency in Hertz.

Parameters
jointIdThe Id of the joint to use.
frequencyThe mass-spring-damper frequency in Hertz. A value of 0 disables softness.
Returns
Returns no value.
void Scene::setTargetJointFrequency ( jointId  ,
frequency   
)

Sets the mass-spring-damper frequency in Hertz.

Parameters
jointIdThe Id of the joint to use.
frequencyThe mass-spring-damper frequency in Hertz. A value of 0 disables softness.
Returns
Returns no value.
void Scene::setTargetJointTarget ( jointId  ,
worldTarget X/  Y 
)

Sets the target world point for the scene object.

Parameters
jointIdThe Id of the joint to use.
worldTargetThe target world point to move the scene object to.
Returns
Returns no value.
void Scene::setTargetJointTarget ( jointId  ,
worldTarget X/  Y 
)

Sets the target world point for the scene object.

Parameters
jointIdThe Id of the joint to use.
worldTargetThe target world point to move the scene object to.
Returns
Returns no value.
void Scene::setVelocityIterations ( int  iterations)

Sets the number of velocity iterations the physics solver uses.

Returns
No return value.
void Scene::setVelocityIterations ( int  iterations)

Sets the number of velocity iterations the physics solver uses.

Returns
No return value.
void Scene::setWeldJointDampingRatio ( jointId  ,
dampingRatio   
)

Sets the damping ratio.

Parameters
jointIdThe Id of the joint to use.
dampingRatioThe damping ratio. 0 = no damping, 1 = critical damping.
Returns
Returns no value.
void Scene::setWeldJointDampingRatio ( jointId  ,
dampingRatio   
)

Sets the damping ratio.

Parameters
jointIdThe Id of the joint to use.
dampingRatioThe damping ratio. 0 = no damping, 1 = critical damping.
Returns
Returns no value.
void Scene::setWeldJointFrequency ( jointId  ,
frequency   
)

Sets the mass-spring-damper frequency in Hertz.

Parameters
jointIdThe Id of the joint to use.
frequencyThe mass-spring-damper frequency in Hertz. A value of 0 disables softness.
Returns
Returns no value.
void Scene::setWeldJointFrequency ( jointId  ,
frequency   
)

Sets the mass-spring-damper frequency in Hertz.

Parameters
jointIdThe Id of the joint to use.
frequencyThe mass-spring-damper frequency in Hertz. A value of 0 disables softness.
Returns
Returns no value.
void Scene::setWheelJointDampingRatio ( jointId  ,
dampingRatio   
)

Sets the damping ratio.

Parameters
jointIdThe Id of the joint to use.
dampingRatioThe damping ratio. 0 = no damping, 1 = critical damping.
Returns
Returns no value.
void Scene::setWheelJointDampingRatio ( jointId  ,
dampingRatio   
)

Sets the damping ratio.

Parameters
jointIdThe Id of the joint to use.
dampingRatioThe damping ratio. 0 = no damping, 1 = critical damping.
Returns
Returns no value.
void Scene::setWheelJointFrequency ( jointId  ,
frequency   
)

Sets the mass-spring-damper frequency in Hertz.

Parameters
jointIdThe Id of the joint to use.
frequencyThe mass-spring-damper frequency in Hertz. A value of 0 disables softness.
Returns
Returns no value.
void Scene::setWheelJointFrequency ( jointId  ,
frequency   
)

Sets the mass-spring-damper frequency in Hertz.

Parameters
jointIdThe Id of the joint to use.
frequencyThe mass-spring-damper frequency in Hertz. A value of 0 disables softness.
Returns
Returns no value.
void Scene::setWheelJointMotor ( jointId  ,
enableMotor   
)

Sets whether the joint has a motor or not and the motor settings.

Parameters
jointIdThe Id of the joint to use.
enableMotorWhether the joint has a motor or not.
motorSpeedThe motor speed (degrees per/sec).
maxMotorTorqueThe maximum motor torque used to achieve the specified motor speed (N-m).
Returns
Returns no value.
void Scene::setWheelJointMotor ( jointId  ,
enableMotor   
)

Sets whether the joint has a motor or not and the motor settings.

Parameters
jointIdThe Id of the joint to use.
enableMotorWhether the joint has a motor or not.
motorSpeedThe motor speed (degrees per/sec).
maxMotorTorqueThe maximum motor torque used to achieve the specified motor speed (N-m).
Returns
Returns no value.


Copyright © 2013 GarageGames, LLC. All Rights Reserved.