TorqueScript Reference
Public Member Functions | List of all members
Scene Class Reference

#include <Scene_ScriptBinding.h>

Inherits BehaviorComponent.

Public Member Functions

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

Member Function Documentation

◆ add()

void add ( sceneObject  )

Add the SceneObject to the scene.

Parameters
sceneObjectThe SceneObject to add to the scene.
Returns
No return value.

◆ addAssetPreload()

void 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.

◆ clear()

void 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.

◆ clearAssetPreloads()

void clearAssetPreloads ( )

Clears all assets added as a preload.

Returns
No return value.

◆ create()

String create ( type  )

Creates the specified scene-object derived type and adds it to the scene.

Returns
The scene-object or NULL if not created.

◆ createDistanceJoint()

Integer 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).

◆ createFrictionJoint()

Integer 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).

◆ createMotorJoint()

Integer 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).

◆ createPrismaticJoint()

Integer 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).

◆ createPulleyJoint()

Integer createPulleyJoint ( sceneObjectA  ,
sceneObjectB  ,
localAnchorA X/  Y,
localAnchorB X/  Y,
worldGroundAnchorA X/  Y,
worldGroundAnchorB X/  Y,
ratio   
)

Creates a pulley 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).

◆ createRevoluteJoint()

Integer 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).

◆ createRopeJoint()

Integer 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).

◆ createTargetJoint()

Integer 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).

◆ createWeldJoint()

Integer 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).

◆ createWheelJoint()

Integer 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).

◆ deleteJoint()

Boolean deleteJoint ( int  jointId)

Deletes the specified joint Id.

Parameters
jointIdThe Id of the joint.
Returns
Whether the joint was successfully deleted or not.

◆ getAssetPreload()

String 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.

◆ getAssetPreloadCount()

Integer getAssetPreloadCount ( )

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

Returns
The number of assets set to preload for this scene.

◆ getBatchingEnabled()

Boolean getBatchingEnabled ( )

Gets whether render batching is enabled or not. return Whether render batching is enabled or not.

◆ getControllers()

String getControllers ( )

Gets the Scene Controllers.

Returns
Gets the scene controllers.

◆ getCount()

Integer getCount ( )

Gets the count of scene objects in the scnee.

Returns
Returns the number of scene objects in current scene as an integer.

◆ getDebugOn()

String getDebugOn ( )

Gets the state of the debug modes.

Returns
Returns a space separated list of debug modes that are active.

◆ getDebugSceneObject()

Integer getDebugSceneObject ( )

( Gets the scene object being monitored in the debug metrics.

Returns
The scene object being monitored in the debug metrics (zero if none being monitored).

◆ getDistanceJointDampingRatio()

Float getDistanceJointDampingRatio ( jointId  )

Gets the damping ratio.

Parameters
jointIdThe Id of the joint to use.
Returns
Returns the damping ratio (-1 indicates error).

◆ getDistanceJointFrequency()

Float 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).

◆ getDistanceJointLength()

Float 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).

◆ getFPS()

Float getFPS ( )

Gets the current average frames-per-second.

Returns
The current average frames-per-second.

◆ getFrameCount()

Integer getFrameCount ( )

Gets the current rendered frame count.

Returns
The current rendered frame count.

◆ getFrictionJointMaxForce()

Float getFrictionJointMaxForce ( jointId  )

Sets the maximum friction force.

Parameters
jointIdThe Id of the joint to use.
Returns
Returns the maximum friction force (-1 indicates error).

◆ getFrictionJointMaxTorque()

Float getFrictionJointMaxTorque ( jointId  )

Gets the maximum torque force.

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

◆ getGlobalSceneCount()

Integer getGlobalSceneCount ( )

Gets the system-wide scene count.

Returns
The system-wide scene count.

◆ getGravity()

String getGravity ( )

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

Returns
The gravity force applied to all objects in the scene.

◆ getJointCount()

Integer getJointCount ( )

Gets the joint count.

Returns
Returns no value

◆ getJointType()

String 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.

◆ getLayerSortMode()

String getLayerSortMode ( layer  )

Gets the render sort mode for the specified layer.

Parameters
layerThe layer to retrieve.
Returns
The render sort mode for the specified layer.

◆ getMaxFPS()

Float getMaxFPS ( )

Gets the maximum average frames-per-second.

Returns
The average frames-per-second.

◆ getMinFPS()

Float getMinFPS ( )

Gets the minimum average frames-per-second.

Returns
The minimum Faverage frames-per-second.

◆ getMotorJointAngularOffset()

Float 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).

◆ getMotorJointLinearOffset()

String 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).

◆ getMotorJointMaxForce()

Float getMotorJointMaxForce ( jointId  )

Sets the maximum motor force.

Parameters
jointIdThe Id of the joint to use.
Returns
Returns the maximum motor force (-1 indicates error).

◆ getMotorJointMaxTorque()

Float 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).

◆ getObject()

Integer 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.

◆ getPositionIterations()

Integer getPositionIterations ( )

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

