Camera

Sub SetCameraPosition(x, y, z)

Sets the absolute position of the camera in the scene.


Sub GetCameraPosition(ByRef x, ByRef y, ByRef z)

Gets the position of the camera.


Sub TranslateCamera(x, y, z)

Moves the camera relative to its current position


Sub SetCameraRotation(x, y, z)

Sets the rotation of the camera around each axis


Sub GetCameraRotation(ByRef x, ByRef y, ByRef z)

Gets the rotation of the camera on each axis


Sub RotateCamera(x, y, z)

Rotates the camera a given number of degrees from its current orientation


Sub SetCameraFOV(fov)

Sets the camera’s field of view

See also

GetCameraFOV()


Function GetCameraFOV()

Returns the field of view of the camera on the active canvas


Sub SetCameraAspectRatio(aspect)

Sets the aspect ratio for the active canvas camera


Function GetCameraAspectRatio()

Returns the camera aspect ratio for the active canvas


Sub SetCameraFarValue(zf)

Sets the distance to the camera far plane


Function GetCameraFarValue()

Returns the far plane of the camera on the active canvas


Sub SetCameraNearValue(zn)

Sets the distance of the camera near plane


Function GetCameraNearValue()

Returns the near plane of the camera on the active canvas


Sub SetProjectionMatrix(matA, projection_type)

Sets the camera projection matrix for the active canvas.

Possible values for projection_type:

  • PROJECTION_TYPE_ORTHOGRAPHIC
  • PROJECTION_TYPE_PERSPECTIVE

Sub GetProjectionMatrix(matA)

Gets the camera projection matrix for the active canvas.

Possible values for projection_type:

  • PROJECTION_TYPE_ORTHOGRAPHIC
  • PROJECTION_TYPE_PERSPECTIVE

Sub GetWorldToViewportPosition(x, y, z, ByRef x, ByRef y)

Get the 2D coordinates for the given 3D position on the active canvas.