TorqueScript Reference

- Main Page
- Related Pages
- Modules
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
SceneWindow Class Reference

Inherits GuiControl.

## Public Member Functions
Boolean | addInputListener (inputListener)
void | clampCameraViewLimit ()
void | completeCameraMove ()
void | dismount ()
void | dismountMe (SceneObject *pSceneObject)
String | getBackgroundColor (...)
Float | getCameraAngle ()
String | getCameraArea ()
String | getCameraPosition ()
String | getCameraRenderPosition ()
String | getCameraRenderScale ()
String | getCameraSize ()
String | getCameraWorldScale ()
Float | getCameraZoom ()
String | getCanvasPoint (X/Y)
Boolean | getIsCameraMounted ()
Boolean | getIsCameraMoving ()
Boolean | getIsWindowPoint (X/Y)
Boolean | getLockMouse ()
String | getMousePosition ()
Integer | getRenderGroupMask ()
Integer | getRenderLayerMask ()
String | getScene ()
Float | getTargetCameraAngle ()
String | getTargetCameraArea ()
String | getTargetCameraPosition ()
String | getTargetCameraSize ()
Float | getTargetCameraZoom ()
Boolean | getUseBackgroundColor (...)
Boolean | getUseObjectInputEvents ()
Boolean | getUseWindowInputEvents ()
String | getWindowExtents ()
String | getWindowPoint (X/Y)
String | getWorldPoint (X/Y)
void | mount (sceneObject, [offsetX/offsetY], [mountForce], [sendToMount?], [mountAngle?])
Boolean | removeInputListener (inputListener)
void | resetScene ()
void | setBackgroundColor (float red, float green, float blue, [float alpha=1.0])
void | setCameraAngle (angle)
void | setCameraArea (x1/y1/x2/y2)
void | setCameraInterpolationMode (interpolationMode)
void | setCameraInterpolationTime (interpolationTime)
void | setCameraPosition (x, y)
void | setCameraSize (width, height)
void | setCameraZoom (zoomFactor)
void | setLockMouse (bool lockSet)
void | setMousePosition (x/y)
void | setObjectInputEventFilter (groupMask, layerMask, [useInvisibleFilter?])
void | setObjectInputEventGroupFilter (groups $)
void | setObjectInputEventInvisibleFilter (bool useInvisibleFilter)
void | setObjectInputEventLayerFilter (layers $)
void | setRenderGroups (groups $)
void | setRenderLayers (layers $)
void | setRenderMasks (layerMask, groupMask)
void | setScene (Scene)
void | setTargetCameraAngle (angle)
void | setTargetCameraArea (x1/y1/x2/y2)
void | setTargetCameraPosition (x, y)
void | setTargetCameraSize (width, height)
void | setTargetCameraZoom (zoomFactor)
void | setUseBackgroundColor (...)
void | setUseObjectInputEvents (inputStatus)
void | setUseWindowInputEvents (inputStatus)
void | setViewLimitOff ()
void | setViewLimitOn ([minX/minY/maxX/maxY])
void | startCameraMove ([interpolationTime])
void | startCameraShake (shakeMagnitude, time)
void | stopCameraMove ()
void | stopCameraShake ()
void | undoCameraMove ([interpolationTime])
Public Member Functions inherited from GuiControl
void | addGuiControl (int controlId)
Integer | findHitControl (int x, int y)
String | getCenter ()
String | getExtent (...)
String | getGlobalCenter ()
String | getGlobalPosition ()
String | getMinExtent ()
Integer | getParent ()
String | getPosition ()
String | getValue ()
Boolean | isActive ()
Boolean | isAwake ()
Boolean | isVisible ()
void | makeFirstResponder (isFirst)
Boolean | pointInControl (int x, int y)
void | reorderChild (child1, child2)
void | resize (int x, int y, int w, int h)
void | setActive (isActive)
void | setCanSave (bool canSave)
void | setCenter (int x, int y)
void | setExtent (int width, int height)
void | setFirstResponder ()
void | setPosition (int x, int y)
void | setPositionGlobal (int x, int y)
void | setProfile (GuiControlProfile p)
void | setValue (value)
void | setVisible (isVisible)

