Cameras¶
Perspective Camera¶
- class pydy.viz.camera.PerspectiveCamera(*args, **kwargs)[source]¶
Creates a perspective camera for use in a scene. The camera is inherited from
VisualizationFrame
, and thus behaves similarly. It can be attached to dynamics objects, hence we can get a moving camera. All the transformation matrix generation methods are applicable to aPerspectiveCamera
.- generate_scene_dict(**kwargs)[source]¶
This method generates information for a static visualization in the initial conditions, in the form of dictionary. This contains camera parameters followed by an init_orientation key.
Before calling this method, all the transformation matrix generation methods should be called, or it will give an error.
- Returns
- A dict with following Keys:
- name: name for the camera
- fov: Field of View value of the camera
- near: near value of the camera
- far: far value of the camera
- init_orientation: Initial orientation of the camera
Orthographic Camera¶
- class pydy.viz.camera.OrthoGraphicCamera(*args, **kwargs)[source]¶
Creates a orthographic camera for use in a scene. The camera is inherited from
VisualizationFrame
, and thus behaves similarly. It can be attached to dynamics objects, hence we can get a moving camera. All the transformation matrix generation methods are applicable to aOrthoGraphicCameraCamera
.- generate_scene_dict(**kwargs)[source]¶
This method generates information for a static visualization in the initial conditions, in the form of dictionary. This contains camera parameters followed by an init_orientation Key.
- Returns
- scene_dictdictionary
A dict with following Keys:
name: name for the camera
near: near value of the camera
far: far value of the camera
init_orientation: Initial orientation of the camera