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

#include <SceneObject_ScriptBinding.h>

Inherits BehaviorComponent.

Inherited by CompositeSprite, ParticlePlayer, ShapeVector, SpriteBase, TextSprite, Trigger, and WaveComposite.

Public Member Functions

void addToScene (Scene scene)
 
void applyAngularImpulse (impulse)
 
void applyForce (worldForce X/Y, [worldPoint X/Y])
 
void applyLinearImpulse (worldImpulse X/Y, [worldPoint X/Y])
 
void applyTorque (torque)
 
void attachGui (guiControl guiObject, SceneWindow window, [sizeControl ?=false], [offset ?=Vector2(0, 0)])
 
void cancelFadeTo ()
 
void cancelGrowTo ()
 
void cancelMoveTo ([autoStop=true])
 
void cancelRotateTo ([autoStop=true])
 
void clearCollisionShapes ()
 
void copyAllCollisionShapes (targetObject[, clearTargetShapes?])
 
Integer copyCollisionShape (int shapeIndex, targetObject)
 
Boolean copyFrom (SceneObject object, [copyDynamicFields?=false])
 
Integer createChainCollisionShape (localPointsX/Y, [adjacentLocalPositionStartX, adjacentLocalPositionStartY], [adjacentLocalPositionEndX, adjacentLocalPositionEndY])
 
Integer createCircleCollisionShape (radius, [localPositionX, localPositionY])
 
Integer createEdgeCollisionShape (localPositionStartX, localPositionStartY, localPositionEndX, localPositionEndY, [adjacentLocalPositionStartX, adjacentLocalPositionStartY], [adjacentLocalPositionEndX, adjacentLocalPositionEndY])
 
Integer createPolygonBoxCollisionShape (width, height, [localCentroidX, localCentroidY], [angle])
 
Integer createPolygonCollisionShape (localPointsX/Y)
 
Boolean deleteCollisionShape (int shapeIndex)
 
void detachAllGuiControls ()
 
void detachGui ()
 
Boolean fadeTo (targetColor red/green/blue/alpha, rate)
 
Boolean fadeToTime (targetColor red/green/blue/alpha, time)
 
String getAABB ()
 
Boolean getActive ()
 
Float getAlphaTest ()
 
Float getAngle ()
 
Float getAngularDamping ()
 
Float getAngularVelocity ()
 
String getArea ()
 
String getAreaMax (...)
 
String getAreaMin ()
 
Boolean getAutoSizing ()
 
Boolean getAwake ()
 
Float getBlendAlpha ()
 
String getBlendColor (allowColorNames)
 
Boolean getBlendMode ()
 
String getBodyType ()
 
Boolean getBullet ()
 
String getChainCollisionShapeAdjacentEnd (int shapeIndex)
 
String getChainCollisionShapeAdjacentStart (int shapeIndex)
 
Boolean getChainCollisionShapeHasAdjacentEnd (int shapeIndex)
 
Boolean getChainCollisionShapeHasAdjacentStart (int shapeIndex)
 
String getChainCollisionShapeLocalPoint (int shapeIndex, int pointIndex)
 
Integer getChainCollisionShapePointCount (int shapeIndex)
 
String getCircleCollisionShapeLocalPosition (int shapeIndex)
 
Float getCircleCollisionShapeRadius (int shapeIndex)
 
Boolean getCollisionCallback ()
 
String getCollisionGroups ()
 
String getCollisionLayers ()
 
String getCollisionMasks (...)
 
Boolean getCollisionOneWay ()
 
Float getCollisionShapeArea (int shapeIndex)
 
Integer getCollisionShapeCount ()
 
Float getCollisionShapeDensity (int shapeIndex)
 
Float getCollisionShapeFriction (int shapeIndex)
 
Boolean getCollisionShapeIsSensor (int shapeIndex)
 
Float getCollisionShapeRestitution (int shapeIndex)
 
String getCollisionShapeType (int shapeIndex)
 
Boolean getCollisionSuppress ()
 
String getContact (contactIndex)
 
Integer getContactCount ()
 
Float getDefaultDensity ()
 
Float getDefaultFriction ()
 
Float getDefaultRestitution ()
 
String getDstBlendFactor ()
 
String getEdgeCollisionShapeAdjacentEnd (int shapeIndex)
 
String getEdgeCollisionShapeAdjacentStart (int shapeIndex)
 
Boolean getEdgeCollisionShapeHasAdjacentEnd (int shapeIndex)
 
Boolean getEdgeCollisionShapeHasAdjacentStart (int shapeIndex)
 
String getEdgeCollisionShapeLocalPositionEnd (int shapeIndex)
 
String getEdgeCollisionShapeLocalPositionStart (int shapeIndex)
 
Boolean getFixedAngle ()
 
Boolean getGatherContacts ()
 
Float getGravityScale ()
 
Float getHeight ()
 
Float getInertia ()
 
Boolean getIsPointInCollisionShape (int shapeIndex, worldPointX/Y)
 
Boolean getIsPointInOOBB (worldPointX/Y)
 
Float getLifetime ()
 
Float getLinearDamping ()
 
String getLinearVelocity ()
 
String getLinearVelocityFromLocalPoint (localPointX/Y)
 
String getLinearVelocityFromWorldPoint (worldPointX/Y)
 
String getLinearVelocityPolar ()
 
Float getLinearVelocityX ()
 
Float getLinearVelocityY ()
 
String getLocalCenter ()
 
String getLocalPoint (float worldPointX/Y)
 
String getLocalVector (float worldVectorX/Y)
 
Float getMass ()
 
Boolean getPickingAllowed ()
 
String getPolygonCollisionShapeLocalPoint (int shapeIndex, int pointIndex)
 
Integer getPolygonCollisionShapePointCount (int shapeIndex)
 
String getPosition ()
 
Float getPositionX ()
 
Float getPositionY ()
 
Float getRenderAngle ()
 
String getRenderGroup ()
 
String getRenderPosition ()
 
Integer getScene ()
 
Integer getSceneGroup ()
 
Integer getSceneLayer ()
 
Float getSceneLayerDepth ()
 
String getSize ()
 
Float getSizeX ()
 
Float getSizeY ()
 
Boolean getSleepingAllowed ()
 
Boolean getSleepingCallback ()
 
String getSortPoint ()
 
Float getSortPointX ()
 
Float getSortPointY ()
 
Integer getSoundatIndex ()
 
Integer getSoundsCount ()
 
String getSrcBlendFactor ()
 
Boolean getUpdateCallback ()
 
Boolean getUseInputEvents ()
 
Boolean getVisible ()
 
Float getWidth ()
 
String getWorldCenter ()
 
String getWorldPoint (float localPointX/Y)
 
String getWorldVector (float localVectorX/Y)
 
Boolean growTo (targetSize width/height, rate rateX/rateY)
 
Boolean growToTime (targetSize width/height, time)
 
Boolean isFadeToComplete ()
 
Boolean isGrowToComplete ()
 