## Member Function Documentation

Boolean addInputListener | ( | inputListener |  | ) |

Adds an object as an input listener.

Parameters

  inputListener | The object to add as an input listener.

Returns
  Whether the object was added as an input event listener or not.

void clampCameraViewLimit | ( |  | ) |

Clamps the current camera to the current view limit. Nothing will happen if the view-limit is not active or the camera is moving.

Returns
  No return value

void completeCameraMove | ( |  | ) |

Moves camera directly to target.

Returns
  No return value.

void dismount | ( |  | ) |

Dismounts Camera from object.

Returns
  No return value

void dismountMe | ( | SceneObject * | pSceneObject | ) |

String getBackgroundColor | ( |  | ... | ) |

Gets the background color for the scene.

Returns
  (float red / float green / float blue / float alpha) The background color for the scene.

Float getCameraAngle | ( |  | ) |

Gets the current camera angle.

Returns
  The current camera angle in degrees.

String getCameraArea | ( |  | ) |

Get the current camera Area.

Returns
  The camera area formatted as y1 x2 y2\

String getCameraPosition | ( |  | ) |

Get the current camera position.

Returns
  The current camera position.

String getCameraRenderPosition | ( |  | ) |

Get current camera position post-view-limit clamping.

Returns
  The current camera render position.

String getCameraRenderScale | ( |  | ) |

Get current camera scale to render.

Returns
  Returns the cameras window width/height scale to render as a string formatted as heightScale\

String getCameraSize | ( |  | ) |

Get the current camera size.

Returns
  The current camera width and height.

String getCameraWorldScale | ( |  | ) |

Get current camera scale to world.

Returns
  Returns the cameras window width/height scale to world as a string formatted as heightScale\

Float getCameraZoom | ( |  | ) |

Get the current camera Zoom.

Returns
  The current camera zoom.

String getCanvasPoint | ( | X/ | Y | ) |

Returns Canvas coordinate of Window coordinate.

