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

#include <ShapeVector_ScriptBinding.h>

Inherits SceneObject.

Public Member Functions

String getBoxFromPoints ()
 
Boolean getCircleRadius ()
 
String getFillColor (allowColorNames)
 
Boolean getFillMode ()
 
String getFlip ()
 
Boolean getFlipX ()
 
Boolean getFlipY ()
 
Boolean getIsCircle ()
 
String getLineColor (allowColorNames)
 
String getPoly ()
 
Integer getVertexCount ()
 
String getWorldPoly ()
 
void setCircleRadius (radius)
 
void setFillAlpha (alpha)
 
void setFillColor (float red, float green, float blue, [float alpha=1.0])
 
void setFillMode (fillMode?)
 
void setFlip (bool flipX, bool flipY)
 
void setFlipX (bool flipX)
 
void setFlipY (bool flipY)
 
void setIsCircle (isCircle?)
 
void setLineAlpha (alpha)
 
void setLineColor (float red, float green, float blue, [float alpha=1.0])
 
void setPolyCustom (poly-count, poly-Definition$)
 
void setPolyPrimitive (vertexCount)
 
- Public Member Functions inherited from SceneObject
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

◆ getBoxFromPoints()

String getBoxFromPoints ( )

Get a box (\width height\ that wraps around the poly vertices

◆ getCircleRadius()

Boolean getCircleRadius ( )

Returns the radius of the shape if it is a circle.

Returns
The fill mode as a boolean value.

◆ getFillColor()

String getFillColor ( allowColorNames  )

Gets the fill 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.

◆ getFillMode()

Boolean getFillMode ( )

Gets the Rendering Fill Mode.

Returns
The fill mode as a boolean value.

◆ getFlip()

String getFlip ( )

Gets the flip for each axis.

Returns
(bool flipX/bool flipY) Whether or not the shape is flipped along the x and y axis.

◆ getFlipX()

Boolean getFlipX ( )

Gets whether or not the shape is flipped horizontally.

Returns
(bool flipX) Whether or not the shape is flipped along the x axis.

◆ getFlipY()

Boolean getFlipY ( )

Gets whether or not the shape is flipped vertically.

Returns
(bool flipY) Whether or not the shape is flipped along the y axis.

◆ getIsCircle()

Boolean getIsCircle ( )

Returns whether this shape is a circle or not.

Returns
The fill mode as a boolean value.

◆ getLineColor()

String getLineColor ( allowColorNames  )

Gets the fill 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.

◆ getPoly()

String getPoly ( )

Gets Polygon.

Returns
(poly-Definition) The vertices of the polygon in object space.

◆ getVertexCount()

Integer getVertexCount ( )

Get the number of vertices on a polygon shape.

◆ getWorldPoly()

String getWorldPoly ( )

Gets Polygon points in world space.

Returns
(poly-Definition) The vertices of the polygon in world space.

◆ setCircleRadius()

void setCircleRadius ( radius  )

Changes the radius of the shape if it is a circle.

Returns
The fill mode as a boolean value.

◆ setFillAlpha()

void setFillAlpha ( alpha  )

Sets the Rendering Fill Alpha (transparency).

Parameters
alphaThe alpha value.
Returns
No return value.

◆ setFillColor()

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

RGBA value or ( stockColorName ) - Sets the fill color.

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

◆ setFillMode()

void setFillMode ( fillMode?  )

Sets the Rendering Fill Mode.

Returns
No return value.

◆ setFlip()

void setFlip ( bool  flipX,
bool  flipY 
)

Sets shape flipping for each axis.

Parameters
flipXWhether or not to flip the shape along the x (horizontal) axis.
flipYWhether or not to flip the shape along the y (vertical) axis.
Returns
No return value.

◆ setFlipX()

void setFlipX ( bool  flipX)

Sets whether or not the shape is flipped horizontally.

Parameters
flipXWhether or not to flip the shape along the x (horizontal) axis.
Returns
No return value.

◆ setFlipY()

void setFlipY ( bool  flipY)

Sets whether or not the shape is flipped vertically.

Parameters
flipYWhether or not to flip the shape along the y (vertical) axis.
Returns
No return value.

◆ setIsCircle()

void setIsCircle ( isCircle?  )

Sets whether this shape is a circle or not.

Returns
The fill mode as a boolean value.

◆ setLineAlpha()

void setLineAlpha ( alpha  )

Sets the Rendering Line Alpha (transparency).

Parameters
alphaThe alpha value.
Returns
No return value.

◆ setLineColor()

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

RGBA value or ( stockColorName ) - Sets the line color.

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

◆ setPolyCustom()

void setPolyCustom ( poly-  count,
poly-  Definition$ 
)

Sets Custom Polygon.

Returns
No return value.

◆ setPolyPrimitive()

void setPolyPrimitive ( vertexCount  )

Sets a regular polygon primitive.

Returns
No return value.