Boolean isMoveToComplete ()
 
Boolean isRotateToComplete ()
 
Boolean moveTo (worldPoint X/Y, speed, [autoStop=true], [snapToTarget=true], [margin=0.1])
 
Integer playSound ()
 
void removeFromScene ()
 
Boolean rotateTo (angle, speed, [autoStop=true], [warpToTarget=true])
 
void safeDelete ()
 
void setActive ([bool status?])
 
void setAlphaTest (float alpha)
 
void setAngle (float angle)
 
void setAngularDamping (float damping)
 
void setAngularVelocity (float velocity)
 
void setArea (float x1, float y1, float x2, float y2)
 
void setAwake ([bool status?])
 
void setBlendAlpha (float alpha)
 
void setBlendColor (float red, float green, float blue, [float alpha=1.0])
 
void setBlendMode (bool blendMode)
 
void setBodyType (bodyType type)
 
void setBullet ([bool status?])
 
void setCollisionAgainst (SceneObject object, [clearMasks?=false])
 
void setCollisionCallback ([bool status?])
 
void setCollisionGroups (groups)
 
void setCollisionLayers (layers)
 
void setCollisionMasks (groupMask, [layerMask])
 
void setCollisionOneWay ([bool status?])
 
void setCollisionShapeDensity (int shapeIndex, float density)
 
void setCollisionShapeFriction (int shapeIndex, float friction)
 
void setCollisionShapeIsSensor (int shapeIndex, bool status)
 
void setCollisionShapeRestitution (int shapeIndex, float restitution)
 
void setCollisionSuppress ([bool status?])
 
void setDebugOff (debugOptions)
 
void setDebugOn (debugOptions)
 
void setDefaultDensity (float density, [bool updateShapes])
 
void setDefaultFriction (float friction, [bool updateShapes])
 
void setDefaultRestitution (float restitution, [bool updateShapes])
 
void setDstBlendFactor (dstBlend)
 
void setEnabled (bool status)
 
void setFixedAngle (bool status?)
 
void setGatherContacts (bool gatherContacts)
 
void setGravityScale (float scale)
 
void setHeight (float height)
 
void setLifetime (float lifetime)
 
void setLinearDamping (float damping)
 
void setLinearVelocity (float velocityX, float velocityY)
 
void setLinearVelocityPolar (float angle, float speed)
 
void setLinearVelocityX (float velocityX)
 
void setLinearVelocityY (float velocityY)
 
void setPickingAllowed (bool pickingAllowed)
 
void setPosition (float x, float y)
 
void setPositionX (float x)
 
void setPositionY (float y)
 
void setRenderGroup (renderGroup)
 
void setSceneGroup (integer group)
 
void setSceneLayer (integer layer)
 
void setSceneLayerDepth (float layerDepth)
 
Boolean setSceneLayerDepthBack ()
 
Boolean setSceneLayerDepthBackward ()
 
Boolean setSceneLayerDepthForward ()
 
Boolean setSceneLayerDepthFront ()
 
void setSize (float width, float height)
 
void setSizeX (float width)
 
void setSizeY (float height)
 
void setSleepingAllowed ([bool status?])
 
void setSleepingCallback ([bool status?])
 
void setSortPoint (float x, float y)
 
void setSortPointX (float x)
 
void setSortPointY (float y)
 
void setSrcBlendFactor (srcBlend)
 
void setUpdateCallback ([bool status?])
 
void setUseInputEvents (bool inputStatus)
 
void setVisible (bool status)
 
void setWidth (float width)
 
void stopSound (S32 index)
 
- 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

◆ addToScene()

void addToScene ( Scene  scene)

Add the object to a scene.

Parameters
scenethe scene you wish to add this object to.
Returns
No return value.

◆ applyAngularImpulse()

void applyAngularImpulse ( impulse  )

Applies an angular impulse.

Parameters
impulse- The impulse in Kg*m*m/s.
Returns
No return Value.

◆ applyForce()

void applyForce ( worldForce X/  Y)

Applies a force at a world point. If the force is not applied at the center of mass, it will generate a torque and affect the angular velocity.

Parameters
worldForceX/Y- The world force vector in Newtons (N).
worldPointX/Y- The world point where the force is applied. If world point is not specified, the center of mass is used.
Returns
No return Value.

◆ applyLinearImpulse()

void applyLinearImpulse ( worldImpulse X/  Y)

Applies an impulse at a world point. This immediately modifies the linear velocity. It also modifies the angular velocity if the point of application is not the center of mass.

Parameters
worldImpulse/Y- The world impulse vector in Newtons (N-seconds) or Kg-m/s.
worldPointX/Y- The world point where the force is applied. If world point is not specified, the center of mass is used.
Returns
No return Value.

◆ applyTorque()

void applyTorque ( torque  )

Applies a torque. This affects the angular velocity without affecting the linear velocity of the center of mass.

Parameters
torque- The torque in Newton-metres (N-m).
Returns
No return Value.

◆ attachGui()

void attachGui ( guiControl  guiObject,
SceneWindow  window 
)

Attach a GUI Control to the object.

Parameters
guiObjectThe GuiControl to attach.
windowThe SceneWindow to bind the GuiControl to.
sizeControlWhether or not to size the GuiControl to the size of this object.
offsetThe position offset to apply to the GuiControl.
Returns
No return Value.

◆ cancelFadeTo()

void cancelFadeTo ( )

Stop a previous 'fadeTo' command.

Returns
No return value.

◆ cancelGrowTo()

void cancelGrowTo ( )

Stop a previous 'growTo' command.

Returns
No return value.

◆ cancelMoveTo()

void cancelMoveTo ( )

Stop a previous 'moveTo' command.

Parameters
autoStop?- Whether to automatically set the linear velocity to zero or not
Returns
No return value.

◆ cancelRotateTo()

void cancelRotateTo ( )

Stop a previous 'rotateTo' command.

Parameters
autoStop?- Whether to automatically set the angular velocity to zero or not
Returns
No return value.

◆ clearCollisionShapes()

void clearCollisionShapes ( )

Deletes all collision shapes.

Returns
No return value.

◆ copyAllCollisionShapes()

void copyAllCollisionShapes ( targetObject  [, clearTargetShapes?])

Copies all collision shapes to the target object.

Parameters
targetObject- The target object to receive the collision shapes.
clearTargetShapes- Whether to clear the current collision shapes on the target or not. Optional: Defaults to true.
Returns
No return value.

◆ copyCollisionShape()

Integer copyCollisionShape ( int  shapeIndex,
targetObject   
)

Copies a collision shape at the specified index to the target object.

Parameters
shapeIndex- The index of the collision shape.
targetObject- The target object to receive the collision shape copy.
Returns
The shape index of the copied collision shape on the target object or (-1) if not copied.

◆ copyFrom()

Boolean copyFrom ( SceneObject  object)

Copies one scene object from another scene object. The object being copied to needs to be of the same class as the object being copied from.

