|
| PerspectiveCamera (float fov, float aspect, float near, float far) |
| 构造函数
|
|
property::Scalar & | fov () |
| 获取视野角度(可修改)
|
|
const property::Scalar & | fov () const |
| 获取视野角度(只读)
|
|
property::Scalar & | aspect () |
| 获取宽高比(可修改)
|
|
const property::Scalar & | aspect () const |
| 获取宽高比(只读)
|
|
property::Scalar & | near () |
| 获取近裁剪平面距离(可修改)
|
|
const property::Scalar & | near () const |
| 获取近裁剪平面距离(只读)
|
|
property::Scalar & | far () |
| 获取远裁剪平面距离(可修改)
|
|
const property::Scalar & | far () const |
| 获取远裁剪平面距离(只读)
|
|
PerspectiveCamera * | set_fov (float fov) |
| 设置视野角度
|
|
PerspectiveCamera * | set_aspect (float aspect) |
| 设置宽高比
|
|
PerspectiveCamera * | set_near (float near) |
| 设置近裁剪平面距离
|
|
PerspectiveCamera * | set_far (float far) |
| 设置远裁剪平面距离
|
|
const xcmath::mat< float_t, 4, 4 > & | projection_matrix () const override |
| 获取投影矩阵
|
|
bool_t | projection_should_update () const override |
| 检查投影矩阵是否需要更新
|
|
property::Vec< float_t, 3 > & | position () |
| 获取相机位置(可修改)
|
|
const property::Vec< float_t, 3 > & | position () const |
| 获取相机位置(只读)
|
|
property::Vec< float_t, 3 > & | target () |
| 获取相机目标点(可修改)
|
|
const property::Vec< float_t, 3 > & | target () const |
| 获取相机目标点(只读)
|
|
property::Vec< float_t, 3 > & | up () |
| 获取相机上方向(可修改)
|
|
const property::Vec< float_t, 3 > & | up () const |
| 获取相机上方向(只读)
|
|
property::Color & | background_color () |
| 获取背景颜色(可修改)
|
|
const property::Color & | background_color () const |
| 获取背景颜色(只读)
|
|
CameraType | type () const |
|
template<typename... Args>
requires (std::is_constructible_v<vec, Args...>) |
AbsCamera * | set_position (Args &&... args) |
| 设置相机位置
|
|
template<typename... Args>
requires (std::is_constructible_v<vec, Args...>) |
AbsCamera * | set_target (Args &&... args) |
| 设置相机目标点
|
|
template<typename... Args>
requires (std::is_constructible_v<vec, Args...>) |
AbsCamera * | set_up (Args &&... args) |
| 设置相机上方向
|
|
template<typename... Args>
requires (std::is_constructible_v<property::Color::data_t, Args...>) |
AbsCamera * | set_background_color (Args &&... args) |
| 设置背景颜色
|
|
const xcmath::mat< float_t, 4, 4 > & | view_matrix () const |
| 获取视图矩阵
|
|
| AbsCamera () |
| 默认构造函数
|
|
virtual | ~AbsCamera ()=default |
| 虚析构函数
|
|
bool_t | view_should_update () const |
| 检查视图矩阵是否需要更新
|
|
bool_t | should_update () const |
| 检查相机矩阵是否需要更新
|
|
const xcmath::mat< float_t, 4, 4 > & | pv_matrix () const |
| 获取投影视图矩阵(PV矩阵)
|
|
透视相机类
实现透视投影相机功能,继承自抽象相机基类。 透视相机模拟人眼视角,近大远小效果。
在文件 perspectivecamera.hpp 第 28 行定义.