c3d.camera
The camera module is used for working around with camera objects and the scenes camera
set_position(x, y, z) | Changes the position of the current camera |
---|---|
set_rotation(...) | Changes the rotation of the current camera |
make(x, y, y, dx, dy, dz) | Makes a new Camera object with the given parameters |
set(camera) | Sets the current camera to the given camera object |
get() | Returns the current camera object |
set_transform(transform) | Allows you to set a custom transform to the camera |
lookat(x, y, z, at_x, at_y, at_z [, near_plane_offset]) | Allows you to set the cameras rotation and position using 2 vectors. |
- set_position(x, y, z)Source
Changes the position of the current camera
Parameters
- x number the
x
position of the camera - y number the
y
position of the camera - z number the
z
position of the camera
- x number the
- set_rotation(...)Source
Changes the rotation of the current camera
Parameters
- dx number the
x
rotation of the camera - dy number the
y
rotation of the camera - dz number the
z
rotation of the camera
Or
- x number the quaternion vector
x
position - y number the quaternion vector
y
position - z number the quaternion vector
z
position - w number the rotation along the quaternion vector
- dx number the
- make(x, y, y, dx, dy, dz)Source
Makes a new Camera object with the given parameters
Parameters
- x number the
x
position of the camera - y number the
y
position of the camera - y number the
z
position of the camera - dx number the
x
rotation of the camera - dy number the
y
rotation of the camera - dz number the
z
rotation of the camera
Returns
- camera newly created camera_object
See also
- x number the
- set(camera)Source
Sets the current camera to the given camera object
Parameters
- camera the camera object
See also
- get()Source
Returns the current camera object
Returns
- Current camera object
See also
- set_transform(transform)Source
Allows you to set a custom transform to the camera
Parameters
- transform table the matrix to use as the camera transform
- lookat(x, y, z, at_x, at_y, at_z [, near_plane_offset])Source
Allows you to set the cameras rotation and position using 2 vectors. one indicating the position and second one along with the first one indicating rotation.
Parameters
- x number the
x
coordinate of the camera - y number the
y
coordinate of the camera - z number the
z
coordinate of the camera - at_x number the
x
coordinate of the point the camera should look at - at_y number the
y
coordinate of the point the camera should look at - at_z number the
z
coordinate of the point the camera should look at - near_plane_offset? number allows you to offset the near plane by shifting the worlds
w
by modifying the generated lookat matrix
- x number the