Model

Model is a type of representation that represents a 3D Model or Mesh.
If you can't find a model that suits you in the package explorer and want to make one yourself remember that we are using OGRE Meshes as 3D models. The good news is that you have plugins for most of 3D modeling software to export your 3D models as OGRE meshes.
Visite OGRE's tools webpage at http://www.ogre3d.org/index.php?option=com_content&task=view&id=413&Itemid=133

Method Summary
 niladdRepresentation (representation toAdd)
 niladdShapeBox (string name)
 niladdShapeBox (string name, string material)
 niladdShapeBox (string name, string material, number x, number y, number z, number dw, number dx, number dy, number dz, number sx, number sy, number sz)
 niladdShapeBox (string name, number x, number y, number z, number dw, number dx, number dy, number dz, number sx, number sy, number sz)
 niladdShapeCapsule (string name)
 niladdShapeCapsule (string name, string material)
 niladdShapeCapsule (string name, string material, number x, number y, number z, number dw, number dx, number dy, number dz, number radius, number height)
 niladdShapeSensorBox (string name)
 niladdShapeSensorCapsule (string name)
 niladdShapeSensorCapsule (string name, number x, number y, number z, number dw, number dx, number dy, number dz, number radius, number height)
 niladdShapeSensorSphere (string name)
 niladdShapeSphere (string name)
 niladdShapeSphere (string name, string material)
 niladdShapeSphere (string name, string material, number x, number y, number z, number radius)
 niladdShapeSphere (string name, number x, number y, number z, number radius)
 niladdShapeTriangleMesh (string name)
 niladdShapeTriangleMesh (string name, string material)
 nilapplyForce (number forcex, number forcey, number forcez, int forceType)
 nilapplyForceAtLocalPosition (number forcex, number forcey, number forcez, number positionx, number positiony, number positionz, int forceType)
 nilapplyForceAtPosition (number forcex, number forcey, number forcez, number positionx, number positiony, number positionz, int forceType)
 nilapplyLocalForce (number forcex, number forcey, number forcez, int forceType)
 nilapplyLocalForceAtLocalPosition (number forcex, number forcey, number forcez, number positionx, number positiony, number positionz, int forceType)
 nilapplyLocalForceAtPosition (number forcex, number forcey, number forcez, number positionx, number positiony, number positionz, int forceType)
 nilapplyLocalTorque (number forcex, number forcey, number forcez, int forceType)
 nilapplyTorque (number forcex, number forcey, number forcez, int forceType)
 nilattachModelToBone (Representation otherModel, string bone)
 nilcontrolVehicle (float acceleration, float leftTurn, float rightTurn, float brake, float handbrake)
 nildetachModel (Representation detach)
 Object, string, InterModelgetAIMovementOnStartListener ()
 Object, string, InterModelgetAIMovementOnStopListener ()
 array{}getAllShapeNames ()
 array{}getAnimationMask (string animation)
 numbergetCharacterHeight ()
 numbergetCharacterJumpHeight ()
 numbergetCharacterMaxSlope ()
 number, number, numbergetCharacterOffset ()
 numbergetCharacterRadius ()
 numbergetCharacterRotation ()
 number, number, number, numbergetCharacterSpeed ()
 numbergetCharacterSpeedBack ()
 numbergetCharacterSpeedFront ()
 numbergetCharacterSpeedRotate ()
 numbergetCharacterSpeedStrafe ()
 numbergetCharacterStepHeight ()
 stringgetID ()
 stringgetMaterial (number submesh)
 array{}getMaterials ()
 MediaItemgetMediaItem ()
 Object, string, InterModel, boolean, stringgetMouseButtonClickedListener (number mousekey)
 Object, string, InterModel, boolean, stringgetMouseButtonClickedListener (number mousekey, boolean ctrl, boolean alt, boolean shift)
 Object, string, InterModel, boolean, stringgetMouseButtonDoubleClickedListener (number mousekey)
 Object, string, InterModel, boolean, stringgetMouseButtonDoubleClickedListener (number mousekey, boolean ctrl, boolean alt, boolean shift)
 Object, string, InterModel, boolean, stringgetMouseButtonPressedListener (number mousekey)
 Object, string, InterModel, boolean, stringgetMouseButtonPressedListener (number mousekey, boolean ctrl, boolean alt, boolean shift)
 Object, string, InterModel, boolean, stringgetMouseButtonReleasedListener (number mousekey)
 Object, string, InterModel, boolean, stringgetMouseButtonReleasedListener (number mousekey, boolean ctrl, boolean alt, boolean shift)
 Object, string, InterModel, boolean, stringgetMouseButtonTripleClickedListener (number mousekey)
 Object, string, InterModel, boolean, stringgetMouseButtonTripleClickedListener (number mousekey, boolean ctrl, boolean alt, boolean shift)
 Object, string, InterModel, boolean, stringgetMouseEnteredListener ()
 Object, string, InterModel, boolean, stringgetMouseEnteredListener (boolean ctrl, boolean alt, boolean shift)
 Object, string, InterModel, boolean, stringgetMouseLeftListener ()
 Object, string, InterModel, boolean, stringgetMouseLeftListener (boolean ctrl, boolean alt, boolean shift)
 Object, string, InterModel, boolean, stringgetMouseMovedListener ()
 Object, string, InterModel, boolean, stringgetMouseMovedListener (boolean ctrl, boolean alt, boolean shift)
 Object, string, InterModel, boolean, stringgetMouseWheelMovedListener (number mousekey)
 Object, string, InterModel, boolean, stringgetMouseWheelMovedListener (number mousekey, boolean ctrl, boolean alt, boolean shift)
 stringgetName ()
 numbergetPhysicsMass ()
 numbergetPhysicsSync ()
 numbergetPhysicsType ()
 number, number, numbergetPosition ()
 number, number, number, numbergetQuaternion ()
 Object, string, InterModelgetRayHitListener ()
 representationgetRepresentation (string name, number type)
 representationgetRepresentationContainer ()
 array{}getRepresentations ()
 number, number, numbergetRotation ()
 number, number, numbergetScale ()
 numbergetShapeHeight (string name)
 number, number, number, numbergetShapeOrientation (string name)
 stringgetShapePhysicsMaterial (string name)
 number, number, numbergetShapePosition (string name)
 numbergetShapeRadius (string name)
 number, number, numbergetShapeScale (string name)
 numbergetShapeType (string name)
 numbergetType ()
 nilgoTo (float positionX, float positionY, float positionZ)
 nilgoTo (float positionX, float positionY, float positionZ, float speed, float turnSpeed)
 booleanhasAIMovementOnStartListener ()
 booleanhasAIMovementOnStopListener ()
 booleanhasMouseButtonClickedListener (number mousekey)
 booleanhasMouseButtonClickedListener (number mousekey, boolean ctrl, boolean alt, boolean shift)
 booleanhasMouseButtonDoubleClickedListener (number mousekey)
 booleanhasMouseButtonDoubleClickedListener (number mousekey, boolean ctrl, boolean alt, boolean shift)
 booleanhasMouseButtonPressedListener (number mousekey)
 booleanhasMouseButtonPressedListener (number mousekey, boolean ctrl, boolean alt, boolean shift)
 booleanhasMouseButtonReleasedListener (number mousekey)
 booleanhasMouseButtonReleasedListener (number mousekey, boolean ctrl, boolean alt, boolean shift)
 booleanhasMouseButtonTripleClickedListener (number mousekey)
 booleanhasMouseButtonTripleClickedListener (number mousekey, boolean ctrl, boolean alt, boolean shift)
 booleanhasMouseEnteredListener ()
 booleanhasMouseEnteredListener (boolean ctrl, boolean alt, boolean shift)
 booleanhasMouseLeftListener ()
 booleanhasMouseLeftListener (boolean ctrl, boolean alt, boolean shift)
 booleanhasMouseMovedListener ()
 booleanhasMouseMovedListener (boolean ctrl, boolean alt, boolean shift)
 booleanhasMouseWheelMovedListener (number mousekey)
 booleanhasMouseWheelMovedListener (number mousekey, boolean ctrl, boolean alt, boolean shift)
 booleanhasRayHitListener ()
 booleanhasRepresentation (representation other)
 booleanhasRepresentation (string name, number type)
 booleanhasShape (string name)
 booleanisCastShadowsEnabled ()
 booleanisCharacterCollisionEnabled ()
 booleanisCharacterGravityEnabled ()
 booleanisPersistent ()
 booleanisVisible ()
 niljump ()
 niljump (float height)
 nilpauseAnimation (string anima)
 nilplayAnimation (string anima, number freq, boolean loop)
 nilplayAnimation (string anima, number frame)
 nilplaySurfaceTranslation (number freq, boolean loop, array{} positions)
 nilplayTranslation (number freq, boolean loop, array{} positions)
 nilprint ()
 nilremoveAIMovementOnStartListener ()
 nilremoveAIMovementOnStopListener ()
 nilremoveAllRepresentations ()
 nilremoveAllShapes ()
 nilremoveMouseButtonClickedListener (number mousekey)
 nilremoveMouseButtonClickedListener (number mousekey, boolean ctrl, boolean alt, boolean shift)
 nilremoveMouseButtonDoubleClickedListener (number mousekey)
 nilremoveMouseButtonDoubleClickedListener (number mousekey, boolean ctrl, boolean alt, boolean shift)
 nilremoveMouseButtonPressedListener (number mousekey)
 nilremoveMouseButtonPressedListener (number mousekey, boolean ctrl, boolean alt, boolean shift)
 nilremoveMouseButtonReleasedListener (number mousekey)
 nilremoveMouseButtonReleasedListener (number mousekey, boolean ctrl, boolean alt, boolean shift)
 nilremoveMouseButtonTripleClickedListener (number mousekey)
 nilremoveMouseButtonTripleClickedListener (number mousekey, boolean ctrl, boolean alt, boolean shift)
 nilremoveMouseEnteredListener ()
 nilremoveMouseEnteredListener (boolean ctrl, boolean alt, boolean shift)
 nilremoveMouseLeftListener ()
 nilremoveMouseLeftListener (boolean ctrl, boolean alt, boolean shift)
 nilremoveMouseMovedListener ()
 nilremoveMouseMovedListener (boolean ctrl, boolean alt, boolean shift)
 nilremoveMouseWheelMovedListener (number mousekey)
 nilremoveMouseWheelMovedListener (number mousekey, boolean ctrl, boolean alt, boolean shift)
 nilremovePhysics ()
 nilremoveRepresentation (representation other)
 nilremoveRepresentation (string name, number type)
 nilremoveShape (string name)
 nilrotateAroundVector (number angle, number x, number y, number z)
 nilrotatePitch (number angle)
 nilrotateRoll (number angle)
 nilrotateYaw (number angle)
 nilsetAIMovementOnStartListener (Object target, string name, InterModel interactionModel, boolean global, string channel)
 nilsetAIMovementOnStopListener (Object target, string name, InterModel interactionModel)
 nilsetAIMovementOnStopListener (Object target, string name, InterModel interactionModel, boolean global, string channel)
 nilsetAnimationMask (string animation, array{} n})
 nilsetCastShadowsEnabled (boolean shadows)
 nilsetCharacterCollisionEnabled (boolean collision)
 nilsetCharacterGravityEnabled (boolean collision)
 nilsetCharacterHeight (number height)
 nilsetCharacterJumpHeight (number maxSlope)
 nilsetCharacterJumpHeight (number jumpHeight)
 nilsetCharacterOffset (number offsetX, number offsetY, number offsetZ)
 nilsetCharacterRadius (number radius)
 nilsetCharacterRotation (number rotation)
 nilsetCharacterSpeed (number speedFront, number speedBack, number speedStrafe, number speedRotate)
 nilsetCharacterSpeedBack (number speedBack)
 nilsetCharacterSpeedFront (number speedFront)
 nilsetCharacterSpeedStrafe (number speedStrafe)
 nilsetCharacterStepHeight (number stepHeight)
 nilsetMaterial (string material)
 nilsetMaterial (string material, number submesh)
 nilsetMouseButtonDoubleClickedListener (number mousekey, Object target, string name, InterModel interactionModel)
 nilsetMouseButtonDoubleClickedListener (number mousekey, Object target, string name, InterModel interactionModel, boolean ctrl, boolean alt, boolean shift, boolean global, string channel)
 nilsetMouseButtonPressedListener (number mousekey, Object target, string name, InterModel interactionModel)
 nilsetMouseButtonPressedListener (number mousekey, Object target, string name, InterModel interactionModel, boolean ctrl, boolean alt, boolean shift, boolean global, string channel)
 nilsetMouseButtonReleasedListener (number mousekey, Object target, string name, InterModel interactionModel)
 nilsetMouseButtonReleasedListener (number mousekey, Object target, string name, InterModel interactionModel, boolean ctrl, boolean alt, boolean shift, boolean global, string channel)
 nilsetMouseButtonTripleClickedListener (number mousekey, Object target, string name, InterModel interactionModel)
 nilsetMouseButtonTripleClickedListener (number mousekey, Object target, string name, InterModel interactionModel, boolean ctrl, boolean alt, boolean shift, boolean global, string channel)
 nilsetMouseEnteredListener (Object target, string name, InterModel interactionModel)
 nilsetMouseEnteredListener (Object target, string name, InterModel interactionModel, boolean ctrl, boolean alt, boolean shift, boolean global, string channel)
 nilsetMouseLeftListener (Object target, string name, InterModel interactionModel)
 nilsetMouseLeftListener (Object target, string name, InterModel interactionModel, boolean ctrl, boolean alt, boolean shift, boolean global, string channel)
 nilsetMouseMovedListener (Object target, string name, InterModel interactionModel)
 nilsetMouseMovedListener (Object target, string name, InterModel interactionModel, boolean ctrl, boolean alt, boolean shift, boolean global, string channel)
 nilsetMouseWheelMovedListener (number mousekey, Object target, string name, InterModel interactionModel)
 nilsetMouseWheelMovedListener (number mousekey, Object target, string name, InterModel interactionModel, boolean ctrl, boolean alt, boolean shift, boolean global, string channel)
 nilsetPersistent (boolean persistent)
 nilsetPhysicsCharacter ()
 nilsetPhysicsCharacter (number syncType)
 nilsetPhysicsCharacter (number syncType, number mass)
 nilsetPhysicsDynamic ()
 nilsetPhysicsDynamic (number syncType)
 nilsetPhysicsDynamic (number syncType, number mass)
 nilsetPhysicsMass (number mass)
 nilsetPhysicsStatic ()
 nilsetPhysicsSync (number syncType)
 nilsetPosition (number x, number y, number z)
 nilsetQuaternion (number w, number x, number y, number z)
 nilsetRayHitListener (Object target, string name, InterModel interactionModel)
 nilsetRayHitListener (Object target, string name, InterModel interactionModel, boolean global, string channel)
 nilsetRotation (number x, number y, number z)
 nilsetScale (number x, number y, number z)
 nilsetShapeHeight (string name, number height)
 nilsetShapeOrientation (string name, number ow, number ox, number oy, number oz)
 nilsetShapePhysicsMaterial (string name, string physicsMaterial)
 nilsetShapePosition (string name, number x, number y, number z)
 nilsetShapeRadius (string name, number radius)
 nilsetShapeScale (string name, number sx, number sy, number sz)
 nilsetSurfacePosition (number x, number y, number z)
 nilsetSurfacePosition (number x, number z)
 nilsetSurfacePosition (number x, number y, number z)
 nilsetVehicleGear (unsigned int)
 nilsetVisible (boolean visible)
 nilstartMovementBackward ()
 nilstartMovementBackward (float speed)
 nilstartMovementForward ()
 nilstartMovementForward (float speed)
 nilstartMovementRotateLeft ()
 nilstartMovementRotateLeft (float speed)
 nilstartMovementRotateRight ()
 nilstartMovementRotateRight (float speed)
 nilstartMovementStrafeLeft ()
 nilstartMovementStrafeLeft (float speed)
 nilstartMovementStrafeRight ()
 nilstartMovementStrafeRight (float speed)
 nilstop ()
 nilstopAnimation (string anima)
 nilstopMovementBackward ()
 nilstopMovementForward ()
 nilstopMovementRotateLeft ()
 nilstopMovementRotateRight ()
 nilstopMovementStrafeLeft ()
 nilstopMovementStrafeRight ()
 nilstopTranslation ()
 nilturnTo (float angle)
 nilturnTo (float angle, float turnSpeed)

