Camera
- class Camera[source]
Bases:
object
Camera object for the default view.
- Parameters:
- renderer
compas_viewer.components.renderer.Renderer
, The parent renderer of the camera.
- renderer
Notes
The camera is defined by the following parameters which can be found in:
compas_viewer.configurations.render_config.CameraConfig
:- fovfloat
The field of view as an angler in degrees.
- nearfloat
The location of the “near” clipping plane.
- farfloat
The location of the “far” clipping plane.
- position
compas_viewer.components.renderer.camera.Position
The location the camera.
- rotation
compas_viewer.components.renderer.camera.RotationEuler
The euler rotation of camera.
- target
compas_viewer.components.renderer.camera.Position
The viewing target. Default is the origin of the world coordinate system.
- distancefloat
The distance from the camera standpoint to the target.
- zoomdeltafloat
Size of one zoom increment.
- rotationdeltafloat
Size of one rotation increment.
- pan_deltafloat
Size of one pan increment.
- scalefloat
The scale factor for camera’s near, far and pan_delta.
- Attributes:
- config
compas_viewer.configurations.render_config.CameraConfig
- config
Methods
Construct an orthogonal projection matrix.
Pan the camera based on current mouse movement.
Construct a perspective projection matrix.
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.