Parameters
objectThe SceneObject to copy this object to.
copyDynamicFieldsWhether the dynamic fields should be copied or not. Optional: Defaults to false.
Returns
(bool) Whether or not the copy was successful.

◆ createChainCollisionShape()

Integer createChainCollisionShape ( localPointsX/  Y)

Creates a chain collision shape.

Parameters
localPointsX/YA space separated list of local points for the chain collision shape (must be at least two points).
adjacentLocalPositionStartXYThe adjacent local position of the start of the edge.
adjacentLocalPositionEndXYThe adjacent local position of the end of the edge.
Returns
(int shapeIndex) The index of the collision shape or (-1) if not created.

◆ createCircleCollisionShape()

Integer createCircleCollisionShape ( radius  )

Creates a circle collision shape.

Parameters
radiusThe radius of the circle.
Returns
(int shapeIndex) The index of the collision shape or (-1) if not created.

◆ createEdgeCollisionShape()

Integer createEdgeCollisionShape ( localPositionStartX  ,
localPositionStartY  ,
localPositionEndX  ,
localPositionEndY   
)

Creates an edge collision shape.

Parameters
localPositionStartXYThe local position of the start of the edge.
localPositionEndXYThe local position of the end of the edge.
adjacentLocalPositionStartXYThe adjacent local position of the start of the edge.
adjacentLocalPositionEndXYThe adjacent local position of the end of the edge.
Returns
(int shapeIndex) The index of the collision shape or (-1) if not created.

◆ createPolygonBoxCollisionShape()

Integer createPolygonBoxCollisionShape ( width  ,
height   
)

Creates a polygon box collision shape.

Parameters
widthThe width of the box.
heightThe height of the box.
localCentroidX/YThe local position of the box centroid.
angleThe angle of the box.
Returns
(int shapeIndex) The index of the collision shape or (-1) if not created.

◆ createPolygonCollisionShape()

Integer createPolygonCollisionShape ( localPointsX/  Y)

Creates a convex polygon collision shape.

Parameters
localPointsX/YA space separated list of local points for the convex polygon collision shape (must be at least three points).
Returns
(int shapeIndex) The index of the collision shape or (-1) if not created.

◆ deleteCollisionShape()

Boolean deleteCollisionShape ( int  shapeIndex)

Deletes the specified collision shape.

Parameters
shapeIndex- The index of the collision shape.
Returns
Whether the collision shape was successfully deleted or not.

◆ detachAllGuiControls()

void detachAllGuiControls ( )

Detach all GUI Controls.

Returns
No return value.

◆ detachGui()

void detachGui ( )

Detach any GUI Control.

Parameters
ctrlThe SimObjectId of the GuiControl to detach.
Returns
No return Value.

◆ fadeTo()

Boolean fadeTo ( targetColor red/green/blue/  alpha,
rate   
)

Fades the object to the target color. The current color of the object will continue to change until it arrives at the target color or the fade is cancelled. The change will continue even if the blendColor is set directly.

Parameters
(red/ green / blue / alpha) The target color to fade the object to.
rateThe rate per second to change each color value. Must be a number greater than zero.
Returns
Whether the fade started or not.

◆ fadeToTime()

Boolean fadeToTime ( targetColor red/green/blue/  alpha,
time   
)

Fades the object to the target color over a period of time. The current color of the object will continue to change until it arrives at the target color or the fade is cancelled. The change will continue even if the blendColor is set directly which will change the amount of time it takes. Unhindered, each of the color values will arrive at the target in approximately the target time.

Parameters
(red/ green / blue / alpha) The target color to fade the object to.
timeThe amount of time in milliseconds that each color value will take to reach the target. Must be a number greater than zero.
Returns
Whether the fade started or not.

◆ getAABB()

String getAABB ( )

Gets the axis-aligned bounding-box of the object.

Returns
(lowerXY upperXY) A space separated list of the lower left and upper right bounds.

◆ getActive()

Boolean getActive ( )

Gets the body active status.

Returns
(bool status) Whether the body is active or not.

◆ getAlphaTest()

Float getAlphaTest ( )

Gets the render alpha test threshold.

Returns
The render alpha test threshold in the range of 0.0f to 1.0. Less than zero represents disabled alpha testing.

◆ getAngle()

Float getAngle ( )

Gets the object's angle.

Returns
(float angle) The object's current angle.

◆ getAngularDamping()

Float getAngularDamping ( )

Gets the angular damping.

Returns
(float damping) The angular damping.

◆ getAngularVelocity()

Float getAngularVelocity ( )

Gets Object Angular Velocity.

Returns
(float velocity) The speed at which the object is rotating.

◆ getArea()

String getArea ( )

Gets the object's area.

Returns
(float x1/float y1/float x2/float y2) A space separated list of the lower left corner x and y position and the upper right corner x and y positions.

◆ getAreaMax()

String getAreaMax (   ...)

Gets the lower right point of the object.

Returns
(float x2/float y2) The upper right corner x and y position of the object.

◆ getAreaMin()

String getAreaMin ( )

Gets the upper left point of the object.

Returns
(float x1/float y1) The lower left corner x and y position of the object.

◆ getAutoSizing()

Boolean getAutoSizing ( )

Gets whether the object automatically sizes itself or not. You cannot set the size of an object that automatically sizes itself.

Returns
Whether the object automatically sizes itself or not.

◆ getAwake()

Boolean getAwake ( )

Gets whether the body is awake or not.

Returns
(bool status) Whether the body is awake or not.

◆ getBlendAlpha()

Float getBlendAlpha ( )

Gets the Rendering Alpha (transparency).

Returns
(float alpha) The alpha value, a range from 0.0 to 1.0. Less than zero if alpha testing is disabled.

◆ getBlendColor()

String getBlendColor ( allowColorNames  )

Gets the Rendering Blend color.

Parameters
allowColorNamesWhether to allow stock color names to be returned or not. Optional: Defaults to false.
Returns
(float red / float green / float blue / float alpha) The sprite blend color.

◆ getBlendMode()

Boolean getBlendMode ( )

Gets whether blending is on or not.

Returns
(bool blendMode) Whether blending is on or not.

◆ getBodyType()

String getBodyType ( )

Gets the body type.

Returns
The body type.

◆ getBullet()

Boolean getBullet ( )

Gets whether the body is a bullet or not.

Returns
(bool status) Whether the body is a bullet or not.

◆ getChainCollisionShapeAdjacentEnd()

String getChainCollisionShapeAdjacentEnd ( int  shapeIndex)

Gets whether the chain collision shape at the specified index has an adjacent end point or not.

Parameters
shapeIndex- The index of the collision shape.
Returns
(bool adjacentEnd) Whether the chain collision shape at the specified index has an adjacent end point or not.

◆ getChainCollisionShapeAdjacentStart()

String getChainCollisionShapeAdjacentStart ( int  shapeIndex)

Gets the adjacent start point of the chain collision shape at the specified index.