Parameters

  x,y | The coordinates in world coordinates you wish to convert to window coordinates. Accepts either (x,y) or ( y\

Returns
  Returns the desired canvas coordinates as a string formatted as y\

Boolean getIsCameraMounted | ( |  | ) |

Check the camera mounted status.

Returns
  Returns a boolean value as to whether or not the camera is mounted.

Boolean getIsCameraMoving | ( |  | ) |

Check the camera moving status.

Returns
  Returns a boolean value as to whether or not the camera is moving.

Boolean getIsWindowPoint | ( | X/ | Y | ) |

Checks if World coordinate is inside Window.

Parameters

  x,y | The coordinates in world coordinates you wish to check. Accepts either (x,y) or ( y\

Returns
  Returns true if the coordinates are within the window, and false otherwise.

Boolean getLockMouse | ( |  | ) |

Gets the window mouse-lock status.

String getMousePosition | ( |  | ) |

Gets Current Mouse Position.

Returns
  Returns a string with the current mouse cursor coordinates formatted as y\

Integer getRenderGroupMask | ( |  | ) |

Gets the group mask which controls what is rendered.

Returns
  The bit mask corresponding to the groups which are to be rendered

Integer getRenderLayerMask | ( |  | ) |

Gets the layer mask which controls what is rendered.

Returns
  The bit mask corresponding to the layers which are to be rendered

String getScene | ( |  | ) |

Returns the Scene associated with this window.

Returns
  Returns the scene ID as a string

Float getTargetCameraAngle | ( |  | ) |

Gets the target camera angle.

Returns
  The target camera angle in degrees.

String getTargetCameraArea | ( |  | ) |

Get the target camera Area.

Returns
  The camera area formatted as y1 x2 y2\

String getTargetCameraPosition | ( |  | ) |

Get the target camera position.

Returns
  The target camera position.

String getTargetCameraSize | ( |  | ) |

Get the target camera size.

Returns
  The target camera width and height.

Float getTargetCameraZoom | ( |  | ) |

Get the target camera Zoom.

Returns
  The current camera zoom.

Boolean getUseBackgroundColor | ( |  | ... | ) |

Gets whether the scene background color is in use or not.

Returns
  Whether the scene background color is in use or not.

Boolean getUseObjectInputEvents | ( |  | ) |

Gets whether input events are passed onto scene objects or not.

Returns
  Whether input events are passed onto scene objects or not..

Boolean getUseWindowInputEvents | ( |  | ) |

Gets whether input events are monitored by the window or not.

Returns
  Whether input events are monitored by the window or not.

String getWindowExtents | ( |  | ) |

Fetch Window Extents (Position/Size).

Returns
  Returns the window dimensions as a string formatted as follows: <position.x> <position.y> <width> <height>

String getWindowPoint | ( | X/ | Y | ) |

Returns Window coordinate of World coordinate.

Parameters

  x,y | The coordinates in world coordinates you wish to convert to window coordinates. Accepts either (x,y) or ( y\

Returns
  Returns the desired window coordinates as a string formatted as y\

String getWorldPoint | ( | X/ | Y | ) |

Returns World coordinate of Window coordinate.

Parameters

  x,y | The coordinates in window coordinates you wish to convert to world coordinates. Accepts either (x,y) or ( y\

Returns
  Returns the desired world coordinates as a string formatted as y\

void mount | ( | sceneObject |  | ) |

Mounts the camera onto the specified object.

Parameters

  sceneObject | The scene object to mount the camera to.
  offsetX | / offsetY The offset from the objects position to mount the camera to. Optional: Defaults to no offset.
  mountForce | The force to use to keep the camera mounted to the object. Zero is a rigid mount. Optional: Defaults to zero.
  sendToMount | Whether to immediately move the camera to the objects position or not. Optional: Defaults to true.
  mountAngle | Whether to mount the cameras angle to the objects angle or not. Optional: Defaults to false.

Returns
  No return value

Boolean removeInputListener | ( | inputListener |  | ) |

Removes an object from being an input listener.

Parameters

  inputListener | The object to remove as an input listener.

Returns
  Whether the object was removed as an input event listener or not.

void resetScene | ( |  | ) |

Detaches the window from any Scene Object.

Returns
  No return value

void setBackgroundColor | ( | float | red,
|  | float | green,
|  | float | blue
| ) |  |

or ( stockColorName ) - Sets the background color for the scene.

Parameters

  red | The red value.
  green | The green value.
  blue | The blue value.
  alpha | The alpha value.

Returns
  No return Value.

void setCameraAngle | ( | angle |  | ) |

Sets the current camera angle.

Parameters

  angle | The current camera angle in degrees.

Returns
  No return value.

void setCameraArea | ( | x1/y1/x2/ | y2 | ) |

Set the current camera area.

Parameters

  x1,y1,x2,y2 | The coordinates of the minimum and maximum points (top left, bottom right) The input can be formatted as either y1 x2 y2\, y1, x2 y2\, , y1, x2, y2\

Returns
  No return value.

void setCameraInterpolationMode | ( | interpolationMode |  | ) |

Set camera interpolation mode.

Returns
  No return value.

void setCameraInterpolationTime | ( | interpolationTime |  | ) |

Set camera interpolation time.

Returns
  No return value

void setCameraPosition | ( | x | ,
|  | y |
| ) |  |

Set the current camera position.

Parameters

  X | Position along the X axis.
  Y | Position along the Y axis.

Returns
  No return value.

void setCameraSize | ( | width | ,
|  | height |
| ) |  |

Set the current camera position.

Parameters

  width | Size along the X axis.
  height | Size along the Y axis.

Returns
  No return value.

void setCameraZoom | ( | zoomFactor |  | ) |

Set the current camera Zoom Factor.

Parameters

  zoomFactor | A float value representing the zoom factor

Returns
  No return value.

void setLockMouse | ( | bool | lockSet | ) |

Sets the window mouse-lock status.

Returns
  No return value.

void setMousePosition | ( | x/ | y | ) |

Sets Current Mouse Position.

Parameters

  x,y | The coordinates to set the mouse cursor. Accepts either (x,y) or ( y\

void setObjectInputEventFilter | ( | groupMask | ,
|  | layerMask |
| ) |  |

Sets input filter for input events.

void setObjectInputEventGroupFilter | ( | groups | $ | ) |

Sets the input events group filter.

Parameters

  List | of groups to filter input events with.

Returns
  No return value.

void setObjectInputEventInvisibleFilter | ( | bool | useInvisibleFilter | ) |

Sets whether invisible objects should be filtered for input events or not.

void setObjectInputEventLayerFilter | ( | layers | $ | ) |

Sets the input events layer filter.

Parameters

  The | list of layers to filter input events with.

Returns
  No return value.

void setRenderGroups | ( | groups | $ | ) |

Sets the render group(s).

Parameters

  groups | The list of groups you wish to set.

Returns
  No return value.

void setRenderLayers | ( | layers | $ | ) |

Sets the render layers(s).

Parameters

  The | layer numbers you wish to set.

Returns
  No return value.

void setRenderMasks | ( | layerMask | ,
|  | groupMask |
| ) |  |

Sets the layer/group mask which control what is rendered.

Parameters

  layermask | The bitmask for setting the layers to render
  groupmask | The bitmask for setting the groups to render

Returns
  No return value.

void setScene | ( | Scene |  | ) |

Associates Scene Object.

Parameters

  Scene | The scene ID or name.

Returns
  No return value.

void setTargetCameraAngle | ( | angle |  | ) |

Sets the target camera angle.

Parameters

  angle | The target camera angle in degrees.

Returns
  No return value.

void setTargetCameraArea | ( | x1/y1/x2/ | y2 | ) |

Set the target camera area.

Parameters

  x1 | / y1 Coordinates of the upper left corner of the target area.
  x2 | / y2 Coordinates of the lower right corner of the target area.

Returns
  No return value.

void setTargetCameraPosition | ( | x | ,
|  | y |
| ) |  |

Set the target camera position.

Parameters

  X | Position along the X axis.
  Y | Position along the Y axis.

Returns
  No return value.

void setTargetCameraSize | ( | width | ,
|  | height |
| ) |  |

Set the target camera position.

Parameters

  width | Size along the X axis.
  height | Size along the Y axis.

Returns
  No return value.

void setTargetCameraZoom | ( | zoomFactor |  | ) |

Set the target camera Zoom Factor.

Returns
  No return value.

void setUseBackgroundColor | ( |  | ... | ) |

Sets whether to use the scene background color or not.

Parameters

  useBackgroundColor | Whether to use the scene background color or not.

Returns
  No return value.

void setUseObjectInputEvents | ( | inputStatus |  | ) |

Sets whether input events are passed onto scene objects or not.

Parameters

  mouseStatus | Whether input events are passed onto scene objects or not.

void setUseWindowInputEvents | ( | inputStatus |  | ) |

Sets whether input events are monitored by the window or not.

Parameters

  inputStatus | Whether input events are processed by the window or not.

Returns
  No return value.

void setViewLimitOff | ( |  | ) |

Set View Limit Off.

Returns
  No return value

void setViewLimitOn | ( |  | ) |

Set View Limit On.

Returns
  No return value

void startCameraMove | ( |  | ) |

Start Camera Move.

Returns
  No return value.

void startCameraShake | ( | shakeMagnitude | ,
|  | time |
| ) |  |

Starts the camera shaking.

Parameters

  shakeMagnitude | The intensity of the shaking
  time | The length of the shake

Returns
  No return value

void stopCameraMove | ( |  | ) |

Stops current camera movement

Returns
  No return value.

void stopCameraShake | ( |  | ) |

Stops the camera shaking.

Returns
  No return value

void undoCameraMove | ( |  | ) |

Reverses previous camera movement.

Returns
  No return value.