Method Detail

addRepresentation

nil addRepresentation (representation toAdd)
Adds another representation to this representation.

Parameters:
representation toAdd - Representation to be added to this representation.


addShapeBox

nil addShapeBox (string name)
Adds a shape to the model with the specified name. Physics material, relative position, relative orientation and scale will be set to the default values.

Parameters:
string name - Name of the shape.


addShapeBox

nil addShapeBox (string name, string material)
Adds a shape to the model with the specified name and physics material. Relative position, relative orientation and scale will be set to the default values.

Parameters:
string name - Name of the shape.
string material - Physics material of the box shape.


addShapeBox

nil addShapeBox (string name, string material, number x, number y, number z, number dw, number dx, number dy, number dz, number sx, number sy, number sz)
Adds a shape to the model with the specified name, physics material, relative position, relative orientation and scale.

Parameters:
string name - Name of the shape.
string material - Physics material of the box shape.
number x - X coordinate for the relative position.
number y - Y coordinate for the relative position.
number z - Z coordinate for the relative position.
number dw - W angle for the relative orientation.
number dx - X coordinate for the relative orientation.
number dy - Y coordinate for the relative orientation.
number dz - Z coordinate for the relative orientation.
number sx - X coordinate for the scale.
number sy - Y coordinate for the scale.
number sz - Z coordinate for the scale.


addShapeBox

nil addShapeBox (string name, number x, number y, number z, number dw, number dx, number dy, number dz, number sx, number sy, number sz)
Adds a sensor shape to the model with the specified name, physics material, relative position, relative orientation and scale.

Parameters:
string name - Name of the shape.
number x - X coordinate for the relative position.
number y - Y coordinate for the relative position.
number z - Z coordinate for the relative position.
number dw - W angle for the relative orientation.
number dx - X coordinate for the relative orientation.
number dy - Y coordinate for the relative orientation.
number dz - Z coordinate for the relative orientation.
number sx - X coordinate for the scale.
number sy - Y coordinate for the scale.
number sz - Z coordinate for the scale.


addShapeCapsule

nil addShapeCapsule (string name)
Adds a shape to the model with the specified name. Physics material, relative position, relative orientation, radius and height scaling will be set to the default values.

Parameters:
string name - Name of the shape.


addShapeCapsule

nil addShapeCapsule (string name, string material)
Adds a shape to the model with the specified name and physics material. Relative position, relative orientation, radius and height scaling will be set to the default values.

Parameters:
string name - Name of the shape.
string material - Physics material of the capsule shape.


addShapeCapsule

nil addShapeCapsule (string name, string material, number x, number y, number z, number dw, number dx, number dy, number dz, number radius, number height)
Adds a shape to the model with the specified name, physics material, relative position, relative orientation, radius and height.

Parameters:
string name - Name of the shape.
string material - Physics material of the box shape.
number x - X coordinate for the relative position.
number y - Y coordinate for the relative position.
number z - Z coordinate for the relative position.
number dw - W angle for the relative orientation.
number dx - X coordinate for the relative orientation.
number dy - Y coordinate for the relative orientation.
number dz - Z coordinate for the relative orientation.
number radius - Radius scaling of the hemispheres of the shape.
number height - Distance scaling between the centers of the hemispheres of the shape.


addShapeSensorBox

nil addShapeSensorBox (string name)
Adds a sensor shape to the model with the specified name. relative position, relative orientation and scale will be set to the default values.

Parameters:
string name - Name of the shape.


addShapeSensorCapsule

nil addShapeSensorCapsule (string name)
Adds a sensor shape to the model with the specified name. relative position, relative orientation, radius and height scaling will be set to the default values.

Parameters:
string name - Name of the shape.


addShapeSensorCapsule

nil addShapeSensorCapsule (string name, number x, number y, number z, number dw, number dx, number dy, number dz, number radius, number height)
Adds a sensor shape to the model with the specified name, physics material, relative position, relative orientation, radius and height.

Parameters:
string name - Name of the shape.
number x - X coordinate for the relative position.
number y - Y coordinate for the relative position.
number z - Z coordinate for the relative position.
number dw - W angle for the relative orientation.
number dx - X coordinate for the relative orientation.
number dy - Y coordinate for the relative orientation.
number dz - Z coordinate for the relative orientation.
number radius - Radius scaling of the hemispheres of the shape.
number height - Distance scaling between the centers of the hemispheres of the shape.


addShapeSensorSphere

nil addShapeSensorSphere (string name)
Adds a sensor shape to the model with the specified name. relative position and radius scaling will be set to the default values.

Parameters:
string name - Name of the shape.


addShapeSphere

nil addShapeSphere (string name)
Adds a shape to the model with the specified name. Physics material, relative position and radius scaling will be set to the default values.

Parameters:
string name - Name of the shape.


addShapeSphere

nil addShapeSphere (string name, string material)
Adds a shape to the model with the specified name and physics material. Relative position and radius scaling will be set to the default values.

Parameters:
string name - Name of the shape.
string material - Physics material of the sphere shape.


addShapeSphere

nil addShapeSphere (string name, string material, number x, number y, number z, number radius)
Adds a shape to the model with the specified name, physics material, relative position and radius.

Parameters:
string name - Name of the shape.
string material - Physics material of the sphere shape.
number x - X coordinate for the relative position.
number y - Y coordinate for the relative position.
number z - Z coordinate for the relative position.
number radius - Radius scaling of the shape.


addShapeSphere

nil addShapeSphere (string name, number x, number y, number z, number radius)
Adds a sensor shape to the model with the specified name, relative position and radius.

Parameters:
string name - Name of the shape.
number x - X coordinate for the relative position.
number y - Y coordinate for the relative position.
number z - Z coordinate for the relative position.
number radius - Radius scaling of the shape.


addShapeTriangleMesh

nil addShapeTriangleMesh (string name)
Adds a shape to the model with the specified name. The shape will have the exact form of the mesh. The physics material will the set to the default value.

Parameters:
string name - Name of the shape.


addShapeTriangleMesh

