Camera

This class sets up the camera.

Method Summary
 nilattachToParent (Representation parent)
 nilattachToParent (Representation The, string bone)
 nilattachToParent (Representation parent)
 nilattachToParent (Representation The, string bone)
 nildetachFromParent ()
 nildetachFromParent ()
 number, number, number, numbergetBOrientation ()
 number, number, numbergetBPosition ()
 number, number, number, numbergetCOrientation ()
 number, number, numbergetCPosition ()
 numbergetElasticity ()
 numbergetFarDistance ()
 numbergetFOV ()
 boolean, boolean, booleangetIgnoredAxisRotation ()
 numbergetLimitMaxX ()
 numbergetLimitMaxZ ()
 numbergetLimitMinX ()
 numbergetLimitMinZ ()
 number, number, number, numbergetLimits ()
 number, numbergetLimitsX ()
 numbergetNearDistance ()
 number, number, number, numbergetOrientation ()
 RepresentationgetParent ()
 stringgetPitchAnimation ()
 number, number, numbergetPosition ()
 numbergetRenderDistance ()
 number, numbergetSpeed ()
 numbergetSpeedX ()
 numbergetSpeedZ ()
 stringgetYawAnimation ()
 numbergetZoomLevel ()
 number, numbergetZoomLimits ()
 numbergetZoomMax ()
 numbergetZoomMin ()
 nilisEdgesControlEnabled (boolean edges)
 booleanisMouseControlEnabled ()
 isSmoothEnabled ()
 booleanisTerrainHeightEnabled ()
 booleanisWheelControlEnabled ()
 nilprint ()
 nilrotateCOrientationPitch (number angle)
 nilrotateCOrientationRoll (number angle)
 nilrotateCOrientationYaw (number angle)
 nilsetBOrientation (number w, number x, number y, number z)
 nilsetBPosition (number x, number y, number z)
 nilsetCOrientation (number w, number x, number y, number z)
 nilsetCPosition (number x, number y, number z)
 nilsetEdgesControlEnabled (boolean edges)
 nilsetElasticity (number elasticity)
 nilsetFarDistance (number near)
 nilsetFOV (number angle)
 nilsetIgnoredAxisRotation (boolean ignoreYaw, boolean ignorePitch, boolean ignoreRoll)
 nilsetLimitMaxX (number maxX)
 nilsetLimitMaxZ (number minZ)
 nilsetLimitMinX (number minX)
 nilsetLimitMinZ (number minZ)
 nilsetLimits (number minX, number maxX, number minZ, number maxZ)
 nilsetLimitsX (number minX, number maxX)
 nilsetLimitsZ (number minZ, number maxZ)
 number, numbersetLimitsZ ()
 nilsetMouseControlEnabled (boolean mousePoint)
 nilsetNearDistance (number near)
 nilsetOrientation (number w, number x, number y, number z)
 nilsetPitchAnimation (string pitch)
 nilsetPosition (number x, number y, number z)
 nilsetRenderDistance (number render)
 nilsetSmoothEnabled (boolean smooth)
 nilsetSpeed (number speedX, number speedZ)
 nilsetSpeedX (number speedX)
 nilsetSpeedZ (number speedZ)
 nilsetTerrainHeightEnabled (boolean terrain)
 nilsetWheelControlEnabled (boolean wheel)
 nilsetYawAnimation (string yaw)
 nilsetZoomLevel (number level)
 nilsetZoomLimits (number zoomMin, number zoomMax)
 nilsetZoomMax (number zoomMax)
 nilsetZoomMin (number zoomMin)

Method Detail

attachToParent

nil attachToParent (Representation parent)
Attaches this camera to a representation.

Parameters:
Representation parent - Representation where the camera will be attached.


attachToParent

nil attachToParent (Representation The, string bone)
Attaches this camera to a representation bone.

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


attachToParent

nil attachToParent (Representation parent)
Attaches this camera to a representation.

Parameters:
Representation parent - Representation where the camera will be attached.


attachToParent

nil attachToParent (Representation The, string bone)
Attaches this camera to a representation bone.

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


detachFromParent

nil detachFromParent ()
Detach this camera from its representation.


detachFromParent

nil detachFromParent ()
Detach this camera from its representation.


getBOrientation

number, number, number, number getBOrientation ()
Returns the orientation of the camera base node (B).

Returns:
number - w The W coordinate of an orientation quaternion
number - x The X coordinate of an orientation quaternion
number - y The Y coordinate of an orientation quaternion
number - z The Z coordinate of an orientation quaternion


getBPosition

