Camera
- class Camera[source]
Bases:
object
Camera object for the default view.
- Parameters
- view: :class:`compas_view2.views.View`,
The parent view of the camera.
- fov: float, optional
The field-of-view of the camera in degrees.
- near: float, optional
Distance to the near clipping plane.
- far: float, optional
Distance to the far clipping plane.
- position: list[float], optional
The location the camera.
- target: list[float], optional
The target location the camera is aimed at. Default is None, in which case the origin of the world coordinate system is used.
- scale: float, optional
The scale factor for camera’s near, far and pan_delta. Default is 1.0.
Notes
Under construction…
- Attributes
- fovfloat
The field of view as an angler in degrees.
- nearfloat
The location of the “near” clipping plane.
- farfloat
The locaiton of the “far” clipping plane.
- position
compas_view2.scene.camera.Position
The location the camera.
- rotation
compas_view2.scene.camera.RotationEuler
The euler rotation of camera.
- target
compas_view2.scene.camera.Position
The viewing target. Default is the origin of the world coordinate system.
- distancefloat
The distance from the camera standpoint to the target.
- zoom_deltafloat
Size of one zoom increment.
- rotation_deltafloat
Size of one rotation increment.
- pan_deltafloat
Size of one pan increment.
- scalefloat
The scale factor for camera’s near, far and pan_delta.
Methods
Set the target of the camera, while keeping the current position.
Pan the camera based on current mouse movement.
Compute the projection matrix corresponding to the current camera settings.
Reset the position of the camera based current view type.
Rotate the camera based on current mouse movement.
Compute the view-world matrix corresponding to the current camera settings.
Zoom in or out.