nil addShapeTriangleMesh (string name, string material)
Adds a shape to the model with the specified name and physics material. The shape will have the exact form of the mesh.

Parameters:
string name - Name of the shape.
string material - Physics material of the triangle mesh shape.


applyForce

nil applyForce (number forcex, number forcey, number forcez, int forceType)
Applies a force vector to the body of the object

Parameters:
number forcex - amount of force to be applied to the object along the X axis.
number forcey - amount of force to be applied to the object along the Y axis.
number forcez - amount of force to be applied to the object along the Z axis.
int forceType - type of force to be applied to the object


applyForceAtLocalPosition

nil applyForceAtLocalPosition (number forcex, number forcey, number forcez, number positionx, number positiony, number positionz, int forceType)
Applies a force vector to the body of the object at the given local point

Parameters:
number forcex - amount of force to be applied to the object along the X axis.
number forcey - amount of force to be applied to the object along the Y axis.
number forcez - amount of force to be applied to the object along the Z axis.
number positionx - X coordinate of the point where the force will be applied.
number positiony - Y coordinate of the point where the force will be applied.
number positionz - Z coordinate of the point where the force will be applied.
int forceType - type of force to be applied to the object


applyForceAtPosition

nil applyForceAtPosition (number forcex, number forcey, number forcez, number positionx, number positiony, number positionz, int forceType)
Applies a force vector to the body of the object at the given point

Parameters:
number forcex - amount of force to be applied to the object along the X axis.
number forcey - amount of force to be applied to the object along the Y axis.
number forcez - amount of force to be applied to the object along the Z axis.
number positionx - X coordinate of the point where the force will be applied.
number positiony - Y coordinate of the point where the force will be applied.
number positionz - Z coordinate of the point where the force will be applied.
int forceType - type of force to be applied to the object


applyLocalForce

nil applyLocalForce (number forcex, number forcey, number forcez, int forceType)
Applies a force vector to the body of the object in it's local axis

Parameters:
number forcex - amount of force to be applied to the object along the X axis.
number forcey - amount of force to be applied to the object along the Y axis.
number forcez - amount of force to be applied to the object along the Z axis.
int forceType - type of force to be applied to the object


applyLocalForceAtLocalPosition

nil applyLocalForceAtLocalPosition (number forcex, number forcey, number forcez, number positionx, number positiony, number positionz, int forceType)
Applies a force vector to the body of the object in it's local axis at the given local point

Parameters:
number forcex - amount of force to be applied to the object along the X axis.
number forcey - amount of force to be applied to the object along the Y axis.
number forcez - amount of force to be applied to the object along the Z axis.
number positionx - X coordinate of the point where the force will be applied.
number positiony - Y coordinate of the point where the force will be applied.
number positionz - Z coordinate of the point where the force will be applied.
int forceType - type of force to be applied to the object


applyLocalForceAtPosition

nil applyLocalForceAtPosition (number forcex, number forcey, number forcez, number positionx, number positiony, number positionz, int forceType)
Applies a force vector to the body of the object in it's local axis at the given point

Parameters:
number forcex - amount of force to be applied to the object along the X axis.
number forcey - amount of force to be applied to the object along the Y axis.
number forcez - amount of force to be applied to the object along the Z axis.
number positionx - X coordinate of the point where the force will be applied.
number positiony - Y coordinate of the point where the force will be applied.
number positionz - Z coordinate of the point where the force will be applied.
int forceType - type of force to be applied to the object


applyLocalTorque

nil applyLocalTorque (number forcex, number forcey, number forcez, int forceType)
Applies a torque force vector to the body of the object in it's local axis

Parameters:
number forcex - amount of torque to be applied to the object along the X axis.
number forcey - amount of torque to be applied to the object along the Y axis.
number forcez - amount of torque to be applied to the object along the Z axis.
int forceType - type of torque to be applied to the object


applyTorque

nil applyTorque (number forcex, number forcey, number forcez, int forceType)
Applies a torque force vector to the body of the object in it's local axis

Parameters:
number forcex - amount of torque to be applied to the object along the X axis.
number forcey - amount of torque to be applied to the object along the Y axis.
number forcez - amount of torque to be applied to the object along the Z axis.
int forceType - type of torque to be applied to the object


attachModelToBone

nil attachModelToBone (Representation otherModel, string bone)
Attaches another model to a bone of this model.

Parameters:
Representation otherModel - The model that will be attached to the bone.
string bone - Name of the bone to attach the model to.


controlVehicle

nil controlVehicle (float acceleration, float leftTurn, float rightTurn, float brake, float handbrake)
Moves a vehicle.

Parameters:
float acceleration - Amount of acceleration to apply on the vehicle
float leftTurn - Amount of left turning to apply on the vehicle.
float rightTurn - Amount of left turning to apply on the vehicle.
float brake - Amount of brake to apply on the vehicle.
float handbrake - Amount of handbrake to apply on the vehicle.


detachModel

nil detachModel (Representation detach)
Detaches a model from this model.

Parameters:
Representation detach - The model that will be detached from this model.


getAIMovementOnStartListener

Object, string, InterModel getAIMovementOnStartListener ()
Returns the listener information of the 'pathfind started' event of the model.

Returns:
Object - The object that contains the interaction that will be executed.
string - Name of the interaction.
InterModel - Arguments of the interaction that will be executed when this listener is activated.


getAIMovementOnStopListener

Object, string, InterModel getAIMovementOnStopListener ()
Returns the listener information of the 'pathfind stopped' event of the model.

Returns:
Object - The object that contains the interaction that will be executed.
string - Name of the interaction.
InterModel - Arguments of the interaction that will be executed when this listener is activated.


getAllShapeNames

array{} getAllShapeNames ()
Returns an array containing the shape names of the model.

Returns:
array{} - Array containing the shape names of the model.


getAnimationMask

array{} getAnimationMask (string animation)
Returns the bone weights from a given animation

Parameters:
string animation - name.

Returns:
array{} - n} weights (between 0 and 1) for the n bones of the model.


getCharacterHeight

number getCharacterHeight ()
Gets the height of the Model character shape

Returns:
number - Height of the Model character shape


getCharacterJumpHeight

number getCharacterJumpHeight ()
Gets the jump height of the Model character

Returns:
number - Jump height of the Model character


getCharacterMaxSlope

number getCharacterMaxSlope ()
Gets the maximum slope that the Model character can climb

Returns:
number - Maximum slope that the Model character can climb


getCharacterOffset

number, number, number getCharacterOffset ()
Gets the Model character shape position offset

Returns:
number - Offset X coordinate.
number - Offset Y coordinate.
number - Offset Z coordinate.


getCharacterRadius

number getCharacterRadius ()
Gets the radius of the Model character shape

Returns:
number - Radius of the Model character shape


getCharacterRotation

number getCharacterRotation ()
Gets the rotation of the Model character shape

Returns:
number - Rotation of the Model character shape


getCharacterSpeed

number, number, number, number getCharacterSpeed ()
Gets the movement speed of the Model character

Returns:
number - Forward movement speed of the Model character
number - Backward movement speed of the Model character
number - Strafe movement speed of the Model character
number - Rotate movement speed of the Model character


getCharacterSpeedBack

number getCharacterSpeedBack ()
Gets the backward movement speed of the Model character

Returns:
number - Bacward movement speed of the Model character


getCharacterSpeedFront

number getCharacterSpeedFront ()
Gets the forward movement speed of the Model character

Returns:
number - Forward movement speed of the Model character


getCharacterSpeedRotate

number getCharacterSpeedRotate ()
Gets the rotate movement speed of the Model character

Returns:
number - Rotate movement speed of the Model character


getCharacterSpeedStrafe

number getCharacterSpeedStrafe ()
Gets the strafe movement speed of the Model character

Returns:
number - Strafe movement speed of the Model character


getCharacterStepHeight

number getCharacterStepHeight ()
Gets the step height of the Model character

Returns:
number - Step height of the Model character


getID

string getID ()
Returns the representation ID.

Returns:
string - Representation ID.


getMaterial

string getMaterial (number submesh)
Returns the Material name applied to a given sub-mesh.

Parameters:
number submesh - The number of the sub-mesh.

Returns:
string - The Material name applied to the sub-mesh.


getMaterials

array{} getMaterials ()
Returns the Material names applied to each sub-mesh.

Returns:
array{} - An array containing tupples of sub-mesh numbers and the Material name applied to each sub-mesh.


getMediaItem

MediaItem getMediaItem ()
Returns the Media Item corresponding to the Model.

Returns:
MediaItem - The Media Item corresponding to the Model.


getMouseButtonClickedListener

Object, string, InterModel, boolean, string getMouseButtonClickedListener (number mousekey)
Returns the 'mouse button clicked' listener of the Model.

Parameters:
number mousekey - Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.

Returns:
Object - The object that contains the interaction that will be executed.
string - Name of the interaction.
InterModel - Arguments of the interaction that will be executed when this listener is activated.
boolean - 'True' if this listener is executed globally, 'false' if it is executed only locally.
string - The channel of the listener.


getMouseButtonClickedListener

Object, string, InterModel, boolean, string getMouseButtonClickedListener (number mousekey, boolean ctrl, boolean alt, boolean shift)
Returns the 'mouse button clicked' listener of the Model.

Parameters:
number mousekey - Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.
boolean ctrl - Whether the key combination includes the 'ctrl' modifier key.
boolean alt - Whether the key combination includes the 'alt' modifier key.
boolean shift - Whether the key combination includes the 'shift' modifier key.

Returns:
Object - The object that contains the interaction that will be executed.
string - Name of the interaction.
InterModel - Arguments of the interaction that will be executed when this listener is activated.
boolean - 'True' if this listener is executed globally, 'false' if it is executed only locally.
string - The channel of the listener.


getMouseButtonDoubleClickedListener

Object, string, InterModel, boolean, string getMouseButtonDoubleClickedListener (number mousekey)
Returns the 'mouse button double clicked' listener of the Model.

Parameters:
number mousekey - Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.

Returns:
Object - The object that contains the interaction that will be executed.
string - Name of the interaction.
InterModel - Arguments of the interaction that will be executed when this listener is activated.
boolean - 'True' if this listener is executed globally, 'false' if it is executed only locally.
string - The channel of the listener.


getMouseButtonDoubleClickedListener

Object, string, InterModel, boolean, string getMouseButtonDoubleClickedListener (number mousekey, boolean ctrl, boolean alt, boolean shift)
Returns the 'mouse button double clicked' listener of the Model.

Parameters:
number mousekey - Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.
boolean ctrl - Whether the key combination includes the 'ctrl' modifier key.
boolean alt - Whether the key combination includes the 'alt' modifier key.
boolean shift - Whether the key combination includes the 'shift' modifier key.

Returns:
Object - The object that contains the interaction that will be executed.
string - Name of the interaction.
InterModel - Arguments of the interaction that will be executed when this listener is activated.
boolean - 'True' if this listener is executed globally, 'false' if it is executed only locally.
string - The channel of the listener.


getMouseButtonPressedListener

Object, string, InterModel, boolean, string getMouseButtonPressedListener (number mousekey)
Returns the 'mouse button pressed' listener of the Model.

Parameters:
number mousekey - Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.

Returns:
Object - The object that contains the interaction that will be executed.
string - Name of the interaction.
InterModel - Arguments of the interaction that will be executed when this listener is activated.
boolean - 'True' if this listener is executed globally, 'false' if it is executed only locally.
string - The channel of the listener.