number, number, number getBPosition ()
Returns the position of the camera base node (B).

Returns:
number - x The X coordinate of the position
number - y The Y coordinate of the position
number - z The Z coordinate of the positio


getCOrientation

number, number, number, number getCOrientation ()
Returns the orientation of the camera node (C).

Returns:
number - w The W coordinate of an orientation quaternion
number - x The X coordinate of an orientation quaternion
number - y The Y coordinate of an orientation quaternion
number - z The Z coordinate of an orientation quaternion


getCPosition

number, number, number getCPosition ()
Returns the position of the camera node (C).

Returns:
number - x The X coordinate of the position
number - y The Y coordinate of the position
number - z The Z coordinate of the position


getElasticity

number getElasticity ()
Returns the smoothness of movement and rotation.

Returns:
number - elasticity Smoothness of movement and rotation


getFarDistance

number getFarDistance ()
Returns the camera's far clip distance.

Returns:
number - far Far clip distance.


getFOV

number getFOV ()
Retuns the camera's field of view.

Returns:
number - angle The angle that defines the field of view.


getIgnoredAxisRotation

boolean, boolean, boolean getIgnoredAxisRotation ()
Returns the attached object's rotation axis that are being ignored: yaw, pitch and/or roll.

Returns:
boolean - ignoreYaw Ignores parent yaw rotations.
boolean - ignorePitch Ignores parent pitch rotations.
boolean - ignoreRoll Ignores parent roll rotations.


getLimitMaxX

number getLimitMaxX ()
Returns the camera movement maximum limit on X coordinates relative to the camera parent.

Returns:
number - maxX Maximum X limit


getLimitMaxZ

number getLimitMaxZ ()
Returns the camera movement maximum limit on Z coordinates relative to the camera parent.

Returns:
number - minZ Maximum Z limit


getLimitMinX

number getLimitMinX ()
Returns the camera movement minimum limit on X coordinates relative to the camera parent.

Returns:
number - minX Minimum X limit


getLimitMinZ

number getLimitMinZ ()
Returns the camera movement minimum limit on Z coordinates relative to the camera parent.

Returns:
number - minZ Minimum Z limit


getLimits

number, number, number, number getLimits ()
Returns the camera movement limits on X and Z axis relative to the camera parent.

Returns:
number - minX Minimum X limit
number - maxX Maximum X limit
number - minZ Minimum Z limit
number - maxZ Maximum Z limit


getLimitsX

number, number getLimitsX ()
Returns the camera movement limits on X coordinates relative to the camera parent.

Returns:
number - minX Minimum X limit
number - maxX Maximum X limit


getNearDistance

number getNearDistance ()
Returns the camera's near clip distance.

Returns:
number - near Near clip distance.


getOrientation

number, number, number, number getOrientation ()
Returns the orientation of the camera base node (B).

Returns:
number - w The W coordinate of an orientation quaternion
number - x The X coordinate of an orientation quaternion
number - y The Y coordinate of an orientation quaternion
number - z The Z coordinate of an orientation quaternion


getParent

Representation getParent ()
Returns the representation where the camera is attached to.

Returns:
Representation - parent Representation where the camera is attached to


getPitchAnimation

string getPitchAnimation ()
Returns the camera's pitch animation name.

Returns:
string - pitch animation name.


getPosition

number, number, number getPosition ()
Returns the position of the camera base node (B).

Returns:
number - x The X coordinate of the position
number - y The Y coordinate of the position
number - z The Z coordinate of the position


getRenderDistance

number getRenderDistance ()
Returns the camera's maximum rendering distance.

Returns:
number - render Maximum rendering distance.


getSpeed

number, number getSpeed ()
Returns the speed of the camera on X and Z axis relative to the camera derived orientation.

Returns:
number - speedX Speed of the camera on X coordinates
number - speedZ Speed of the camera on Z coordinates


getSpeedX

number getSpeedX ()
Returns the speed of the camera on X coordinates relative to the camera derived orientation.

Returns:
number - speedX Speed of the camera on X coordinates


getSpeedZ

number getSpeedZ ()
Returns the speed of the camera on Z coordinates relative to the camera derived orientation.

Returns:
number - speedZ Speed of the camera on Z coordinates


getYawAnimation

string getYawAnimation ()
Returns the camera's yaw animation name.

Returns:
string - yaw animation name.


getZoomLevel

number getZoomLevel ()
Returns the distance covered each time a zoom jump is requested.

Returns:
number - level distance covered between each zoom jump


getZoomLimits

number, number getZoomLimits ()
Returns the maximum and minimum distance between the two camera based points.