Parameters
shapeIndex- The index of the collision shape.
Returns
(adjacentStartPointXY) The adjacent start point of the chain collision shape at the specified index.

◆ getChainCollisionShapeHasAdjacentEnd()

Boolean getChainCollisionShapeHasAdjacentEnd ( int  shapeIndex)

Gets whether the chain collision shape at the specified index has an adjacent end point or not.

Parameters
shapeIndex- The index of the collision shape.
Returns
(bool adjacentEnd) Whether the chain collision shape at the specified index has an adjacent end point or not.

◆ getChainCollisionShapeHasAdjacentStart()

Boolean getChainCollisionShapeHasAdjacentStart ( int  shapeIndex)

Gets whether the chain collision shape at the specified index has an adjacent start point or not.

Parameters
shapeIndex- The index of the collision shape.
Returns
(bool adjacentStart) Whether the chain collision shape at the specified index has an adjacent start point or not.

◆ getChainCollisionShapeLocalPoint()

String getChainCollisionShapeLocalPoint ( int  shapeIndex,
int  pointIndex 
)

Gets the local point of a polygon collision shape at the specified index.

Parameters
shapeIndex- The index of the collision shape.
pointIndex- The index of the local point.
Returns
(localPointXY) The local point of a polygon collision shape at the specified index.

◆ getChainCollisionShapePointCount()

Integer getChainCollisionShapePointCount ( int  shapeIndex)

Gets the point count of a chain collision shape at the specified index.

Parameters
shapeIndex- The index of the collision shape.
Returns
(int pointCount) The point count of a chain collision shape at the specified index or (0) if an invalid shape.

◆ getCircleCollisionShapeLocalPosition()

String getCircleCollisionShapeLocalPosition ( int  shapeIndex)

Gets the local position of a circle collision shape at the specified index.

Parameters
shapeIndex- The index of the collision shape.
Returns
(localPositionXY) The local position of a circle collision shape at the specified index.

◆ getCircleCollisionShapeRadius()

Float getCircleCollisionShapeRadius ( int  shapeIndex)

Gets the radius of a circle collision shape at the specified index.

Parameters
shapeIndex- The index of the collision shape.
Returns
(F32 radius) The radius of a circle collision shape at the specified index or (0) if an invalid shape.

◆ getCollisionCallback()

Boolean getCollisionCallback ( )

Gets whether the 'Scene::onCollision' callback is called or not.

Returns
(bool status) the 'Scene::onCollision' callback is called or not.

◆ getCollisionGroups()

String getCollisionGroups ( )

Gets the collision groups.

Returns
(collisionGroups) A list of collision groups.

◆ getCollisionLayers()

String getCollisionLayers ( )

Gets the collision layers.

Returns
(collisionLayers) A list of collision layers.

◆ getCollisionMasks()

String getCollisionMasks (   ...)

Gets the collision group/layer masks.

Returns
(groupMask/layerMask) The scene group(s) and scene layer(s) the object is enabled to collide with.

◆ getCollisionOneWay()

Boolean getCollisionOneWay ( )

Gets the one way collision status for chain and edge shapes that belong to this object.

Returns
(bool status) Whether collisions happen only in one direction or not.

◆ getCollisionShapeArea()

Float getCollisionShapeArea ( int  shapeIndex)

Gets the area of collision shape at the specified index.

Parameters
shapeIndex- The index of the collision shape.
Returns
(area) The area of collision shape at the specified index.

◆ getCollisionShapeCount()

Integer getCollisionShapeCount ( )

Gets the number of collision shapes.

Returns
(int count) The number of collision shapes.

◆ getCollisionShapeDensity()

Float getCollisionShapeDensity ( int  shapeIndex)

Gets the density of the collision shape at the specified index.

Parameters
shapeIndex- The index of the collision shape.
Returns
The density of the collision shape at the specified index (-1 if error).

◆ getCollisionShapeFriction()

Float getCollisionShapeFriction ( int  shapeIndex)

Gets the friction of the collision shape at the specified index.

Parameters
shapeIndex- The index of the collision shape.
Returns
The friction of the collision shape at the specified index (-1 if error).

◆ getCollisionShapeIsSensor()

Boolean getCollisionShapeIsSensor ( int  shapeIndex)

Gets whether the collision shape at the specified index is a sensor or not.

Parameters
shapeIndex- The index of the collision shape.
Returns
Whether the collision shape at the specified index is a sensor or not.

◆ getCollisionShapeRestitution()

Float getCollisionShapeRestitution ( int  shapeIndex)

Gets the restitution of the collision shape at the specified index.

Parameters
shapeIndex- The index of the collision shape.
Returns
The restitution of the collision shape at the specified index (-1 if error).

◆ getCollisionShapeType()

String getCollisionShapeType ( int  shapeIndex)

Gets the type of collision shape at the specified index.

Parameters
shapeIndex- The index of the collision shape.
Returns
(type) The type of collision shape at the specified index.

◆ getCollisionSuppress()

Boolean getCollisionSuppress ( )

Gets the collision suppress status.

Returns
(bool status) Whether to supress the collision or not.

◆ getContact()

String getContact ( contactIndex  )

Gets the contact at the specified contact index.

Parameters
contactIndexThe contact at the specified index.
Returns
The contact at the specified index.

◆ getContactCount()

Integer getContactCount ( )

Gets the current contact count. This will always be zero if contact gathering is off.

Returns
(int count) - Gets the current contact count.

◆ getDefaultDensity()

Float getDefaultDensity ( )

Gets the default density.

Returns
(float density) The default density.

◆ getDefaultFriction()

Float getDefaultFriction ( )

Gets the default friction.

Returns
(float friction) The default friction.

◆ getDefaultRestitution()

Float getDefaultRestitution ( )

Gets the default restitution.

Returns
(float density) The default restitution.

◆ getDstBlendFactor()

String getDstBlendFactor ( )

Gets the destination blend factor.

Returns
(dstBlend) The destination blend factor.

◆ getEdgeCollisionShapeAdjacentEnd()

String getEdgeCollisionShapeAdjacentEnd ( int  shapeIndex)

Gets whether the edge collision shape at the specified index has an adjacent end point or not.

Parameters
shapeIndex- The index of the collision shape.
Returns
(bool adjacentEnd) Whether the edge collision shape at the specified index has an adjacent end point or not.

◆ getEdgeCollisionShapeAdjacentStart()

String getEdgeCollisionShapeAdjacentStart ( int  shapeIndex)

Gets the adjacent start point of the edge collision shape at the specified index.

Parameters
shapeIndex- The index of the collision shape.
Returns
(adjacentStartPointXY) The adjacent start point of the edge collision shape at the specified index.

◆ getEdgeCollisionShapeHasAdjacentEnd()

Boolean getEdgeCollisionShapeHasAdjacentEnd ( int  shapeIndex)

Gets whether the edge collision shape at the specified index has an adjacent end point or not.