getMouseButtonPressedListener

Object, string, InterModel, boolean, string getMouseButtonPressedListener (number mousekey, boolean ctrl, boolean alt, boolean shift)
Returns the 'mouse button pressed' listener of the Model.

Parameters:
number mousekey - Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.
boolean ctrl - Whether the key combination includes the 'ctrl' modifier key.
boolean alt - Whether the key combination includes the 'alt' modifier key.
boolean shift - Whether the key combination includes the 'shift' modifier key.

Returns:
Object - The object that contains the interaction that will be executed.
string - Name of the interaction.
InterModel - Arguments of the interaction that will be executed when this listener is activated.
boolean - 'True' if this listener is executed globally, 'false' if it is executed only locally.
string - The channel of the listener.


getMouseButtonReleasedListener

Object, string, InterModel, boolean, string getMouseButtonReleasedListener (number mousekey)
Returns the 'mouse button released' listener of the Model.

Parameters:
number mousekey - Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.

Returns:
Object - The object that contains the interaction that will be executed.
string - Name of the interaction.
InterModel - Arguments of the interaction that will be executed when this listener is activated.
boolean - 'True' if this listener is executed globally, 'false' if it is executed only locally.
string - The channel of the listener.


getMouseButtonReleasedListener

Object, string, InterModel, boolean, string getMouseButtonReleasedListener (number mousekey, boolean ctrl, boolean alt, boolean shift)
Returns the 'mouse button released' listener of the Model.

Parameters:
number mousekey - Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.
boolean ctrl - Whether the key combination includes the 'ctrl' modifier key.
boolean alt - Whether the key combination includes the 'alt' modifier key.
boolean shift - Whether the key combination includes the 'shift' modifier key.

Returns:
Object - The object that contains the interaction that will be executed.
string - Name of the interaction.
InterModel - Arguments of the interaction that will be executed when this listener is activated.
boolean - 'True' if this listener is executed globally, 'false' if it is executed only locally.
string - The channel of the listener.


getMouseButtonTripleClickedListener

Object, string, InterModel, boolean, string getMouseButtonTripleClickedListener (number mousekey)
Returns the 'mouse button triple clicked' listener of the Model.

Parameters:
number mousekey - Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.

Returns:
Object - The object that contains the interaction that will be executed.
string - Name of the interaction.
InterModel - Arguments of the interaction that will be executed when this listener is activated.
boolean - 'True' if this listener is executed globally, 'false' if it is executed only locally.
string - The channel of the listener.


getMouseButtonTripleClickedListener

Object, string, InterModel, boolean, string getMouseButtonTripleClickedListener (number mousekey, boolean ctrl, boolean alt, boolean shift)
Returns the 'mouse button triple clicked' listener of the Model.

Parameters:
number mousekey - Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.
boolean ctrl - Whether the key combination includes the 'ctrl' modifier key.
boolean alt - Whether the key combination includes the 'alt' modifier key.
boolean shift - Whether the key combination includes the 'shift' modifier key.

Returns:
Object - The object that contains the interaction that will be executed.
string - Name of the interaction.
InterModel - Arguments of the interaction that will be executed when this listener is activated.
boolean - 'True' if this listener is executed globally, 'false' if it is executed only locally.
string - The channel of the listener.


getMouseEnteredListener

Object, string, InterModel, boolean, string getMouseEnteredListener ()
Returns the 'mouse entered' listener of the Model.

Returns:
Object - The object that contains the interaction that will be executed.
string - Name of the interaction.
InterModel - Arguments of the interaction that will be executed when this listener is activated.
boolean - 'True' if this listener is executed globally, 'false' if it is executed only locally.
string - The channel of the listener.


getMouseEnteredListener

Object, string, InterModel, boolean, string getMouseEnteredListener (boolean ctrl, boolean alt, boolean shift)
Returns the 'mouse entered' listener of the Model.

Parameters:
boolean ctrl - Whether the key combination includes the 'ctrl' modifier key.
boolean alt - Whether the key combination includes the 'alt' modifier key.
boolean shift - Whether the key combination includes the 'shift' modifier key.

Returns:
Object - The object that contains the interaction that will be executed.
string - Name of the interaction.
InterModel - Arguments of the interaction that will be executed when this listener is activated.
boolean - 'True' if this listener is executed globally, 'false' if it is executed only locally.
string - The channel of the listener.


getMouseLeftListener

Object, string, InterModel, boolean, string getMouseLeftListener ()
Returns the 'mouse left' listener of the Model.

Returns:
Object - The object that contains the interaction that will be executed.
string - Name of the interaction.
InterModel - Arguments of the interaction that will be executed when this listener is activated.
boolean - 'True' if this listener is executed globally, 'false' if it is executed only locally.
string - The channel of the listener.


getMouseLeftListener

Object, string, InterModel, boolean, string getMouseLeftListener (boolean ctrl, boolean alt, boolean shift)
Returns the 'mouse left' listener of the Model.

Parameters:
boolean ctrl - Whether the key combination includes the 'ctrl' modifier key.
boolean alt - Whether the key combination includes the 'alt' modifier key.
boolean shift - Whether the key combination includes the 'shift' modifier key.

Returns:
Object - The object that contains the interaction that will be executed.
string - Name of the interaction.
InterModel - Arguments of the interaction that will be executed when this listener is activated.
boolean - 'True' if this listener is executed globally, 'false' if it is executed only locally.
string - The channel of the listener.


getMouseMovedListener

Object, string, InterModel, boolean, string getMouseMovedListener ()
Returns the 'mouse moved' listener of the Model.

Returns:
Object - The object that contains the interaction that will be executed.
string - Name of the interaction.
InterModel - Arguments of the interaction that will be executed when this listener is activated.
boolean - 'True' if this listener is executed globally, 'false' if it is executed only locally.
string - The channel of the listener.


getMouseMovedListener

Object, string, InterModel, boolean, string getMouseMovedListener (boolean ctrl, boolean alt, boolean shift)
Returns the 'mouse moved' listener of the Model.

Parameters:
boolean ctrl - Whether the key combination includes the 'ctrl' modifier key.
boolean alt - Whether the key combination includes the 'alt' modifier key.
boolean shift - Whether the key combination includes the 'shift' modifier key.

Returns:
Object - The object that contains the interaction that will be executed.
string - Name of the interaction.
InterModel - Arguments of the interaction that will be executed when this listener is activated.
boolean - 'True' if this listener is executed globally, 'false' if it is executed only locally.
string - The channel of the listener.


getMouseWheelMovedListener

Object, string, InterModel, boolean, string getMouseWheelMovedListener (number mousekey)
Returns the 'mouse wheel moved' listener of the Model.

Parameters:
number mousekey - Mouse wheel movement that will trigger the event: MOUSE_WHEEL_DOWN or MOUSE_WHEEL_DOWN.

Returns:
Object - The object that contains the interaction that will be executed.
string - Name of the interaction.
InterModel - Arguments of the interaction that will be executed when this listener is activated.
boolean - 'True' if this listener is executed globally, 'false' if it is executed only locally.
string - The channel of the listener.


getMouseWheelMovedListener

Object, string, InterModel, boolean, string getMouseWheelMovedListener (number mousekey, boolean ctrl, boolean alt, boolean shift)
Returns the 'mouse wheel moved' listener of the Model.

Parameters:
number mousekey - Mouse wheel movement that will trigger the event: MOUSE_WHEEL_DOWN or MOUSE_WHEEL_DOWN.
boolean ctrl - Whether the key combination includes the 'ctrl' modifier key.
boolean alt - Whether the key combination includes the 'alt' modifier key.
boolean shift - Whether the key combination includes the 'shift' modifier key.

Returns:
Object - The object that contains the interaction that will be executed.
string - Name of the interaction.
InterModel - Arguments of the interaction that will be executed when this listener is activated.
boolean - 'True' if this listener is executed globally, 'false' if it is executed only locally.
string - The channel of the listener.


getName

string getName ()
Returns the name of the Model

Returns:
string - The name of the Model


getPhysicsMass

number getPhysicsMass ()
Returns the mass of the physics object currently applied to the Model.

Returns:
number - Mass of the object.


getPhysicsSync

number getPhysicsSync ()
Returns the synchronization type of the physics object currently applied to the Model.

Returns:
number - Type of physics synchronization: PT_SYNC_NONE, PT_SYNC_LOCAL or PT_SYNC_GLOBAL.


getPhysicsType

number getPhysicsType ()
Returns the type of physics currently applied to the Model.

Returns:
number - The type of physics currently applied to the Model: 'PT_PHYSICS_NONE', 'PT_PHYSICS_STATIC', 'PT_PHYSICS_AUTO', 'PT_PHYSICS_HUMANOID' or 'PT_PHYSICS_DYNAMIC'.


getPosition

number, number, number getPosition ()
Returns the position of the Model.

Returns:
number - The position of the Model in the X coordinate.
number - The position of the Model in the Y coordinate.
number - The position of the Model in the Z coordinate.


getQuaternion

number, number, number, number getQuaternion ()
Returns the rotation of the Model in quaternion coordinates.

Returns:
number - The rotation of the Model in the w coordinate.
number - The rotation of the Model in the X coordinate.
number - The rotation of the Model in the Y coordinate.
number - The rotation of the Model in the Z coordinate.


getRayHitListener

Object, string, InterModel getRayHitListener ()
Returns the listener information of the 'ray hit' event of the model.

Returns:
Object - The object that contains the interaction that will be executed.
string - Name of the interaction.
InterModel - Arguments of the interaction that will be executed when this listener is activated.


getRepresentation

representation getRepresentation (string name, number type)
Returns the contained representation with the specified name and type.

Parameters:
string name - The name of the contained representation.
number type - The type of the contained representation.

Returns:
representation - The contained representation with the specified name and type.


getRepresentationContainer

representation getRepresentationContainer ()
Returns the representation that contains this representation.

Returns:
representation - The representation that contains this representation.


getRepresentations

array{} getRepresentations ()
Returns an array of the contained representations.

Returns:
array{} - Array of the contained representations.


getRotation

number, number, number getRotation ()
Returns the rotation of the Model

Returns:
number - The rotation of the Model in the X coordinate.
number - The rotation of the Model in the Y coordinate.
number - The rotation of the Model in the Z coordinate.


getScale

number, number, number getScale ()
Returns the scale of the Model.

Returns:
number - The scale ratio of the Model in the X coordinate.
number - The scale ratio of the Model in the Y coordinate.
number - The scale ratio of the Model in the Z coordinate.


getShapeHeight

number getShapeHeight (string name)
Gets the height of the shape.

Parameters:
string name - Name of the shape.

Returns:
number - height Height of the shape.


getShapeOrientation

number, number, number, number getShapeOrientation (string name)
Gets the orientation of the shape.

Parameters:
string name - Name of the shape.

Returns:
number - ow W angle of the shape orientation.
number - ox X axis of the shape orientation.
number - oy Y axis of the shape orientation.
number - oz Z axis of the shape orientation.


getShapePhysicsMaterial

string getShapePhysicsMaterial (string name)
Gets the physics material of the shape.

Parameters:
string name - Name of the shape.

Returns:
string - physicsMaterial Physics material of the shape.