Returns:
number - zoomMin Minimum distance between the camera and the base node
number - zoomMax Maximum distance between the camera and the base node


getZoomMax

number getZoomMax ()
Returns the maximum distance between the two camera based points.

Returns:
number - zoomMax Maximum distance between the camera and the base node


getZoomMin

number getZoomMin ()
Returns the minimum distance between the two camera based points.

Returns:
number - zoomMin Minimum distance between the camera and the base node


isEdgesControlEnabled

nil isEdgesControlEnabled (boolean edges)
Returns whether the camera moves when the mouse touches the screen sides, or not.

Parameters:
boolean edges - if 'True', the camera moves when the mouse touches the screen sides


isMouseControlEnabled

boolean isMouseControlEnabled ()
Returns whether the camera (C) orientation is controled by the mouse movement or not.

Returns:
boolean - mousePoint If 'True' the camera orientation is controled by the mouse movement (FPS-like)


isSmoothEnabled

isSmoothEnabled ()
Returns whether the camera must rotate and move smoothly or instantly.

Returns:
- boolean smooth 'True' If any camera transformation is smooth


isTerrainHeightEnabled

boolean isTerrainHeightEnabled ()
Returns whether the camera is above the surface of the terrain or not.

Returns:
boolean - terrain If 'True' the camera base node (B) is always above the terrain surface


isWheelControlEnabled

boolean isWheelControlEnabled ()
Returns whether the camera zoom is controled by the mouse wheel or not.

Returns:
boolean - wheel If 'True', the mouse wheel controles the camera zoom


print

nil print ()
Prints camera information to the console.


rotateCOrientationPitch

nil rotateCOrientationPitch (number angle)
Rotates the pitch of the camera.

Parameters:
number angle - Rotation angle (degrees).


rotateCOrientationRoll

nil rotateCOrientationRoll (number angle)
Rotates the roll of the camera.

Parameters:
number angle - Rotation angle (degrees).


rotateCOrientationYaw

nil rotateCOrientationYaw (number angle)
Rotates the yaw of the camera.

Parameters:
number angle - Rotation angle (degrees).


setBOrientation

nil setBOrientation (number w, number x, number y, number z)
Sets a new orientation for the camera base node (B).

Parameters:
number w - The W coordinate of an orientation quaternion
number x - The X coordinate of an orientation quaternion
number y - The Y coordinate of an orientation quaternion
number z - The Z coordinate of an orientation quaternion


setBPosition

nil setBPosition (number x, number y, number z)
Sets a new position for the camera base node (B).

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


setCOrientation

nil setCOrientation (number w, number x, number y, number z)
Sets a new orientation for the camera node (C).

Parameters:
number w - The W coordinate of an orientation quaternion
number x - The X coordinate of an orientation quaternion
number y - The Y coordinate of an orientation quaternion
number z - The Z coordinate of an orientation quaternion


setCPosition

nil setCPosition (number x, number y, number z)
Sets a new position for the camera node (C).

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


setEdgesControlEnabled

nil setEdgesControlEnabled (boolean edges)
Sets whether the camera moves when the mouse touches the screen sides, or not.

Parameters:
boolean edges - if 'True', the camera moves when the mouse touches the screen sides


setElasticity

nil setElasticity (number elasticity)
Sets the smoothness of movement and rotation.

Parameters:
number elasticity - Smoothness of movement and rotation


setFarDistance

nil setFarDistance (number near)
Sets the camera's far clip distance.

Parameters:
number near - Far clip distance.


setFOV

nil setFOV (number angle)
Sets the camera's field of view.

Parameters:
number angle - The angle that defines the field of view.


setIgnoredAxisRotation

nil setIgnoredAxisRotation (boolean ignoreYaw, boolean ignorePitch, boolean ignoreRoll)
When the camera is attached to an object, the camera will ignore the object's rotations in the specified axis: yaw, pitch and/or roll.

Parameters:
boolean ignoreYaw - Ignores parent yaw rotations.
boolean ignorePitch - Ignores parent pitch rotations.
boolean ignoreRoll - Ignores parent roll rotations.


setLimitMaxX

nil setLimitMaxX (number maxX)
Sets the camera movement maximum limit on X coordinates relative to the camera parent.

Parameters:
number maxX - Maximum X limit


setLimitMaxZ

nil setLimitMaxZ (number minZ)
Sets the camera movement maximum limit on Z coordinates relative to the camera parent.

Parameters:
number minZ - Maximum Z limit


setLimitMinX

nil setLimitMinX (number minX)
Sets the camera movement minimum limit on X coordinates relative to the camera parent

