Module ncine.camera

The table containing camera related functions

Functions

ncine.camera.new () Constructs a camera object.
ncine.camera.delete (camera) Destroys a camera object and releases its memory
ncine.camera.get_projection_values (camera) Returns the projection values that are used to create the projection matrix
ncine.camera.get_view_values (camera) Returns the view values that are used to create the model matrix
ncine.camera.set_ortho_projection (camera, projection_values) Updates the projection matrix using the projection values from the table
ncine.camera.set_view (camera, view_values) Updates the model matrix using the view values from the table

Tables

cameraObj The light user data of a camera object
camera_projection_values A camera projection values table
camera_view_values A camera view values table


Functions

ncine.camera.new ()
Constructs a camera object.

Don’t forget to call ncine.camera.delete when you are done with it!

Returns:

    cameraObj A new camera object
ncine.camera.delete (camera)
Destroys a camera object and releases its memory

Parameters:

  • camera cameraObj The camera object to be destroyed
ncine.camera.get_projection_values (camera)
Returns the projection values that are used to create the projection matrix

Parameters:

Returns:

    camera_projection_values
ncine.camera.get_view_values (camera)
Returns the view values that are used to create the model matrix

Parameters:

Returns:

    camera_view_values
ncine.camera.set_ortho_projection (camera, projection_values)
Updates the projection matrix using the projection values from the table

Parameters:

  • camera cameraObj
  • projection_values camera_projection_values
ncine.camera.set_view (camera, view_values)
Updates the model matrix using the view values from the table

Parameters:

  • camera cameraObj
  • view_values camera_view_values

Tables

cameraObj
The light user data of a camera object
camera_projection_values
A camera projection values table

Fields:

  • left number
  • right number
  • top number
  • bottom number
camera_view_values
A camera view values table

Fields:

  • x number
  • y number
  • rotation number
  • scale number
generated by LDoc 1.5.0 Last updated 2024-12-18 15:08:56