getShapePosition

number, number, number getShapePosition (string name)
Gets the relative position of the shape.

Parameters:
string name - Name of the shape.

Returns:
number - x X coordinate for the relative position.
number - y Y coordinate for the relative position.
number - z Z coordinate for the relative position.


getShapeRadius

number getShapeRadius (string name)
Gets the radius of the shape.

Parameters:
string name - Name of the shape.

Returns:
number - radius Radius of the shape.


getShapeScale

number, number, number getShapeScale (string name)
Gets the scale of the shape.

Parameters:
string name - Name of the shape.

Returns:
number - sx X coordinate for the scale.
number - sy Y coordinate for the scale.
number - sz Z coordinate for the scale.


getShapeType

number getShapeType (string name)
Returns the type of the shape.

Parameters:
string name - Name of the shape.

Returns:
number - Type of the shape: ST_BOX, ST_SPHERE, ST_CAPSULE or ST_TRIANGLE_MESH.


getType

number getType ()
Returns the representation type:
2 - MODEL,
3 - LIGHT,
4 - EFFECT,
5 - PLANE,
6 - WATER,
7 - SOUND,
8 - TERRAIN_MESH_DECAL,
9 - TERRAIN_HIGHLIGHTING_DECAL,
10 - BILLBOARD,
11 - OVERLAY

Returns:
number - The type of the representation.


goTo

nil goTo (float positionX, float positionY, float positionZ)
Starts character AI movement towards the specified position.

Parameters:
float positionX - Position to which the character will walk towards
float positionY - Position to which the character will walk towards
float positionZ - Position to which the character will walk towards


goTo

nil goTo (float positionX, float positionY, float positionZ, float speed, float turnSpeed)
Starts character AI movement towards the specified position.

Parameters:
float positionX - Position to which the character will walk towards
float positionY - Position to which the character will walk towards
float positionZ - Position to which the character will walk towards
float speed - The speed at which the Model will move.
float turnSpeed - The speed at which the Model will turn.


hasAIMovementOnStartListener

boolean hasAIMovementOnStartListener ()
Returns 'true' if the model has a 'pathfind started' Listener, otherwise 'false'.

Returns:
boolean - 'True' if the model has a 'pathfind started' Listener, otherwise 'false'.


hasAIMovementOnStopListener

boolean hasAIMovementOnStopListener ()
Returns 'true' if the model has a 'pathfind stopped' Listener, otherwise 'false'.

Returns:
boolean - 'True' if the model has a 'pathfind stopped' Listener, otherwise 'false'.


hasMouseButtonClickedListener

boolean hasMouseButtonClickedListener (number mousekey)
Returns 'true' if the Model has a listener for the 'button clicked' event, otherwise 'false'.

Parameters:
number mousekey - Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.

Returns:
boolean - 'True' if the Model has a listener for the 'button clicked' event, otherwise 'false'.


hasMouseButtonClickedListener

boolean hasMouseButtonClickedListener (number mousekey, boolean ctrl, boolean alt, boolean shift)
Returns 'true' if the Model has a listener for the 'button clicked' event, otherwise 'false'.

Parameters:
number mousekey - Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.
boolean ctrl - Whether the key combination includes the 'ctrl' modifier key.
boolean alt - Whether the key combination includes the 'alt' modifier key.
boolean shift - Whether the key combination includes the 'shift' modifier key.

Returns:
boolean - 'True' if the Model has a listener for the 'button clicked' event, otherwise 'false'.


hasMouseButtonDoubleClickedListener

boolean hasMouseButtonDoubleClickedListener (number mousekey)
Returns 'true' if the Model has a listener for the 'button double clicked' event, otherwise 'false'.

Parameters:
number mousekey - Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.

Returns:
boolean - 'True' if the Model has a listener for the 'button double clicked' event, otherwise 'false'.


hasMouseButtonDoubleClickedListener

boolean hasMouseButtonDoubleClickedListener (number mousekey, boolean ctrl, boolean alt, boolean shift)
Returns 'true' if the Model has a listener for the 'button double clicked' event, otherwise 'false'.

Parameters:
number mousekey - Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.
boolean ctrl - Whether the key combination includes the 'ctrl' modifier key.
boolean alt - Whether the key combination includes the 'alt' modifier key.
boolean shift - Whether the key combination includes the 'shift' modifier key.

Returns:
boolean - 'True' if the Model has a listener for the 'button double clicked' event, otherwise 'false'.


hasMouseButtonPressedListener

boolean hasMouseButtonPressedListener (number mousekey)
Returns 'true' if the Model has a listener for the 'button pressed' event, otherwise 'false'.

Parameters:
number mousekey - Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.

Returns:
boolean - 'True' if the Model has a listener for the 'button pressed' event, otherwise 'false'.


hasMouseButtonPressedListener

boolean hasMouseButtonPressedListener (number mousekey, boolean ctrl, boolean alt, boolean shift)
Returns 'true' if the Model has a listener for the 'button pressed' event, otherwise 'false'.

Parameters:
number mousekey - Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.
boolean ctrl - Whether the key combination includes the 'ctrl' modifier key.
boolean alt - Whether the key combination includes the 'alt' modifier key.
boolean shift - Whether the key combination includes the 'shift' modifier key.

Returns:
boolean - 'True' if the Model has a listener for the 'button pressed' event, otherwise 'false'.


hasMouseButtonReleasedListener

boolean hasMouseButtonReleasedListener (number mousekey)
Returns 'true' if the Model has a listener for the 'button released' event, otherwise 'false'.

Parameters:
number mousekey - Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.

Returns:
boolean - 'True' if the Model has a listener for the 'button released' event, otherwise 'false'.


hasMouseButtonReleasedListener

boolean hasMouseButtonReleasedListener (number mousekey, boolean ctrl, boolean alt, boolean shift)
Returns 'true' if the Model has a listener for the 'button released' event, otherwise 'false'.

Parameters:
number mousekey - Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.
boolean ctrl - Whether the key combination includes the 'ctrl' modifier key.
boolean alt - Whether the key combination includes the 'alt' modifier key.
boolean shift - Whether the key combination includes the 'shift' modifier key.

Returns:
boolean - 'True' if the Model has a listener for the 'button released' event, otherwise 'false'.


hasMouseButtonTripleClickedListener

boolean hasMouseButtonTripleClickedListener (number mousekey)
Returns 'true' if the Model has a listener for the 'button triple clicked' event, otherwise 'false'.

Parameters:
number mousekey - Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.

Returns:
boolean - 'True' if the Model has a listener for the 'button triple clicked' event, otherwise 'false'.


hasMouseButtonTripleClickedListener

boolean hasMouseButtonTripleClickedListener (number mousekey, boolean ctrl, boolean alt, boolean shift)
Returns 'true' if the Model has a listener for the 'button triple clicked' event, otherwise 'false'.

Parameters:
number mousekey - Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.
boolean ctrl - Whether the key combination includes the 'ctrl' modifier key.
boolean alt - Whether the key combination includes the 'alt' modifier key.
boolean shift - Whether the key combination includes the 'shift' modifier key.

Returns:
boolean - 'True' if the Model has a listener for the 'button triple clicked' event, otherwise 'false'.


hasMouseEnteredListener

boolean hasMouseEnteredListener ()
Returns 'true' if the Model has a listener for the 'mouse entered' event, otherwise 'false'.

Returns:
boolean - 'True' if the Model has a listener for the 'mouse entered' event, otherwise 'false'.


hasMouseEnteredListener

boolean hasMouseEnteredListener (boolean ctrl, boolean alt, boolean shift)
Returns 'true' if the Model has a listener for the 'mouse entered' event, otherwise 'false'.

Parameters:
boolean ctrl - Whether the key combination includes the 'ctrl' modifier key.
boolean alt - Whether the key combination includes the 'alt' modifier key.
boolean shift - Whether the key combination includes the 'shift' modifier key.

Returns:
boolean - 'True' if the Model has a listener for the 'mouse entered' event, otherwise 'false'.


hasMouseLeftListener

boolean hasMouseLeftListener ()
Returns 'true' if the Model has a listener for the 'mouse left' event, otherwise 'false'.

Returns:
boolean - 'True' if the Model has a listener for the 'mouse left' event, otherwise 'false'.


hasMouseLeftListener

boolean hasMouseLeftListener (boolean ctrl, boolean alt, boolean shift)
Returns 'true' if the Model has a listener for the 'mouse left' event, otherwise 'false'.

Parameters:
boolean ctrl - Whether the key combination includes the 'ctrl' modifier key.
boolean alt - Whether the key combination includes the 'alt' modifier key.
boolean shift - Whether the key combination includes the 'shift' modifier key.

Returns:
boolean - 'True' if the Model has a listener for the 'mouse left' event, otherwise 'false'.


hasMouseMovedListener

boolean hasMouseMovedListener ()
Returns 'true' if the Model has a listener for the 'mouse moved' event, otherwise 'false'.

Returns:
boolean - 'True' if the Model has a listener for the 'mouse moved' event, otherwise 'false'.


hasMouseMovedListener

boolean hasMouseMovedListener (boolean ctrl, boolean alt, boolean shift)
Returns 'true' if the Model has a listener for the 'mouse moved' event, otherwise 'false'.

Parameters:
boolean ctrl - Whether the key combination includes the 'ctrl' modifier key.
boolean alt - Whether the key combination includes the 'alt' modifier key.
boolean shift - Whether the key combination includes the 'shift' modifier key.

Returns:
boolean - 'True' if the Model has a listener for the 'mouse moved' event, otherwise 'false'.


hasMouseWheelMovedListener

boolean hasMouseWheelMovedListener (number mousekey)
Returns 'true' if the Model has a listener for the 'mouse wheel moved' event, otherwise 'false'.

Parameters:
number mousekey - Mouse wheel movement that will trigger the event: MOUSE_WHEEL_DOWN or MOUSE_WHEEL_DOWN.

Returns:
boolean - 'True' if the Model has a listener for the 'mouse wheel moved' event, otherwise 'false'.


hasMouseWheelMovedListener

boolean hasMouseWheelMovedListener (number mousekey, boolean ctrl, boolean alt, boolean shift)
Returns 'true' if the Model has a listener for the 'mouse wheel moved' event, otherwise 'false'.

Parameters:
number mousekey - Mouse wheel movement that will trigger the event: MOUSE_WHEEL_DOWN or MOUSE_WHEEL_DOWN.
boolean ctrl - Whether the key combination includes the 'ctrl' modifier key.
boolean alt - Whether the key combination includes the 'alt' modifier key.
boolean shift - Whether the key combination includes the 'shift' modifier key.

Returns:
boolean - 'True' if the Model has a listener for the 'mouse wheel moved' event, otherwise 'false'.


hasRayHitListener

boolean hasRayHitListener ()
Returns 'true' if the model has a 'ray hit' Listener, otherwise 'false'.

Returns:
boolean - 'True' if the model has a 'ray hit' Listener, otherwise 'false'.


hasRepresentation

boolean hasRepresentation (representation other)
Returns 'true' if this representation has the other representation, otherwise 'false'.

Parameters:
representation other - The other representation.

Returns:
boolean - 'True' if this representation has the other representation, otherwise 'false'.


hasRepresentation

boolean hasRepresentation (string name, number type)
Returns 'true' if this representation has another representation with the specified name and type, otherwise 'false'.