Parameters:
number minX - Minimum X limit


setLimitMinZ

nil setLimitMinZ (number minZ)
Sets the camera movement minimum limit on Z coordinates relative to the camera parent.

Parameters:
number minZ - Minimum Z limit


setLimits

nil setLimits (number minX, number maxX, number minZ, number maxZ)
Sets the camera movement limits on X and Z axis relative to the camera parent.

Parameters:
number minX - Minimum X limit
number maxX - Maximum X limit
number minZ - Minimum Z limit
number maxZ - Maximum Z limit


setLimitsX

nil setLimitsX (number minX, number maxX)
Sets the camera movement limits on X coordinates relative to the camera parent.

Parameters:
number minX - Minimum X limit
number maxX - Maximum X limit


setLimitsZ

nil setLimitsZ (number minZ, number maxZ)
Sets the camera movement limits on Z coordinates relative to the camera parent.

Parameters:
number minZ - Minimum Z limit
number maxZ - Maximum Z limit


setLimitsZ

number, number setLimitsZ ()
Returns the camera movement limits on Z coordinates relative to the camera parent.

Returns:
number - minZ Minimum Z limit
number - maxZ Maximum Z limit


setMouseControlEnabled

nil setMouseControlEnabled (boolean mousePoint)
Sets whether the camera (C) orientation is controled by the mouse movement or not.

Parameters:
boolean mousePoint - If 'True' the camera orientation is controled by the mouse movement (FPS-like)


setNearDistance

nil setNearDistance (number near)
Sets the camera's near clip distance.

Parameters:
number near - Near clip distance.


setOrientation

nil setOrientation (number w, number x, number y, number z)
Sets a new orientation for the camera base node (B)

Parameters:
number w - The W coordinate of an orientation quaternion
number x - The X coordinate of an orientation quaternion
number y - The Y coordinate of an orientation quaternion
number z - The Z coordinate of an orientation quaternion


setPitchAnimation

nil setPitchAnimation (string pitch)
Sets the camera's pitch animation name.

Parameters:
string pitch - animation name.


setPosition

nil setPosition (number x, number y, number z)
Sets a new position for the camera base node (B).

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


setRenderDistance

nil setRenderDistance (number render)
Sets the camera's maximum rendering distance. Objects further away from the camera will not be rendered.

Parameters:
number render - Maximum rendering distance.


setSmoothEnabled

nil setSmoothEnabled (boolean smooth)
Sets whether the camera must rotate and move smoothly or instantly.

Parameters:
boolean smooth - 'True' If any camera transformation is smooth


setSpeed

nil setSpeed (number speedX, number speedZ)
Sets the speed of the camera on X and Z axis relative to the camera derived orientation.

Parameters:
number speedX - Speed of the camera on X coordinates
number speedZ - Speed of the camera on Z coordinates


setSpeedX

nil setSpeedX (number speedX)
Sets the speed of the camera on X coordinates relative to the camera derived orientation.

Parameters:
number speedX - Speed of the camera on X coordinates


setSpeedZ

nil setSpeedZ (number speedZ)
Sets the speed of the camera on Z coordinates relative to the camera derived orientation.

Parameters:
number speedZ - Speed of the camera on Z coordinates


setTerrainHeightEnabled

nil setTerrainHeightEnabled (boolean terrain)
Sets whether the camera is above the surface of the terrain or not.

Parameters:
boolean terrain - If 'True' the camera base node (B) is always above the terrain surface


setWheelControlEnabled

nil setWheelControlEnabled (boolean wheel)
Sets whether the camera zoom is controled by the mouse wheel or not.

Parameters:
boolean wheel - If 'True', the mouse wheel controles the camera zoom


setYawAnimation

nil setYawAnimation (string yaw)
Sets the camera's yaw animation name.

Parameters:
string yaw - animation name.


setZoomLevel

nil setZoomLevel (number level)
Sets the distance covered each time a zoom jump is requested.

Parameters:
number level - distance covered between each zoom jump


setZoomLimits

nil setZoomLimits (number zoomMin, number zoomMax)
Sets the maximum and minimum distance between the two camera based points.

Parameters:
number zoomMin - Minimum distance between the camera and the base node
number zoomMax - Maximum distance between the camera and the base node


setZoomMax

nil setZoomMax (number zoomMax)
Sets the maximum distance between the two camera based points.

Parameters:
number zoomMax - Maximum distance between the camera and the base node


setZoomMin

nil setZoomMin (number zoomMin)
Sets the minimum distance between the two camera based points.

Parameters:
number zoomMin - Minimum distance between the camera and the base node