class documentation
class Camera(engine.Camera):
Constructor: Camera(position, direction, plane, height, ...)
Store camera parameters for 3D rendering.
Methods
- set_position(
position) - Set the camera position.
- set_position(
- set_direction(
direction) - Set the camera view direction.
- set_direction(
- set_plane(
plane) - Set the camera projection plane.
- set_plane(
- set_height(
height) - Set the camera height.
- set_height(
- set_distance(
distance) - Set the camera projection distance.
- set_distance(
- set_perspective(
perspective) - Set the camera perspective mode.
- set_perspective(
- position_set(
x,y,z,integer) - Set the camera position with individual components.
- position_set(
- direction_set(
x,y,z,integer) - Set the camera view direction with individual components.
- direction_set(
- plane_set(
x,y,z,integer) - Set the camera projection plane with individual components.
- plane_set(
- __del__()
- Release the native camera resources.
| Parameters | |
| position | Camera position. Defaults to Vector(0, 0, 0). |
| direction | View direction. Defaults to Vector(1, 0, 0). |
| plane | Camera plane. Defaults to Vector(0, 0.66, 0). |
| height | Camera height. Defaults to 1.0. |
| distance | View distance. Defaults to 2.0. |
| perspective | Camera perspective type. Defaults to CAMERA_FIRST_PERSON. |
| Method | __init__ |
Initialize the Camera. |
| Method | __setattr__ |
Set a camera attribute, routing to the matching setter. |
| Instance Variable | CAMERA |
First-person camera perspective. |
| Instance Variable | CAMERA |
Third-person camera perspective. |
| Instance Variable | direction |
Camera view direction. Writable. |
| Instance Variable | distance |
Distance to the projection plane. Writable. |
| Instance Variable | height |
Camera height above the ground. Writable. |
| Instance Variable | perspective |
Camera perspective mode. Writable. |
| Instance Variable | plane |
Camera plane used for projection. Writable. |
| Instance Variable | position |
World-space camera position. Writable. |
def __init__(self, position=Vector( 0, 0, 0), direction=Vector( 1, 0, 0), plane=Vector( 0, 0.66, 0), height=1.0, distance=2.0, perspective=CAMERA_FIRST_PERSON):
¶
Initialize the Camera.
Override so users can pick the perspective.
| Parameters | |
position:Vector | Camera position. Defaults to Vector(0, 0, 0). |
direction:Vector | View direction. Defaults to Vector(1, 0, 0). |
plane:Vector | Camera plane. Defaults to Vector(0, 0.66, 0). |
height:float | Camera height. Defaults to 1.0. |
distance:float | View distance. Defaults to 2.0. |
perspective:int | Camera perspective type. Defaults to CAMERA_FIRST_PERSON. |