camera_info¶
- class janim.camera.camera_info.CameraInfo(scaled_factor: float, fov: float, center: ndarray, horizontal_vect: ndarray, vertical_vect: ndarray)¶
Bases:
objectCamera properties
Can be obtained via
info- scaled_factor: float¶
The scaling ratio of the camera compared to the default size; the larger the viewport, the larger this value, and vice versa
- fov: float¶
The field of view angle of the camera in the vertical direction
- center: ndarray¶
The center of the camera frame (the origin in the default position)
- horizontal_vect: ndarray¶
The horizontal vector of the camera, pointing from left to right in the view
- vertical_vect: ndarray¶
The vertical vector of the camera, pointing from bottom to top in the view
- horizontal_dist: float¶
The width of the camera frame in the horizontal direction
- vertical_dist: float¶
The width of the camera frame in the vertical direction
- distance_from_plane: float¶
The distance from the camera observation point to the frame
- fixed_distance_from_plane: float¶
The distance from the camera observation point to the frame at default size
- camera_location: ndarray¶
The position of the camera observation point
- view_matrix: ndarray¶
View matrix
- proj_matrix: ndarray¶
Projection matrix
- proj_view_matrix: ndarray¶
The composite of projection matrix and view matrix
- frame_radius: ndarray¶
The radius (half of the width) of the camera frame in both horizontal and vertical directions
- property frame_size: tuple[float, float]¶
The width of the camera frame in both horizontal and vertical directions
- property camera_axis: ndarray¶
The central axis of the camera, i.e., the opposite direction of the camera orientation, a vector pointing from the center of the frame to the observation point
- map_points(points: VectArray) ndarray¶
Map points in space to GL coordinates (
-1~1) of the camera frameReturns a sequence of 2D coordinates
- map_points_with_depth(points: VectArray) ndarray¶
Map points in space to GL coordinates (
-1~1) of the camera frameReturns a sequence of 3D coordinates. Compared to
map_points(), the last component contains depth information
- map_fixed_in_frame_points(points: VectArray) ndarray¶
Map points in space to GL coordinates (
-1~1) of the default camera frameReturns a sequence of 2D coordinates
- map_fixed_in_frame_points_with_depth(points: VectArray) ndarray¶
Map points in space to GL coordinates (
-1~1) of the default camera frameReturns a sequence of 3D coordinates. Compared to
map_fixed_in_frame_points(), the last component contains depth information