Parameters:
string name - Name of the representation.
number type - Type of the representation

Returns:
boolean - 'True' if this representation has another representation with the specified name and type, otherwise 'false'.


hasShape

boolean hasShape (string name)
Returns 'true' if the model has a shape with the specified name.

Parameters:
string name - Name of the shape.

Returns:
boolean - Whether the shape exists or not.


isCastShadowsEnabled

boolean isCastShadowsEnabled ()
Returns True if the Model can cast shadows, otherwise false.

Returns:
boolean - True if the Model can cast shadows, otherwise false.


isCharacterCollisionEnabled

boolean isCharacterCollisionEnabled ()
Checks if the Model character collision is enabled.

Returns:
boolean - 'True' if the Model character has collision enabled, otherwise 'false'.


isCharacterGravityEnabled

boolean isCharacterGravityEnabled ()
Checks if the Model character gravity is enabled.

Returns:
boolean - 'True' if the Model character has gravity enabled, otherwise 'false'.


isPersistent

boolean isPersistent ()
Returns true if the representation is persistent, false otherwise.

Returns:
boolean - Whether the Model is persistent or not.


isVisible

boolean isVisible ()
Returns 'true' if the representation is visible, 'false' otherwise.

Returns:
boolean - Whether the Model is visible or not.


jump

nil jump ()
Starts a jump movement with the default height.


jump

nil jump (float height)
Starts a jump movement.

Parameters:
float height - Maximum height the model will reach in the jump.


pauseAnimation

nil pauseAnimation (string anima)
Pause an animation in the model.

Parameters:
string anima - Name of the animation.


playAnimation

nil playAnimation (string anima, number freq, boolean loop)
Plays an animation in the model.

Parameters:
string anima - Name of the animation.
number freq - Speed of the animation,
boolean loop - Whether the animation is played in loop until explicitly stopped.


playAnimation

nil playAnimation (string anima, number frame)
Plays the specified frame of an animation in the model.

Parameters:
string anima - Name of the animation.
number frame - Frame to play,


playSurfaceTranslation

nil playSurfaceTranslation (number freq, boolean loop, array{} positions)
Moves over the surface and rotates the model horizontally through a set of positions and directions.

Parameters:
number freq - Speed of the animation.
boolean loop - Whether the animation plays in loop.
array{} positions - An array points (x,z) and directions (dx,dz).


playTranslation

nil playTranslation (number freq, boolean loop, array{} positions)
Moves and rotates the model through a set of positions and directions.

Parameters:
number freq - Speed of the animation.
boolean loop - Whether the animation plays in loop.
array{} positions - An array points (x,y,z) and directions (dx,dy,dz).


print

nil print ()
Prints the Model data and attributes to the console.


removeAIMovementOnStartListener

nil removeAIMovementOnStartListener ()
Removes the listener from the model for the 'pathfind start' event.


removeAIMovementOnStopListener

nil removeAIMovementOnStopListener ()
Removes the listener from the model for the 'pathfind stopped' event.


removeAllRepresentations

nil removeAllRepresentations ()
Removes all representations contained in this representation.


removeAllShapes

nil removeAllShapes ()
Removes all shapes from the model.


removeMouseButtonClickedListener

nil removeMouseButtonClickedListener (number mousekey)
Removes the 'mouse button clicked' event listener of the Model.

Parameters:
number mousekey - Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.


removeMouseButtonClickedListener

nil removeMouseButtonClickedListener (number mousekey, boolean ctrl, boolean alt, boolean shift)
Removes the 'mouse button clicked' event listener of the Model.

Parameters:
number mousekey - Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.
boolean ctrl - Whether the key combination includes the 'ctrl' modifier key.
boolean alt - Whether the key combination includes the 'alt' modifier key.
boolean shift - Whether the key combination includes the 'shift' modifier key.


removeMouseButtonDoubleClickedListener

nil removeMouseButtonDoubleClickedListener (number mousekey)
Removes the 'mouse button double clicked' event listener of the Model.

Parameters:
number mousekey - Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.


removeMouseButtonDoubleClickedListener

nil removeMouseButtonDoubleClickedListener (number mousekey, boolean ctrl, boolean alt, boolean shift)
Removes the 'mouse button double clicked' event listener of the Model.

Parameters:
number mousekey - Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.
boolean ctrl - Whether the key combination includes the 'ctrl' modifier key.
boolean alt - Whether the key combination includes the 'alt' modifier key.
boolean shift - Whether the key combination includes the 'shift' modifier key.


removeMouseButtonPressedListener

nil removeMouseButtonPressedListener (number mousekey)
Removes the 'mouse button pressed' event listener of the Model.

Parameters:
number mousekey - Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.


removeMouseButtonPressedListener

nil removeMouseButtonPressedListener (number mousekey, boolean ctrl, boolean alt, boolean shift)
Removes the 'mouse button pressed' event listener of the Model.

Parameters:
number mousekey - Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.
boolean ctrl - Whether the key combination includes the 'ctrl' modifier key.
boolean alt - Whether the key combination includes the 'alt' modifier key.
boolean shift - Whether the key combination includes the 'shift' modifier key.


removeMouseButtonReleasedListener

nil removeMouseButtonReleasedListener (number mousekey)
Removes the 'mouse button released' event listener of the Model.

Parameters:
number mousekey - Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.


removeMouseButtonReleasedListener

nil removeMouseButtonReleasedListener (number mousekey, boolean ctrl, boolean alt, boolean shift)
Removes the 'mouse button released' event listener of the Model.

Parameters:
number mousekey - Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.
boolean ctrl - Whether the key combination includes the 'ctrl' modifier key.
boolean alt - Whether the key combination includes the 'alt' modifier key.
boolean shift - Whether the key combination includes the 'shift' modifier key.


removeMouseButtonTripleClickedListener

nil removeMouseButtonTripleClickedListener (number mousekey)
Removes the 'mouse button triple clicked' event listener of the Model.

Parameters:
number mousekey - Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.


removeMouseButtonTripleClickedListener

nil removeMouseButtonTripleClickedListener (number mousekey, boolean ctrl, boolean alt, boolean shift)
Removes the 'mouse button triple clicked' event listener of the Model.

Parameters:
number mousekey - Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.
boolean ctrl - Whether the key combination includes the 'ctrl' modifier key.
boolean alt - Whether the key combination includes the 'alt' modifier key.
boolean shift - Whether the key combination includes the 'shift' modifier key.


removeMouseEnteredListener

nil removeMouseEnteredListener ()
Removes the 'mouse entered' event listener of the Model.


removeMouseEnteredListener

nil removeMouseEnteredListener (boolean ctrl, boolean alt, boolean shift)
Removes the 'mouse entered' event listener of the Model.

Parameters:
boolean ctrl - Whether the key combination includes the 'ctrl' modifier key.
boolean alt - Whether the key combination includes the 'alt' modifier key.
boolean shift - Whether the key combination includes the 'shift' modifier key.


removeMouseLeftListener

nil removeMouseLeftListener ()
Removes the 'mouse left' event listener of the Model.


removeMouseLeftListener

nil removeMouseLeftListener (boolean ctrl, boolean alt, boolean shift)
Removes the 'mouse left' event listener of the Model.

Parameters:
boolean ctrl - Whether the key combination includes the 'ctrl' modifier key.
boolean alt - Whether the key combination includes the 'alt' modifier key.
boolean shift - Whether the key combination includes the 'shift' modifier key.


removeMouseMovedListener

nil removeMouseMovedListener ()
Removes the 'mouse moved' event listener of the Model.


removeMouseMovedListener

nil removeMouseMovedListener (boolean ctrl, boolean alt, boolean shift)
Removes the 'mouse moved' event listener of the Model.

Parameters:
boolean ctrl - Whether the key combination includes the 'ctrl' modifier key.
boolean alt - Whether the key combination includes the 'alt' modifier key.
boolean shift - Whether the key combination includes the 'shift' modifier key.


removeMouseWheelMovedListener

nil removeMouseWheelMovedListener (number mousekey)
Removes the 'mouse wheel moved' event listener of the Model.

Parameters:
number mousekey - Mouse wheel movement that will trigger the event: MOUSE_WHEEL_DOWN or MOUSE_WHEEL_DOWN.


removeMouseWheelMovedListener

nil removeMouseWheelMovedListener (number mousekey, boolean ctrl, boolean alt, boolean shift)
Removes the 'mouse wheel moved' event listener of the Model.

Parameters:
number mousekey - Mouse wheel movement that will trigger the event: MOUSE_WHEEL_DOWN or MOUSE_WHEEL_DOWN.
boolean ctrl - Whether the key combination includes the 'ctrl' modifier key.
boolean alt - Whether the key combination includes the 'alt' modifier key.
boolean shift - Whether the key combination includes the 'shift' modifier key.


removePhysics

nil removePhysics ()
Removes physics from the model. Warning: it removes all shapes and joints the model has.


removeRepresentation

nil removeRepresentation (representation other)
Removes a representation from this representation.

Parameters:
representation other - The representation to be removed.


removeRepresentation

nil removeRepresentation (string name, number type)
Removes a representation with the specified name and type from this representation.

Parameters:
string name - Name of the representation.
number type - Type of the representation


removeShape

nil removeShape (string name)
Removes a shape with the specified name.

Parameters:
string name - Name of the shape.


rotateAroundVector

nil rotateAroundVector (number angle, number x, number y, number z)
Rotates the Model around the specified vector.

Parameters:
number angle - Rotation angle (degrees).
number x - X coordinate of the rotation vector.
number y - Y coordinate of the rotation vector.
number z - z coordinate of the rotation vector.


rotatePitch

nil rotatePitch (number angle)
Rotates the pitch of the Model.

Parameters:
number angle - Rotation angle (degrees).


rotateRoll

nil rotateRoll (number angle)
Rotates the roll of the Model.

Parameters:
number angle - Rotation angle (degrees).


rotateYaw

nil rotateYaw (number angle)
Rotates the yaw of the Model.

Parameters:
number angle - Rotation angle (degrees).


setAIMovementOnStartListener

nil setAIMovementOnStartListener (Object target, string name, InterModel interactionModel, boolean global, string channel)
Sets a listener to be invoked upon a 'pathfind started' event on the model.

Parameters:
Object target - The object that contains the interaction that will be executed.
string name - Name of the interaction.
InterModel interactionModel - Arguments of the interaction that will be executed when this listener is activated.
boolean global - 'true' if this listener is executed globally, 'false' if it is executed only locally.
string channel - The channel of the listener.


setAIMovementOnStopListener

nil setAIMovementOnStopListener (Object target, string name, InterModel interactionModel)
Sets a listener to be invoked upon a 'pathfind stopped' event on the model.

Parameters:
Object target - The object that contains the interaction that will be executed.
string name - Name of the interaction.
InterModel interactionModel - Arguments of the interaction that will be executed when this listener is activated.


setAIMovementOnStopListener

nil setAIMovementOnStopListener (Object target, string name, InterModel interactionModel, boolean global, string channel)
Sets a listener to be invoked upon a 'pathfind stopped' event on the model.

Parameters:
Object target - The object that contains the interaction that will be executed.
string name - Name of the interaction.
InterModel interactionModel - Arguments of the interaction that will be executed when this listener is activated.
boolean global - 'true' if this listener is executed globally, 'false' if it is executed only locally.
string channel - The channel of the listener.