Parameters
shapeIndex- The index of the collision shape.
Returns
(bool adjacentEnd) Whether the edge collision shape at the specified index has an adjacent end point or not.

◆ getEdgeCollisionShapeHasAdjacentStart()

Boolean getEdgeCollisionShapeHasAdjacentStart ( int  shapeIndex)

Gets whether the chain collision shape at the specified index has an adjacent start point or not.

Parameters
shapeIndex- The index of the collision shape.
Returns
(bool adjacentStart) Whether the chain collision shape at the specified index has an adjacent start point or not.

◆ getEdgeCollisionShapeLocalPositionEnd()

String getEdgeCollisionShapeLocalPositionEnd ( int  shapeIndex)

Gets the local position end of the edge collision shape at the specified index.

Parameters
shapeIndex- The index of the collision shape.
Returns
(localPositionEndXY) The local position end of the edge collision shape at the specified index.

◆ getEdgeCollisionShapeLocalPositionStart()

String getEdgeCollisionShapeLocalPositionStart ( int  shapeIndex)

Gets the local position start of the edge collision shape at the specified index.

Parameters
shapeIndex- The index of the collision shape.
Returns
(localPositionStartXY) The local position start of the edge collision shape at the specified index.

◆ getFixedAngle()

Boolean getFixedAngle ( )

Gets whether the angle is fixed or not.

Returns
(bool status?) Whether the angle is fixed or not.

◆ getGatherContacts()

Boolean getGatherContacts ( )

Gets whether the gathering of contacts is active or not.

Returns
Whether the gathering of contacts is active or not.

◆ getGravityScale()

Float getGravityScale ( )

Gets the gravity scale.

Returns
(float scale) The gravity scale.

◆ getHeight()

Float getHeight ( )

Gets the height of the object.

Returns
(float height) The height of the object.

◆ getInertia()

Float getInertia ( )

Gets the rotation inertia of the body around the local origin.

Returns
(float inertia) rotation inertia of the body around the local origin (Kg-m^2). If object is not in a scene then mass is always zero.

◆ getIsPointInCollisionShape()

Boolean getIsPointInCollisionShape ( int  shapeIndex,
worldPointX/  Y 
)

Returns whether the world point intersects with the specified collision shape or not.

Parameters
worldPointX/YThe world point to check.
shapeIndex- The index of the collision shape.
Returns
(bool isInside) Whether the world point intersects with the specified collision shape or not.

◆ getIsPointInOOBB()

Boolean getIsPointInOOBB ( worldPointX/  Y)

Returns whether the world point intersects with the objects OOBB or not.

Parameters
worldPointX/YThe world point to check.
Returns
(bool isInside) Whether the world point intersects with the objects OOBB or not.

◆ getLifetime()

Float getLifetime ( )

Gets the Objects Lifetime.

Returns
(float lifetime) The objects lifetime left before it is automatically deleted.

◆ getLinearDamping()

Float getLinearDamping ( )

Gets the linear damping.

Returns
(float damping) The linear damping.

◆ getLinearVelocity()

String getLinearVelocity ( )

Gets Object Linear Velocity.

Returns
(float velocityX, float velocityY) The x and y velocities of the object.

◆ getLinearVelocityFromLocalPoint()

String getLinearVelocityFromLocalPoint ( localPointX/  Y)

Gets the linear velocity from a local point.

Returns
(float linearVelocityX/Y) The linear velocity at the local point.

◆ getLinearVelocityFromWorldPoint()

String getLinearVelocityFromWorldPoint ( worldPointX/  Y)

Gets the linear velocity from a world point.

Returns
(float linearVelocityX/Y) The linear velocity at the world point.

◆ getLinearVelocityPolar()

String getLinearVelocityPolar ( )

Gets Objects Linear Velocity using Polar angle/speed.

Returns
(float angle, float speed) The angle and speed the object is moving at.

◆ getLinearVelocityX()

Float getLinearVelocityX ( )

Gets Object Linear Velocity X.

Returns
(float velocityX) The object's velocity along the x axis.

◆ getLinearVelocityY()

Float getLinearVelocityY ( )

Gets Object Linear Velocity Y.

Returns
(float velocityY) The object's velocity along the y axis.

◆ getLocalCenter()

String getLocalCenter ( )

Gets the local center of mass.

Returns
(float localCenter) Gets the local center of mass.

◆ getLocalPoint()

String getLocalPoint ( float worldPointX/  Y)

Returns a local point from the world point. Converts a point in world space to local space.

Parameters
worldPointX/YThe world point to convert into a local point.
Returns
(float localPointX/Y) The local point that was converted from the world point passed.

◆ getLocalVector()

String getLocalVector ( float worldVectorX/  Y)

Returns a local vector from the world vector. Converts a vector in world space to local space.

Parameters
worldVectorX/YThe world vector to convert into a vector point.
Returns
(float localVectorX/Y) The local vector that was converted from the world vector passed.

◆ getMass()

Float getMass ( )

Gets the total mass of the body.

Returns
(float mass) The total mass of the body. If object is not in a scene then mass is always zero.

◆ getPickingAllowed()

Boolean getPickingAllowed ( )

Gets whether picking is allowed or not.

Returns
Whether picking is allowed or not.

◆ getPolygonCollisionShapeLocalPoint()

String getPolygonCollisionShapeLocalPoint ( int  shapeIndex,
int  pointIndex 
)

Gets the local point of a polygon collision shape at the specified index.

Parameters
shapeIndex- The index of the collision shape.
pointIndex- The index of the local point.
Returns
(localPointXY) The local point of a polygon collision shape at the specified index.

◆ getPolygonCollisionShapePointCount()

Integer getPolygonCollisionShapePointCount ( int  shapeIndex)

Gets the point count of a polygon collision shape at the specified index.

Parameters
shapeIndex- The index of the collision shape.
Returns
(int pointCount) The point count of a polygon collision shape at the specified index or (0) if an invalid shape.

◆ getPosition()

String getPosition ( )

Gets the object's position.

Returns
(float x/float y) The x and y (horizontal and vertical) position of the object.

◆ getPositionX()

Float getPositionX ( )

Gets the object's position.

Returns
The x (horizontal) position of the object.

◆ getPositionY()

Float getPositionY ( )

Gets the object's position.

Returns
The y (vertical) position of the object.

◆ getRenderAngle()

Float getRenderAngle ( )

Gets the object's render angle.

Returns
(float rotation) The object's current render angle.

◆ getRenderGroup()

String getRenderGroup ( )

Gets the name of the render group used to sort the object during rendering.

Returns
The render group used to sort the object during rendering.

◆ getRenderPosition()

String getRenderPosition ( )

Gets the current render position.

Returns
(float x/float y) The x and y (horizontal and vertical) render position of the object.

◆ getScene()

Integer getScene ( )

Get the scene the object is in.

Returns
(Scene scene) The scene this object is currently in.

◆ getSceneGroup()

Integer getSceneGroup ( )

Gets the Objects Group.

Returns
(integer group) The scene group the object is on.

