All Functions Modules Pages
camera 3D

Functions

CAM3D cam3d.new ()
 Makes a new camera. More...
 
NIL cam3d.position (CAM3D camera, TABLE pos)
 Changes the camera position. More...
 
NIL cam3d.rotation (CAM3D camera, TABLE rot)
 Changes the camera rotation. More...
 
NIL cam3d.eye (CAM3D camera, TABLE eye)
 Changes the camera's view. More...
 
NIL cam3d.up (CAM3D camera, TABLE up)
 Changes the camera's "up" view (this is a normalized vector pointing up). More...
 
NIL cam3d.set (CAM3D camera)
 Apply the changes to the 3D camera. More...
 

Detailed Description

Using the 3D camera.

Function Documentation

CAM3D cam3d.new ( )

Makes a new camera.

Returns
A cam3d object, ready to use.
NIL cam3d.position ( CAM3D  camera,
TABLE  pos 
)

Changes the camera position.

Parameters
cameraA 3D camera.
posA table with the position values for the 3 axes (x,y,z).
Returns
Nothing.
NIL cam3d.rotation ( CAM3D  camera,
TABLE  rot 
)

Changes the camera rotation.

Parameters
cameraA 3D camera.
rotA table with the rotation values for the 3 axes (x,y,z).
Note
This function rotates all the 3D scene from the origin {0,0,0}, unless the light sources, which won't move using this.
Returns
Nothing.
NIL cam3d.eye ( CAM3D  camera,
TABLE  eye 
)

Changes the camera's view.

Parameters
cameraA 3D camera.
eyeA table with the camera's view values for the 3 axes (x,y,z).
Returns
Nothing.
NIL cam3d.up ( CAM3D  camera,
TABLE  up 
)

Changes the camera's "up" view (this is a normalized vector pointing up).

Parameters
cameraA 3D camera.
upA table with the camera's "up" view values for the 3 axes (x,y,z).
Returns
Nothing.
NIL cam3d.set ( CAM3D  camera)

Apply the changes to the 3D camera.

Parameters
cameraA 3D camera.
Returns
Nothing.