setAnimationMask

nil setAnimationMask (string animation, array{} n})
Creates an animation mask for animation blending between two or more animations playing at the same time.

Parameters:
string animation - name.
array{} n} - weights (between 0 and 1) for the n bones of the model.


setCastShadowsEnabled

nil setCastShadowsEnabled (boolean shadows)
Turns on/off the casting of shadows by the Model.

Parameters:
boolean shadows - Whether the Model casts shadows or not.


setCharacterCollisionEnabled

nil setCharacterCollisionEnabled (boolean collision)
Enable/Disables the Model character collision.

Parameters:
boolean collision - Whether the Models character colides with other objects.


setCharacterGravityEnabled

nil setCharacterGravityEnabled (boolean collision)
Enable/Disables the Model character gravity.

Parameters:
boolean collision - Whether the Models character is affected by gravity.


setCharacterHeight

nil setCharacterHeight (number height)
Sets the Model character shape height.

Parameters:
number height - Model character shape height.


setCharacterJumpHeight

nil setCharacterJumpHeight (number maxSlope)
Sets the maximum slope that the Model character can climb

Parameters:
number maxSlope - Maximum slope that the Model character can climb


setCharacterJumpHeight

nil setCharacterJumpHeight (number jumpHeight)
Sets the jump height of the Model character

Parameters:
number jumpHeight - Jump height of the Model character


setCharacterOffset

nil setCharacterOffset (number offsetX, number offsetY, number offsetZ)
Gets the Model character shape position offset

Parameters:
number offsetX - Offset X coordinate.
number offsetY - Offset Y coordinate.
number offsetZ - Offset Z coordinate.


setCharacterRadius

nil setCharacterRadius (number radius)
Sets the Model character shape radius.

Parameters:
number radius - Model character shape radius.


setCharacterRotation

nil setCharacterRotation (number rotation)
Sets the Model character shape rotation.

Parameters:
number rotation - Model character shape rotation.


setCharacterSpeed

nil setCharacterSpeed (number speedFront, number speedBack, number speedStrafe, number speedRotate)
Sets the Model character movement speed.

Parameters:
number speedFront - Model character movement forward speed.
number speedBack - Model character movement backward speed.
number speedStrafe - Model character movement strafe speed.
number speedRotate - Model character movement rotate speed.


setCharacterSpeedBack

nil setCharacterSpeedBack (number speedBack)
Sets the Model character movement backward speed.

Parameters:
number speedBack - Model character movement backward speed.


setCharacterSpeedFront

nil setCharacterSpeedFront (number speedFront)
Sets the Model character movement forward speed.

Parameters:
number speedFront - Model character movement forward speed.


setCharacterSpeedStrafe

nil setCharacterSpeedStrafe (number speedStrafe)
Sets the Model character movement strafe speed.

Parameters:
number speedStrafe - Model character movement strafe speed.


setCharacterStepHeight

nil setCharacterStepHeight (number stepHeight)
Sets the step height of the Model character

Parameters:
number stepHeight - Step height of the Model character


setMaterial

nil setMaterial (string material)
Sets a material to every sub-meshs.

Parameters:
string material - The Material name.


setMaterial

nil setMaterial (string material, number submesh)
Sets a material to a sub-mesh.

Parameters:
string material - The Material name.
number submesh - The number of the sub-mesh where the material will be applied.


setMouseButtonDoubleClickedListener

nil setMouseButtonDoubleClickedListener (number mousekey, Object target, string name, InterModel interactionModel)
Sets a listener to be invoked upon a 'mouse button double clicked' event on the Model.

Parameters:
number mousekey - Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.
Object target - The object that contains the interaction that will be executed.
string name - Name of the interaction.
InterModel interactionModel - Arguments of the interaction that will be executed when this listener is activated.


setMouseButtonDoubleClickedListener

nil setMouseButtonDoubleClickedListener (number mousekey, Object target, string name, InterModel interactionModel, boolean ctrl, boolean alt, boolean shift, boolean global, string channel)
Sets a listener to be invoked upon a 'mouse button double clicked' event on the Model.

Parameters:
number mousekey - Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.
Object target - The object that contains the interaction that will be executed.
string name - Name of the interaction.
InterModel interactionModel - Arguments of the interaction that will be executed when this listener is activated.
boolean ctrl - Whether the key combination includes the 'ctrl' modifier key.
boolean alt - Whether the key combination includes the 'alt' modifier key.
boolean shift - Whether the key combination includes the 'shift' modifier key.
boolean global - 'true' if this listener is executed globally, 'false' if it is executed only locally.
string channel - The channel of the listener.


setMouseButtonPressedListener

nil setMouseButtonPressedListener (number mousekey, Object target, string name, InterModel interactionModel)
Sets a listener to be invoked upon a 'mouse button pressed' event on the Model.

Parameters:
number mousekey - Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.
Object target - The object that contains the interaction that will be executed.
string name - Name of the interaction.
InterModel interactionModel - Arguments of the interaction that will be executed when this listener is activated.


setMouseButtonPressedListener

nil setMouseButtonPressedListener (number mousekey, Object target, string name, InterModel interactionModel, boolean ctrl, boolean alt, boolean shift, boolean global, string channel)
Sets a listener to be invoked upon a 'mouse button pressed' event on the Model.

Parameters:
number mousekey - Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.
Object target - The object that contains the interaction that will be executed.
string name - Name of the interaction.
InterModel interactionModel - Arguments of the interaction that will be executed when this listener is activated.
boolean ctrl - Whether the key combination includes the 'ctrl' modifier key.
boolean alt - Whether the key combination includes the 'alt' modifier key.
boolean shift - Whether the key combination includes the 'shift' modifier key.
boolean global - 'true' if this listener is executed globally, 'false' if it is executed only locally.
string channel - The channel of the listener.


setMouseButtonReleasedListener

nil setMouseButtonReleasedListener (number mousekey, Object target, string name, InterModel interactionModel)
Sets a listener to be invoked upon a 'mouse button released' event on the Model.

Parameters:
number mousekey - Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.
Object target - The object that contains the interaction that will be executed.
string name - Name of the interaction.
InterModel interactionModel - Arguments of the interaction that will be executed when this listener is activated.


setMouseButtonReleasedListener

nil setMouseButtonReleasedListener (number mousekey, Object target, string name, InterModel interactionModel, boolean ctrl, boolean alt, boolean shift, boolean global, string channel)
Sets a listener to be invoked upon a 'mouse button released' event on the Model.

Parameters:
number mousekey - Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.
Object target - The object that contains the interaction that will be executed.
string name - Name of the interaction.
InterModel interactionModel - Arguments of the interaction that will be executed when this listener is activated.
boolean ctrl - Whether the key combination includes the 'ctrl' modifier key.
boolean alt - Whether the key combination includes the 'alt' modifier key.
boolean shift - Whether the key combination includes the 'shift' modifier key.
boolean global - 'true' if this listener is executed globally, 'false' if it is executed only locally.
string channel - The channel of the listener.


setMouseButtonTripleClickedListener

nil setMouseButtonTripleClickedListener (number mousekey, Object target, string name, InterModel interactionModel)
Sets a listener to be invoked upon a 'mouse button triple clicked' event on the Model.

Parameters:
number mousekey - Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.
Object target - The object that contains the interaction that will be executed.
string name - Name of the interaction.
InterModel interactionModel - Arguments of the interaction that will be executed when this listener is activated.


setMouseButtonTripleClickedListener

nil setMouseButtonTripleClickedListener (number mousekey, Object target, string name, InterModel interactionModel, boolean ctrl, boolean alt, boolean shift, boolean global, string channel)
Sets a listener to be invoked upon a 'mouse button triple clicked' event on the Model.

Parameters:
number mousekey - Mouse key that will trigger the event: MOUSE_BUTTON_LEFT, MOUSE_BUTTON_MIDDLE or MOUSE_BUTTON_RIGHT.
Object target - The object that contains the interaction that will be executed.
string name - Name of the interaction.
InterModel interactionModel - Arguments of the interaction that will be executed when this listener is activated.
boolean ctrl - Whether the key combination includes the 'ctrl' modifier key.
boolean alt - Whether the key combination includes the 'alt' modifier key.
boolean shift - Whether the key combination includes the 'shift' modifier key.
boolean global - 'true' if this listener is executed globally, 'false' if it is executed only locally.
string channel - The channel of the listener.


setMouseEnteredListener

nil setMouseEnteredListener (Object target, string name, InterModel interactionModel)
Sets a listener to be invoked upon a 'mouse enter' event on the Model.

Parameters:
Object target - The object that contains the interaction that will be executed.
string name - Name of the interaction.
InterModel interactionModel - Arguments of the interaction that will be executed when this listener is activated.


setMouseEnteredListener

nil setMouseEnteredListener (Object target, string name, InterModel interactionModel, boolean ctrl, boolean alt, boolean shift, boolean global, string channel)
Sets a listener to be invoked upon a 'mouse enter' event on the Model.

Parameters:
Object target - The object that contains the interaction that will be executed.
string name - Name of the interaction.
InterModel interactionModel - Arguments of the interaction that will be executed when this listener is activated.
boolean ctrl - Whether the key combination includes the 'ctrl' modifier key.
boolean alt - Whether the key combination includes the 'alt' modifier key.
boolean shift - Whether the key combination includes the 'shift' modifier key.
boolean global - 'true' if this listener is executed globally, 'false' if it is executed only locally.
string channel - The channel of the listener.


setMouseLeftListener

nil setMouseLeftListener (Object target, string name, InterModel interactionModel)
Sets a listener to be invoked upon a 'mouse leave' event on the Model.

Parameters:
Object target - The object that contains the interaction that will be executed.
string name - Name of the interaction.
InterModel interactionModel - Arguments of the interaction that will be executed when this listener is activated.


setMouseLeftListener

nil setMouseLeftListener (Object target, string name, InterModel interactionModel, boolean ctrl, boolean alt, boolean shift, boolean global, string channel)
Sets a listener to be invoked upon a 'mouse leave' event on the Model.

Parameters:
Object target - The object that contains the interaction that will be executed.
string name - Name of the interaction.
InterModel interactionModel - Arguments of the interaction that will be executed when this listener is activated.
boolean ctrl - Whether the key combination includes the 'ctrl' modifier key.
boolean alt - Whether the key combination includes the 'alt' modifier key.
boolean shift - Whether the key combination includes the 'shift' modifier key.
boolean global - 'true' if this listener is executed globally, 'false' if it is executed only locally.
string channel - The channel of the listener.


setMouseMovedListener

nil setMouseMovedListener (Object target, string name, InterModel interactionModel)
Sets a listener to be invoked upon a 'mouse move' event on the Model.

Parameters:
Object target - The object that contains the interaction that will be executed.
string name - Name of the interaction.
InterModel interactionModel - Arguments of the interaction that will be executed when this listener is activated.


setMouseMovedListener

nil setMouseMovedListener (Object target, string name, InterModel interactionModel, boolean ctrl, boolean alt, boolean shift, boolean global, string channel)
Sets a listener to be invoked upon a 'mouse move' event on the Model.