◆ getSceneLayer()

Integer getSceneLayer ( )

Gets the Objects Layer.

Returns
(integer layer) The scene layer the object is on.

◆ getSceneLayerDepth()

Float getSceneLayerDepth ( )

Gets the scene layer depth.

Returns
(float layerDepth) The scene layer depth.

◆ getSize()

String getSize ( )

Gets the objects size.

Returns
(float width/float height) The width and height of the object.

◆ getSizeX()

Float getSizeX ( )

Gets the width of the object.

Returns
(float width) The width of the object.

◆ getSizeY()

Float getSizeY ( )

Gets the height of the object.

Returns
(float height) The height of the object.

◆ getSleepingAllowed()

Boolean getSleepingAllowed ( )

Gets whether the body is allowed to sleep or not.

Returns
(bool status) Whether the body is allowed to sleep or not.

◆ getSleepingCallback()

Boolean getSleepingCallback ( )

Gets whether the 'onWake' and 'onSleep' callbacks are called or not when the object changes sleep state.

Returns
(bool status ) Whether the 'onWake' and 'onSleep' callbacks are called or not.

◆ getSortPoint()

String getSortPoint ( )

Gets the layer draw order sorting point.

Returns
(float x/float y) The local x and y position of the sort point.

◆ getSortPointX()

Float getSortPointX ( )

Gets the x component of the layer draw order sorting point.

Returns
(float x) The local x position of the sort point.

◆ getSortPointY()

Float getSortPointY ( )

Gets the y component of the layer draw order sorting point.

Returns
(float y) The local y position of the sort point.

◆ getSoundatIndex()

Integer getSoundatIndex ( )

Gets the handle of a sound at specified index

Parameters
Index- The Index of the sound (obtained via getSoundatIndex)
Returns
returns the handle of a sound

◆ getSoundsCount()

Integer getSoundsCount ( )

gets the amount of sounds currently attached to a SceneObject

Returns
returns the Amount of sounds currently attached to the SceneObject

◆ getSrcBlendFactor()

String getSrcBlendFactor ( )

Gets the source blend factor.

Returns
(srcBlend) The source blend factor.

◆ getUpdateCallback()

Boolean getUpdateCallback ( )

Gets whether the 'onUpdate' callback is called or not.

Returns
(bool status ) Whether the 'onUpdate' callback is called or not.

◆ getUseInputEvents()

Boolean getUseInputEvents ( )

Gets whether input events are passed from the scene window are monitored by this object or not.

Returns
(bool inputStatus) Whether input events are passed from the scene window are monitored by this object or not.

◆ getVisible()

Boolean getVisible ( )

Gets the object's visible status.

Returns
(bool status) Whether or not the object is visible.

◆ getWidth()

Float getWidth ( )

Gets the width of the object.

Returns
(float width) The width of the object.

◆ getWorldCenter()

String getWorldCenter ( )

Gets the world center of mass.

Returns
(float worldCenter) Gets the world center of mass.

◆ getWorldPoint()

String getWorldPoint ( float localPointX/  Y)

Returns a world point from the local point. Converts a point in local space to world space.

Parameters
localPointX/YThe local point to convert into a world point.
Returns
(float worldPointX/Y) The world point that was converted from the local point passed.

◆ getWorldVector()

String getWorldVector ( float localVectorX/  Y)

Returns a world vector from the local vector. Converts a vector in local space to world space.

Parameters
localVectorX/YThe local vector to convert into a world vector.
Returns
(float worldVectorX/Y) The world vector that was converted from the local vector passed.

◆ growTo()

Boolean growTo ( targetSize width/  height,
rate rateX/  rateY 
)

Grows or shrinks the object to the target size. The current size of the object will continue to change until it arrives at the target size or the grow is cancelled. The change will continue even if the size is set directly.

Parameters
(width/ height) The target size to grow or shrink the object to.
(rateX/ rateY) The rate per second to change the size. Must be a number greater than zero even if shrinking. Can be one or two values.
Returns
Whether the grow started or not.

◆ growToTime()

Boolean growToTime ( targetSize width/  height,
time   
)

Grows or shrinks the object to the target size over a period of time. The current size of the object will continue to change until it arrives at the target size or the grow is cancelled. The change will continue even if the size is set directly which will change the amount of time it takes. Unhindered, both size values will arrive at the target in approximately the target time.

Parameters
(width/ height) The target size to grow or shrink the object to.
timeThe amount of time in milliseconds that both size values will take to reach the target. Must be a number greater than zero.
Returns
Whether the fade started or not.

◆ isFadeToComplete()

Boolean isFadeToComplete ( )

Gets whether a previous 'fadeTo' command has completed or not.

Returns
No return value.

◆ isGrowToComplete()

Boolean isGrowToComplete ( )

Gets whether a previous 'growTo' command has completed or not.

Returns
No return value.

◆ isMoveToComplete()

Boolean isMoveToComplete ( )

Gets whether a previous 'moveTo' command has completed or not.

Returns
No return value.

◆ isRotateToComplete()

Boolean isRotateToComplete ( )

Gets whether a previous 'rotateTo' command has completed or not.

Returns
No return value.

◆ moveTo()

Boolean moveTo ( worldPoint X/  Y,
speed   
)

Moves the object to the specified world point. Linear velocity is applied to the object at the given speed in the direction of the target world point. The object may never reach the point if other forces act on the target such as collisions. If the object moves away from the target the object will stop checking to see if it has arrived at the target.

Parameters
worldPointX/YThe world point to move the object to.
speedThe speed (in m/s) to use to move to the specified point.
autoStop?Whether to automatically set the linear velocity to zero when the object arrives at the target.
snapToTarget?Whether to snap the object to the target point when it is within the margin.
margin?The distance from the target that qualifies as reaching the target.
Returns
Whether the move could be started or not.

◆ playSound()

Integer playSound ( )

Plays a sound at the object's location

Parameters
AudioAsset- The Audio Asset to play
AudioDescription- Sets the audio Description. If omitted, (optional)
Returns
returns the audio handle

◆ removeFromScene()

void removeFromScene ( )

Remove the object from the scene.

Returns
No return value.

◆ rotateTo()

Boolean rotateTo ( angle  ,
speed   
)

Rotates the object to the specified angle. The angle is rotated to by calculating the initial angular velocity required and applies it. The object may never reach the point if it has angular damping applied or collides with another object.

Parameters
angleThe angle to rotate the object to.
speedThe speed (in degree/s) to use to rotate to the specified angle.
autoStop?Whether to automatically set the angular velocity to zero when time has elapsed or not
warpToTarget?Whether to rotate instantly to the target angle after the specified time or not in-case the target was not quite reached.
Returns
Whether the rotation could be started or not.

◆ safeDelete()

void safeDelete ( )

Safely deletes object.

Returns
No return Value.

◆ setActive()

void setActive ( )

Sets the body active status.

Parameters
status- Whether the body should be active or not (defaults to true).
Returns
No return Value.