Returns
The number of position iterations the physics solver uses.

◆ getPrismaticJointLimit()

String 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).

◆ getPrismaticJointMotor()

String 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).

◆ getRevoluteJointAngle()

Float getRevoluteJointAngle ( jointId  )

Gets the current angle of a revolute joint.

Parameters
jointIdThe Id of the joint to use.
Returns
Returns the joint angle.

◆ getRevoluteJointLimit()

String 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).

◆ getRevoluteJointMotor()

String 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).

◆ getRevoluteJointSpeed()

Float 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

◆ getRopeJointMaxLength()

Float 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).

◆ getSceneObjectList()

String getSceneObjectList ( )

Gets the Scene Object-List.

Returns
Returns a string with a list of object IDs

◆ getScenePause()

Boolean getScenePause ( )

Gets scene pause status.

Returns
Returns a boolean value. True if pause status, false otherwise.

◆ getSceneTime()

Float getSceneTime ( )

Gets the Scene Time.

Returns
Returns the time as a floating point number

◆ getTargetJointDampingRatio()

Float getTargetJointDampingRatio ( jointId  )

Sets the damping ratio.

Parameters
jointIdThe Id of the joint to use.
Returns
Returns the damping ratio (-1 indicates error).

◆ getTargetJointFrequency()

Float 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).

◆ getTargetJointTarget()

String 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).

◆ getVelocityIterations()

Integer getVelocityIterations ( )

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

Returns
The number of velocity iterations the physics solver uses.

◆ getWeldJointDampingRatio()

Float getWeldJointDampingRatio ( jointId  )

Gets the damping ratio.

Parameters
jointIdThe Id of the joint to use.
Returns
Returns the damping ratio (-1 indicates error).

◆ getWeldJointFrequency()

Float 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).

◆ getWheelJointDampingRatio()

Float getWheelJointDampingRatio ( jointId  )

Gets the damping ratio.

Parameters
jointIdThe Id of the joint to use.
Returns
Returns the damping ratio (-1 indicates error).

◆ getWheelJointFrequency()

Float 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).

◆ getWheelJointMotor()

String 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).

◆ isJoint()

Boolean 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.

◆ mergeScene()

void mergeScene ( scene  )

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

◆ pickArea()

String 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.

◆ pickCircle()

String 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.

◆ pickPoint()

String 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.

◆ pickRay()

String 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.

◆ pickRayCollision()

String 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.

◆ remove()

void remove ( sceneObject  )

Remove the SceneObject from the scene.

Parameters
sceneObjectThe SceneObject to remove from the scene.
Returns
No return value.

◆ removeAssetPreload()

void 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.

◆ resetDebugStats()

void resetDebugStats ( )

Resets the debug statistics.

Returns
No return value.

◆ setBatchingEnabled()

void setBatchingEnabled ( bool  enabled)

Sets whether render batching is enabled or not.

Parameters
enabledWhether render batching is enabled or not. return No return value.

◆ setDebugOff()

void 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.

◆ setDebugOn()

void 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.

◆ setDebugSceneObject()

void 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.

◆ setDistanceJointDampingRatio()

void 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.

◆ setDistanceJointFrequency()

void 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.

◆ setDistanceJointLength()

void 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.

◆ setFrictionJointMaxForce()

void 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.

◆ setFrictionJointMaxTorque()

void 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.

◆ setGravity()

void 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.

◆ setIsEditorScene()

void setIsEditorScene ( )

Sets whether this is an editor scene.

Returns
No return value.

◆ setLayerSortMode()

void setLayerSortMode ( layer  ,
sortMode   
)

Sets the layer to use the specified render sort mode.

Parameters
layerThe layer to modify.
sortModeThe sort mode to use on the specified layer.
Returns
No return value.

◆ setMotorJointAngularOffset()

void 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.

◆ setMotorJointLinearOffset()

void 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.

◆ setMotorJointMaxForce()

void 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.

◆ setMotorJointMaxTorque()

void 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.

◆ setPositionIterations()

void setPositionIterations ( int  iterations)

Sets the number of position iterations the physics solver uses.

Returns
No return value.

◆ setPrismaticJointLimit()

void 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.

◆ setPrismaticJointMotor()

void 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.

◆ setRevoluteJointLimit()

void 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.

◆ setRevoluteJointMotor()

void 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.

◆ setRopeJointMaxLength()

void 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.

◆ setScenePause()

void setScenePause ( status  )

Sets scene pause status.

Returns
No return value.

◆ setTargetJointDampingRatio()

void 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.

◆ setTargetJointFrequency()

void 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.

◆ setTargetJointTarget()

void 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.

◆ setVelocityIterations()

void setVelocityIterations ( int  iterations)

Sets the number of velocity iterations the physics solver uses.

Returns
No return value.

◆ setWeldJointDampingRatio()

void 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.

◆ setWeldJointFrequency()

void 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.

◆ setWheelJointDampingRatio()

void 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.

◆ setWheelJointFrequency()

void 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.

◆ setWheelJointMotor()

void 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.