FrustumCamera QML Type
定义带有自定义 frustum 的PerspectiveCamera 。更多
Import Statement: | import QtQuick3D |
Inherits: |
属性
详细说明
Camera 定义了如何将三维场景的内容投射到二维表面(如View3D )上。一个场景至少需要一个Camera 才能将其内容可视化。
可以像场景中其他空间Node 一样定位和旋转Camera 。Node 的位置和方向决定了Camera 在场景中的位置和朝向。Camera 的默认方向是向前矢量沿负 Z 轴指向,向上矢量沿正 Y 轴指向。
FrustumCamera 类型提供了一个PerspectiveCamera ,在这里可以自定义 frustum 边界。这对于创建不对称的挫形体非常有用。
下面的示例在场景中的 [0, 0, 100] 处创建了一个 FrustumCamera。near plane 放置在摄像机前方 100 个单位的原点处。挫面与近平面的交点由左下角位于 [-5, -5] 处、右上角位于 [5, 5] 处的矩形给出,一直到与far plane 相交为止, 位于摄像机 1000 个单位处的 [0, 0, -900] 处。
注: vertical field of view 角度是摄像机、near plane 之间的距离以及近平面top
和bottom
之间长度的乘积。
注: 如果上下或左右的值不对称,则球面的顶点会发生偏移,从而使摄像机偏离其位置。
FrustumCamera { position: Qt.vector3d(0, 0, 100) clipNear: 100 clipFar: 1000 top: 5 bottom: -5 left: -5 right: 5 }
另请参阅 PerspectiveCamera,OrthographicCamera, 和CustomCamera 。
属性文档
bottom : real |
bottom
的值指定near clip plane 的底部,相对于摄像机在本地坐标中的位置。
left : real |
left
值指定near clip plane 的左侧,相对于摄像机在本地坐标中的位置。
right : real |
right
值指定near clip plane 的右侧,相对于摄像机在本地坐标中的位置。
top : real |
top
值指定near clip plane 的顶部,相对于摄像机在本地坐标中的位置。
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.