◆ setAlphaTest()

void setAlphaTest ( float  alpha)

Set the render alpha test threshold.

Parameters
alphaThe alpha test threshold in the range of 0.0 to 1.0. Less than zero to disable alpha testing.
Returns
No return value.

◆ setAngle()

void setAngle ( float  angle)

Sets the objects angle.

Parameters
angleThe angle of the object.
Returns
No return value.

◆ setAngularDamping()

void setAngularDamping ( float  damping)

Sets the angular damping.

Parameters
damping- The angular damping scale.
Returns
No return Value.

◆ setAngularVelocity()

void setAngularVelocity ( float  velocity)

Sets Objects Angular Velocity.

Parameters
velocityThe speed at which the object will rotate.
Returns
No return Value.

◆ setArea()

void setArea ( float  x1,
float  y1,
float  x2,
float  y2 
)

Sets the objects area.

Parameters
x1The lower left corner x position.
y1The lower left corner y position.
x2The upper right corner x position.
y2The upper right corner y position.
Returns
No return value.

◆ setAwake()

void setAwake ( )

Sets whether the body is awake or not.

Parameters
status- Whether the body should be awake or not (defaults to true).
Returns
No return Value.

◆ setBlendAlpha()

void setBlendAlpha ( float  alpha)

Sets the Rendering Alpha (transparency). The alpha value specifies directly the transparency of the image. A value of 1.0 will not affect the object and a value of 0.0 will make the object completely transparent.

Parameters
alphaThe alpha value.
Returns
No return Value.

◆ setBlendColor()

void setBlendColor ( float  red,
float  green,
float  blue 
)

or ( stockColorName ) - Sets the blend color.

Parameters
redThe red value.
greenThe green value.
blueThe blue value.
alphaThe alpha value.
Returns
No return Value.

◆ setBlendMode()

void setBlendMode ( bool  blendMode)

Sets whether blending is on or not. @blendMode Whether blending is on or not.

Returns
No return Value.

◆ setBodyType()

void setBodyType ( bodyType  type)

Sets the body type.

Returns
No return value.

◆ setBullet()

void setBullet ( )

Sets whether the body is a bullet or not.

Parameters
status- Whether the body should be a bullet (fast moving body) or not (defaults to true).
Returns
No return Value.

◆ setCollisionAgainst()

void setCollisionAgainst ( SceneObject  object)

Sets the collision masks against a specific object.

Parameters
objectThe SceneObject to set collision masks against
clearMasksWhether or not to clear the collision masks before setting them against the object.
Returns
No return value.

◆ setCollisionCallback()

void setCollisionCallback ( )

Sets whether the 'Scene::onCollision' callback is called or not. Sets whether whether the 'Scene::onCollision' callback is called or not.

Parameters
statusWhether the 'Scene::onCollision' callback is called or not (default is false).
Returns
No return Value.

◆ setCollisionGroups()

void setCollisionGroups ( groups  )

Sets the collision group(s).

Parameters
groupsA list of collision groups to collide with.
Returns
No return value.

◆ setCollisionLayers()

void setCollisionLayers ( layers  )

Sets the collision layers(s).

Parameters
layersA list of layers to collide with.
Returns
No return value.

◆ setCollisionMasks()

void setCollisionMasks ( groupMask  )

Sets the collision masks. Collision masks limit the objects that are collided with based on their scene group and scene Layer. In order for two objects to collide, the sending object must have the receiving object's Graph Group and Rendering Layer in its masks. The receiving object's masks, however, do not have to contain the sending object's Graph Group and Rendering Layer.

Parameters
sceneGroupMaskThe scene group(s) to enable collision with.
sceneLayerMaskThe scene layer(s) to enable collision with. If sceneLayerMask is not specified then all scene layers will be included.
Returns
No return value.

◆ setCollisionOneWay()

void setCollisionOneWay ( )

Sets the one way collision status for chain and edge shapes that belong to this object.

Parameters
statusWhether collisions happen only in one direction or not (defaults to false).
Returns
No return value.

◆ setCollisionShapeDensity()

void setCollisionShapeDensity ( int  shapeIndex,
float  density 
)

Sets the density of the collision shape at the specified index.

Parameters
shapeIndex- The index of the collision shape.
density- The collision shape density.
Returns
No return value.

◆ setCollisionShapeFriction()

void setCollisionShapeFriction ( int  shapeIndex,
float  friction 
)

Sets the friction of the collision shape at the specified index.

Parameters
shapeIndex- The index of the collision shape.
friction- The collision shape friction.
Returns
No return value.

◆ setCollisionShapeIsSensor()

void setCollisionShapeIsSensor ( int  shapeIndex,
bool  status 
)

Sets whether the collision shape at the specified index is a sensor or not.

Parameters
shapeIndex- The index of the collision shape.
status- Whether the collision shape at the specified index is a sensor or not.
Returns
No return value.

◆ setCollisionShapeRestitution()

void setCollisionShapeRestitution ( int  shapeIndex,
float  restitution 
)

Sets the restitution of the collision shape at the specified index.

Parameters
shapeIndex- The index of the collision shape.
density- The collision shape restitution.
Returns
No return value.

◆ setCollisionSuppress()

void setCollisionSuppress ( )

Sets the collision suppress status.

Parameters
statusWhether to suppress the collision or not (defaults to true).
Returns
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.

◆ setDefaultDensity()

void setDefaultDensity ( float  density)

Sets the default density to use when creating collision shapes.

Parameters
densityThe default density to use when creating collision shapes.
updateShapesWhether to update the density on any existing shapes or not (default is true).
Returns
No return Value.

◆ setDefaultFriction()

void setDefaultFriction ( float  friction)

Sets the default friction to use when creating collision shapes.

Parameters
frictionThe default friction to use when creating collision shapes.
updateShapesWhether to update the friction on any existing shapes or not (default is true).
Returns
No return Value.

◆ setDefaultRestitution()

void setDefaultRestitution ( float  restitution)

Sets the default restitution to use when creating collision shapes..

Parameters
restitutionThe default restitution to use when creating collision shapes.
updateShapesWhether to update the restitution on any existing shapes or not (default is true).
Returns
No return Value.

◆ setDstBlendFactor()

void setDstBlendFactor ( dstBlend  )

Sets the destination blend factor.

Parameters
dstBlendThe destination blend factor.
Returns
No return Value.

◆ setEnabled()

void setEnabled ( bool  status)

Enables or disables the object.

Parameters
statusWhether to enable or disable the object.
Returns
No return value.

◆ setFixedAngle()

void setFixedAngle ( bool status?  )

Whether the object angle is fixed or not.

Returns
No return Value.

◆ setGatherContacts()

void setGatherContacts ( bool  gatherContacts)

Sets whether to gather contacts or not.

Parameters
gatherContactsWhether to gather contacts or not. By default contact gather is off as it can become expensive if a lot of contacts are being processed.
Returns
No return value.

◆ setGravityScale()