Parameters:
Object target - The object that contains the interaction that will be executed.
string name - Name of the interaction.
InterModel interactionModel - Arguments of the interaction that will be executed when this listener is activated.
boolean ctrl - Whether the key combination includes the 'ctrl' modifier key.
boolean alt - Whether the key combination includes the 'alt' modifier key.
boolean shift - Whether the key combination includes the 'shift' modifier key.
boolean global - 'true' if this listener is executed globally, 'false' if it is executed only locally.
string channel - The channel of the listener.


setMouseWheelMovedListener

nil setMouseWheelMovedListener (number mousekey, Object target, string name, InterModel interactionModel)
Sets a listener to be invoked upon a 'mouse wheel moved' event on the Model.

Parameters:
number mousekey - Mouse wheel movement that will trigger the event: MOUSE_WHEEL_DOWN or MOUSE_WHEEL_DOWN.
Object target - The object that contains the interaction that will be executed.
string name - Name of the interaction.
InterModel interactionModel - Arguments of the interaction that will be executed when this listener is activated.


setMouseWheelMovedListener

nil setMouseWheelMovedListener (number mousekey, Object target, string name, InterModel interactionModel, boolean ctrl, boolean alt, boolean shift, boolean global, string channel)
Sets a listener to be invoked upon a 'mouse wheel moved' event on the Model.

Parameters:
number mousekey - Mouse wheel movement that will trigger the event: MOUSE_WHEEL_DOWN or MOUSE_WHEEL_DOWN.
Object target - The object that contains the interaction that will be executed.
string name - Name of the interaction.
InterModel interactionModel - Arguments of the interaction that will be executed when this listener is activated.
boolean ctrl - Whether the key combination includes the 'ctrl' modifier key.
boolean alt - Whether the key combination includes the 'alt' modifier key.
boolean shift - Whether the key combination includes the 'shift' modifier key.
boolean global - 'true' if this listener is executed globally, 'false' if it is executed only locally.
string channel - The channel of the listener.


setPersistent

nil setPersistent (boolean persistent)
Makes the Model persistent or not persistent.

Parameters:
boolean persistent - Whether the Model is persistent or not.


setPhysicsCharacter

nil setPhysicsCharacter ()
Sets the physics type of the model to character. Warning: it removes all shapes and joints the model has.


setPhysicsCharacter

nil setPhysicsCharacter (number syncType)
Sets the physics type of the model to character. Warning: it removes all shapes and joints the model has.

Parameters:
number syncType - Type of physics synchronization: PT_SYNC_NONE, PT_SYNC_LOCAL or PT_SYNC_GLOBAL.


setPhysicsCharacter

nil setPhysicsCharacter (number syncType, number mass)
Sets the physics type of the model to character. Warning: it removes all shapes and joints the model has.

Parameters:
number syncType - Type of physics synchronization: PT_SYNC_NONE, PT_SYNC_LOCAL or PT_SYNC_GLOBAL.
number mass - Mass of the object.


setPhysicsDynamic

nil setPhysicsDynamic ()
Sets the physics type of the model to dynamic. The mass will be calculated based on the volume of the object. Warning: it removes all shapes and joints the model has.


setPhysicsDynamic

nil setPhysicsDynamic (number syncType)
Sets the physics type of the model to dynamic. Warning: it removes all shapes and joints the model has.

Parameters:
number syncType - Type of physics synchronization: PT_SYNC_NONE, PT_SYNC_LOCAL or PT_SYNC_GLOBAL.


setPhysicsDynamic

nil setPhysicsDynamic (number syncType, number mass)
Sets the physics type of the model to dynamic. Warning: it removes all shapes and joints the model has.

Parameters:
number syncType - Type of physics synchronization: PT_SYNC_NONE, PT_SYNC_LOCAL or PT_SYNC_GLOBAL.
number mass - Mass of the object.


setPhysicsMass

nil setPhysicsMass (number mass)
Sets the mass of the physics object currently applied to the Model.

Parameters:
number mass - Mass of the object.


setPhysicsStatic

nil setPhysicsStatic ()
Sets the physics type of the model to static. Warning: it removes all shapes and joints the model has.


setPhysicsSync

nil setPhysicsSync (number syncType)
Sets the synchronization type of the physics object currently applied to the Model.

Parameters:
number syncType - Type of physics synchronization: PT_SYNC_NONE, PT_SYNC_LOCAL or PT_SYNC_GLOBAL.


setPosition

nil setPosition (number x, number y, number z)
Sets the position of the Model in the 3D space (x,y,z).

Parameters:
number x - New position in the X axis.
number y - New position in the Y axis.
number z - New position in the Z axis.


setQuaternion

nil setQuaternion (number w, number x, number y, number z)
Rotates the Model in the 3D space through quaternion coordinates (w,x,y,z).

Parameters:
number w - W coordinate.
number x - X coordinate.
number y - Y coordinate.
number z - Z coordinate.


setRayHitListener

nil setRayHitListener (Object target, string name, InterModel interactionModel)
Sets a listener to be invoked upon a 'ray hit stopped' event on the model.

Parameters:
Object target - The object that contains the interaction that will be executed.
string name - Name of the interaction.
InterModel interactionModel - Arguments of the interaction that will be executed when this listener is activated.


setRayHitListener

nil setRayHitListener (Object target, string name, InterModel interactionModel, boolean global, string channel)
Sets a listener to be invoked upon a 'ray hit stopped' event on the model.

Parameters:
Object target - The object that contains the interaction that will be executed.
string name - Name of the interaction.
InterModel interactionModel - Arguments of the interaction that will be executed when this listener is activated.
boolean global - 'true' if this listener is executed globally, 'false' if it is executed only locally.
string channel - The channel of the listener.


setRotation

nil setRotation (number x, number y, number z)
Sets the Model rotation in the 3D space, according to the angle that the given point (x,y,z) has with the origin.

Parameters:
number x - X coordinate.
number y - Y coordinate.
number z - Z coordinate.


setScale

nil setScale (number x, number y, number z)
Scales the Model.

Parameters:
number x - Scale ratio in the X coordinate.
number y - Scale ratio in the Y coordinate.
number z - Scale ratio in the Z coordinate.


setShapeHeight

nil setShapeHeight (string name, number height)
Sets the height of the shape.

Parameters:
string name - Name of the shape.
number height - Height of the shape.


setShapeOrientation

nil setShapeOrientation (string name, number ow, number ox, number oy, number oz)
Sets the orientation of the shape.

Parameters:
string name - Name of the shape.
number ow - W angle for the shape orientation.
number ox - X axis for the shape orientation.
number oy - Y axis for the shape orientation.
number oz - Z axis for the shape orientation.


setShapePhysicsMaterial

nil setShapePhysicsMaterial (string name, string physicsMaterial)
Sets the physics material of the shape.

Parameters:
string name - Name of the shape.
string physicsMaterial - Physics material of the shape.


setShapePosition

nil setShapePosition (string name, number x, number y, number z)
Sets the relative position of the shape.

Parameters:
string name - Name of the shape.
number x - X coordinate for the relative position.
number y - Y coordinate for the relative position.
number z - Z coordinate for the relative position.


setShapeRadius

nil setShapeRadius (string name, number radius)
Sets the radius of the shape.

Parameters:
string name - Name of the shape.
number radius - Radius of the shape.


setShapeScale

nil setShapeScale (string name, number sx, number sy, number sz)
Sets the scale of the shape.

Parameters:
string name - Name of the shape.
number sx - X coordinate for the scale.
number sy - Y coordinate for the scale.
number sz - Z coordinate for the scale.


setSurfacePosition

nil setSurfacePosition (number x, number y, number z)
Moves the model to another position in the surface of the terrain, i.e., the Y coordinate will be the height of the terrain at that point.

Parameters:
number x - The X coordinate of the position.
number y - The Y coordinate of the offset of the position.
number z - The Z coordinate of the position.


setSurfacePosition

nil setSurfacePosition (number x, number z)
Moves the model to another position in the surface of the terrain, i.e., the Y coordinate will be the height of the terrain at that point.

Parameters:
number x - The X coordinate of the position.
number z - The Z coordinate of the position.


setSurfacePosition

nil setSurfacePosition (number x, number y, number z)
Moves the model to another position in the surface of the terrain, i.e., the Y coordinate will be the height of the terrain at that point plus offset.

Parameters:
number x - The X coordinate of the position.
number y - The Y offset of the position.
number z - The Y coordinate of the position.


setVehicleGear

nil setVehicleGear (unsigned int)
Changes the current gear of the vehicle.

Parameters:
unsigned int - gear Gear to which the vehicle engine will shift


setVisible

nil setVisible (boolean visible)
Makes the Model visible or invisible.

Parameters:
boolean visible - Whether the Model is visible or not.


startMovementBackward

nil startMovementBackward ()
Starts backward movement with the default speed.


startMovementBackward

nil startMovementBackward (float speed)
Starts backward movement.

Parameters:
float speed - Linear speed of the backward movement.


startMovementForward

nil startMovementForward ()
Starts forward movement with the default speed.


startMovementForward

nil startMovementForward (float speed)
Starts forward movement.

Parameters:
float speed - Linear speed of the forward movement.


startMovementRotateLeft

nil startMovementRotateLeft ()
Starts rotate left movement with the default speed.


startMovementRotateLeft

nil startMovementRotateLeft (float speed)
Starts rotate left movement.

Parameters:
float speed - Linear speed of the rotate left movement.


startMovementRotateRight

nil startMovementRotateRight ()
Starts rotate right movement with the default speed.


startMovementRotateRight

nil startMovementRotateRight (float speed)
Starts rotate right movement.

Parameters:
float speed - Linear speed of the rotate right movement.


startMovementStrafeLeft

nil startMovementStrafeLeft ()
Starts strafe left movement with the default speed.


startMovementStrafeLeft

nil startMovementStrafeLeft (float speed)
Starts starfe left movement.

Parameters:
float speed - Linear speed of the strafe left movement.


startMovementStrafeRight

nil startMovementStrafeRight ()
Starts strafe right movement with the default speed.


startMovementStrafeRight

nil startMovementStrafeRight (float speed)
Starts starfe right movement.

Parameters:
float speed - Linear speed of the strafe right movement.


stop

nil stop ()
Stops all AI current movements


stopAnimation

nil stopAnimation (string anima)
Stops the animation in the Model.

Parameters:
string anima - Name of the animation.


stopMovementBackward

nil stopMovementBackward ()
Stops backward movement.


stopMovementForward

nil stopMovementForward ()
Stops forward movement.


stopMovementRotateLeft

nil stopMovementRotateLeft ()
Stops rotate left movement.


stopMovementRotateRight

nil stopMovementRotateRight ()
Stops rotate right movement.


stopMovementStrafeLeft

nil stopMovementStrafeLeft ()
Stops strafe left movement.


stopMovementStrafeRight

nil stopMovementStrafeRight ()
Stops strafe right movement.


stopTranslation

nil stopTranslation ()
Stops the translaction animation.


turnTo

nil turnTo (float angle)
Starts character AI turning movement towards the specified angle.

Parameters:
float angle - Angle to which the character will turn towards


turnTo

nil turnTo (float angle, float turnSpeed)
Starts character AI turning movement towards the specified angle.

Parameters:
float angle - Angle to which the character will turn towards
float turnSpeed - The speed at which the Model will turn.