camera_info¶
- class janim.camera.camera_info.CameraInfo(scaled_factor: float, fov: float, center: ndarray, horizontal_vect: ndarray, vertical_vect: ndarray)¶
基类:
object摄像机属性
可以通过
info得到- scaled_factor: float¶
摄像机相比默认尺寸的缩放比率,视野越大,该值越大,反之同理
- fov: float¶
摄像机在竖直方向的视场角
- center: ndarray¶
摄像机取景框的中心(默认位置下即为原点)
- horizontal_vect: ndarray¶
摄像机水平向量,在视野中从左指向右
- vertical_vect: ndarray¶
摄像机竖直向量,在视野中从下指向上
- horizontal_dist: float¶
摄像机取景框在水平方向的宽度
- vertical_dist: float¶
摄像机取景框在竖直方向的宽度
- distance_from_plane: float¶
摄像机观察点距离取景框的距离
- fixed_distance_from_plane: float¶
摄像机在默认尺寸下观察点距离取景框的距离
- camera_location: ndarray¶
摄像机观察点的位置
- view_matrix: ndarray¶
观察矩阵
- proj_matrix: ndarray¶
投影矩阵
- proj_view_matrix: ndarray¶
投影矩阵和观察矩阵的复合
- frame_radius: ndarray¶
摄像机取景框在水平与竖直方向上的半径(宽度的一半)
- property frame_size: tuple[float, float]¶
摄像机取景框在水平与竖直方向的宽度
- property camera_axis: ndarray¶
摄像机中心轴,即摄像机朝向的反方向,从取景框中心指向观察点的向量
- map_points(points: VectArray) ndarray¶
将空间中的点映射到摄像机取景框的 GL 坐标(
-1~1)中返回二维坐标序列
- map_points_with_depth(points: VectArray) ndarray¶
将空间中的点映射到摄像机取景框的 GL 坐标(
-1~1)中返回三维坐标序列,与
map_points()相比,最后一个分量带有深度信息
- map_fixed_in_frame_points(points: VectArray) ndarray¶
将空间中的点映射到默认摄像机取景框的 GL 坐标(
-1~1)中返回二维坐标序列
- map_fixed_in_frame_points_with_depth(points: VectArray) ndarray¶
将空间中的点映射到默认摄像机取景框的 GL 坐标(
-1~1)中返回三维坐标序列,与
map_fixed_in_frame_points()相比,最后一个分量带有深度信息