void setGravityScale ( float  scale)

Sets the scaled world gravity.

Parameters
scale- The scaled world gravity.
Returns
No return Value.

◆ setHeight()

void setHeight ( float  height)

Sets the height of the object.

Parameters
heightThe height of the object.
Returns
No return value.

◆ setLifetime()

void setLifetime ( float  lifetime)

Set Objects' Lifetime.

Parameters
lifetimeThe amount of time, in seconds, before the object is automatically deleted.
Returns
No return Value.

◆ setLinearDamping()

void setLinearDamping ( float  damping)

Sets the linear damping.

Parameters
damping- The linear damping scale.
Returns
No return Value.

◆ setLinearVelocity()

void setLinearVelocity ( float  velocityX,
float  velocityY 
)

Sets Objects Linear Velocity. Sets the velocity at which the object will move.

Parameters
velocityXThe x component of the velocity.
velocityYThe y component of the velocity.
Returns
No return Value.

◆ setLinearVelocityPolar()

void setLinearVelocityPolar ( float  angle,
float  speed 
)

Sets Objects Linear Velocity using Polar-speed. Sets the speed and direction at which the object will move. This has the same effect as setLinearVelocity(), it just sets the velocity in a different way.

Parameters
angleThe angle of the direction at which the object to move.
speedThe speed at which the object will move.
Returns
No return Value.

◆ setLinearVelocityX()

void setLinearVelocityX ( float  velocityX)

Sets Objects Linear Velocity X-Component.

Parameters
velocityXThe x component of the velocity.
Returns
No return Value.

◆ setLinearVelocityY()

void setLinearVelocityY ( float  velocityY)

Sets Objects Linear Velocity Y-Component.

Parameters
velocityYThe y component of the velocity.
Returns
No return Value.

◆ setPickingAllowed()

void setPickingAllowed ( bool  pickingAllowed)

Sets whether picking is allowed or not.

Parameters
pickingAllowedWhether picking is allowed or not.
Returns
No return Value.

◆ setPosition()

void setPosition ( float  x,
float  y 
)

Sets the objects position.

Parameters
xThe position of the object along the horizontal axis.
yThe position of the object along the vertical axis.
Returns
No return value.

◆ setPositionX()

void setPositionX ( float  x)

Sets the objects x position.

Parameters
xThe horizontal position of the object.
Returns
No return value.

◆ setPositionY()

void setPositionY ( float  y)

Sets the objects y position.

Parameters
yThe vertical position of the object.
Returns
No return value.

◆ setRenderGroup()

void setRenderGroup ( renderGroup  )

Sets the name of the render group used to sort the object during rendering.

Parameters
renderGroupThe name of the render group to use. Defaults to nothing.
Returns
No return value.

◆ setSceneGroup()

void setSceneGroup ( integer  group)

Sets the objects group (0-31). The scene group to place the object in.

Parameters
groupInteger in the range [0-31].
Returns
No return Value.

◆ setSceneLayer()

void setSceneLayer ( integer  layer)

Sets the objects scene layer (0-31). The layer on which to place the object.

Parameters
layerInteger in the range [0-31].
Returns
No return Value.

◆ setSceneLayerDepth()

void setSceneLayerDepth ( float  layerDepth)

Sets the objects scene layer depth.

Parameters
layerDepthThe layer depth can be any value.
Returns
No return Value.

◆ setSceneLayerDepthBack()

Boolean setSceneLayerDepthBack ( )

Sets the layer depth to be the back-most within the current layer..

Returns
Whether the scene layer depth was adjusted or not.

◆ setSceneLayerDepthBackward()

Boolean setSceneLayerDepthBackward ( )

Sets the layer depth to be behind of the object currently behind within the current layer.

Returns
Whether the scene layer depth was adjusted or not.

◆ setSceneLayerDepthForward()

Boolean setSceneLayerDepthForward ( )

Sets the layer depth to be in-front of the object currently in-front within the current layer.

Returns
Whether the scene layer depth was adjusted or not.

◆ setSceneLayerDepthFront()

Boolean setSceneLayerDepthFront ( )

Sets the layer depth to be the front-most within the current layer..

Returns
Whether the scene layer depth was adjusted or not.

◆ setSize()

void setSize ( float  width,
float  height 
)

Sets the objects size.

Parameters
widthThe width of the object.
heightThe height of the object.
Returns
No return value.

◆ setSizeX()

void setSizeX ( float  width)

Sets the width of the object.

Parameters
widthThe width of the object.
Returns
No return value.

◆ setSizeY()

void setSizeY ( float  height)

Sets the height of the object.

Parameters
heightThe height of the object.
Returns
No return value.

◆ setSleepingAllowed()

void setSleepingAllowed ( )

Sets whether the body is allowed to sleep or not.

Parameters
status- Whether sleeping is allowed on the body or not (defaults to true).
Returns
No return Value.

◆ setSleepingCallback()

void setSleepingCallback ( )

Sets whether the 'onWake' and 'onSleep' callbacks are called or not when the object changes sleep state. The object must be able to sleep (setSleepingAllowed) and have a 'dynamic' body mode for this callback to occur.

Parameters
statusWhether the 'onWake' and 'onSleep' callbacks are called or not (default is false).
Returns
No return Value.

◆ setSortPoint()

void setSortPoint ( float  x,
float  y 
)

Sets the layer draw order sorting point.

Parameters
xThe x position local to the object of the sort point.
yThe y position local to the object of the sort point.
Returns
No return value.

◆ setSortPointX()

void setSortPointX ( float  x)

Sets the x-component of the layer draw order sorting point.

Parameters
xThe x position local to the object of the sort point.
Returns
No return value.

◆ setSortPointY()

void setSortPointY ( float  y)

Sets the y-component of the layer draw order sorting point.

Parameters
yThe y position local to the object of the sort point.
Returns
No return value.

◆ setSrcBlendFactor()

void setSrcBlendFactor ( srcBlend  )

Sets the source blend factor.

Parameters
srcBlendThe source blend factor.
Returns
No return Value.

◆ setUpdateCallback()

void setUpdateCallback ( )

Sets whether the 'onUpdate' callback is called or not.

Parameters
statusWhether the 'onUpdate' callback is called or not (default is false).
Returns
No return Value.

◆ setUseInputEvents()

void setUseInputEvents ( bool  inputStatus)

Sets whether input events are passed from the scene window are monitored by this object or not.

Parameters
inputStatusWhether input events are passed from the scene window are monitored by this object or not.
Returns
No return Value.

◆ setVisible()

void setVisible ( bool  status)

Show or hide the object.

Parameters
statusWhether to enable or disable visibility on the object.
Returns
No return value.

◆ setWidth()

void setWidth ( float  width)

Sets the width of the object.

Parameters
widthThe width of the object.
Returns
No return value.

◆ stopSound()

void stopSound ( S32  index)

Stops a sound attached to a SceneObject

Parameters
Index- The Index of the sound (obtained via getSoundatIndex)