loading...
Join the ludiloom Public Alpha Test and help us change the game-making game...
Ludiloom API
last updated on 2009, May 22nd
| Base Concepts | Scene Objects | Data Interface | Gui Overlays | |||
|
Arena Object ObjectTemplate Presence PresenceTemplate RuleBook System |
BillBoard Camera Effect HighlightDecal Light Material MeshDecal |
Model Plane River Road Sound StaticFlora Terrain |
HashTable InterModel Matrix MediaItem Vector |
Button Checkbox CodeEditbox ComboBox Editbox Listbox MenuBar MenuItem |
MenuPopup MultiColumn MultilineEditbox ProgressBar RadioButton ScrollBar ScrollPane SliderBar |
Spinner StaticImage StaticText TabPane ToggleButton Tree Window |
Camera
print
nil print ()
This class sets up the camera.
| Method Summary | |
nil | attachToParent (Representation parent) |
nil | attachToParent (Representation The, string bone) |
nil | attachToParent (Representation parent) |
nil | attachToParent (Representation The, string bone) |
nil | detachFromParent () |
nil | detachFromParent () |
number, number, number, number | getBOrientation () |
number, number, number | getBPosition () |
number, number, number, number | getCOrientation () |
number, number, number | getCPosition () |
number | getElasticity () |
number | getFarDistance () |
number | getFOV () |
boolean, boolean, boolean | getIgnoredAxisRotation () |
number | getLimitMaxX () |
number | getLimitMaxZ () |
number | getLimitMinX () |
number | getLimitMinZ () |
number, number, number, number | getLimits () |
number, number | getLimitsX () |
number | getNearDistance () |
number, number, number, number | getOrientation () |
Representation | getParent () |
string | getPitchAnimation () |
number, number, number | getPosition () |
number | getRenderDistance () |
number, number | getSpeed () |
number | getSpeedX () |
number | getSpeedZ () |
string | getYawAnimation () |
number | getZoomLevel () |
number, number | getZoomLimits () |
number | getZoomMax () |
number | getZoomMin () |
nil | isEdgesControlEnabled (boolean edges) |
boolean | isMouseControlEnabled () |
| isSmoothEnabled () |
boolean | isTerrainHeightEnabled () |
boolean | isWheelControlEnabled () |
nil | print () |
nil | rotateCOrientationPitch (number angle) |
nil | rotateCOrientationRoll (number angle) |
nil | rotateCOrientationYaw (number angle) |
nil | setBOrientation (number w, number x, number y, number z) |
nil | setBPosition (number x, number y, number z) |
nil | setCOrientation (number w, number x, number y, number z) |
nil | setCPosition (number x, number y, number z) |
nil | setEdgesControlEnabled (boolean edges) |
nil | setElasticity (number elasticity) |
nil | setFarDistance (number near) |
nil | setFOV (number angle) |
nil | setIgnoredAxisRotation (boolean ignoreYaw, boolean ignorePitch, boolean ignoreRoll) |
nil | setLimitMaxX (number maxX) |
nil | setLimitMaxZ (number minZ) |
nil | setLimitMinX (number minX) |
nil | setLimitMinZ (number minZ) |
nil | setLimits (number minX, number maxX, number minZ, number maxZ) |
nil | setLimitsX (number minX, number maxX) |
nil | setLimitsZ (number minZ, number maxZ) |
number, number | setLimitsZ () |
nil | setMouseControlEnabled (boolean mousePoint) |
nil | setNearDistance (number near) |
nil | setOrientation (number w, number x, number y, number z) |
nil | setPitchAnimation (string pitch) |
nil | setPosition (number x, number y, number z) |
nil | setRenderDistance (number render) |
nil | setSmoothEnabled (boolean smooth) |
nil | setSpeed (number speedX, number speedZ) |
nil | setSpeedX (number speedX) |
nil | setSpeedZ (number speedZ) |
nil | setTerrainHeightEnabled (boolean terrain) |
nil | setWheelControlEnabled (boolean wheel) |
nil | setYawAnimation (string yaw) |
nil | setZoomLevel (number level) |
nil | setZoomLimits (number zoomMin, number zoomMax) |
nil | setZoomMax (number zoomMax) |
nil | setZoomMin (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 quaternionnumber- x The X coordinate of an orientation quaternionnumber- y The Y coordinate of an orientation quaternionnumber- 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 positionnumber- y The Y coordinate of the positionnumber- 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 quaternionnumber- x The X coordinate of an orientation quaternionnumber- y The Y coordinate of an orientation quaternionnumber- 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 positionnumber- y The Y coordinate of the positionnumber- 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 limitnumber- maxX Maximum X limitnumber- minZ Minimum Z limitnumber- 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 limitnumber- 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 quaternionnumber- x The X coordinate of an orientation quaternionnumber- y The Y coordinate of an orientation quaternionnumber- 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 positionnumber- y The Y coordinate of the positionnumber- 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 coordinatesnumber- 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 nodenumber- 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
- 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 quaternionnumber x- The X coordinate of an orientation quaternionnumber y- The Y coordinate of an orientation quaternionnumber 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 positionnumber y- The Y coordinate of the positionnumber 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 quaternionnumber x- The X coordinate of an orientation quaternionnumber y- The Y coordinate of an orientation quaternionnumber 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 positionnumber y- The Y coordinate of the positionnumber 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 limitnumber maxX- Maximum X limitnumber minZ- Minimum Z limitnumber 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 limitnumber 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 limitnumber 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 limitnumber- 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 quaternionnumber x- The X coordinate of an orientation quaternionnumber y- The Y coordinate of an orientation quaternionnumber 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 positionnumber y- The Y coordinate of the positionnumber 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 coordinatesnumber 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 nodenumber 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

