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
xposition of the camera - y number the
yposition of the camera - z number the
zposition of the camera
- x number the
- set_rotation(...)Source
Changes the rotation of the current camera
Parameters
- dx number the
xrotation of the camera - dy number the
yrotation of the camera - dz number the
zrotation of the camera
Or
- x number the quaternion vector
xposition - y number the quaternion vector
yposition - z number the quaternion vector
zposition - 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
xposition of the camera - y number the
yposition of the camera - y number the
zposition of the camera - dx number the
xrotation of the camera - dy number the
yrotation of the camera - dz number the
zrotation 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
xcoordinate of the camera - y number the
ycoordinate of the camera - z number the
zcoordinate of the camera - at_x number the
xcoordinate of the point the camera should look at - at_y number the
ycoordinate of the point the camera should look at - at_z number the
zcoordinate of the point the camera should look at - near_plane_offset? number allows you to offset the near plane by shifting the worlds
wby modifying the generated lookat matrix
- x number the