BoundingVolume QML Type
可用于覆盖实体的边界体积。更多
Import Statement: | import Qt3D.Core 2.9 |
In C++: | QBoundingVolume |
Inherited By: | |
Status: | Deprecated |
属性
- implicitMaxPoint : vector3d
- implicitMinPoint : vector3d
- implicitPointsValid : bool
- maxPoint : vector3d
- minPoint : vector3d
- view : GeometryView
方法
- bool updateImplicitBounds()
详细说明
实体的边界体积可用于拾取或视图缩放等多种操作。它通常是通过遍历渲染的几何体来计算的。
当应用程序已知几何体的范围时,就可以使用 BoundingVolume,这样Qt 3D 就不必计算它了。
边界体积既可以以最小和最大范围坐标的形式提供,也可以以近似渲染网格的单独(通常更简单)几何体的形式提供。
使用最小和最大范围坐标时,在几何体的本地坐标系中,这些坐标被视为轴对齐包围盒的对角。
BoundingVolume 也可用于查询GeometryView 的计算边界体积。如果几何体发生变化,implicitMinPoint 和implicitMaxPoint 属性将被更新。请注意,这是在后台线程上异步完成的,因此在读取之前应检查implicitPointsValid 的值。
您可以通过调用updateImplicitBounds 来强制更新隐式扩展。这将阻塞调用线程,直到结果可用。
注: GeometryRenderer 继承了 BoundingVolume,因此也支持读取隐式边界或设置显式边界。
属性文档
implicitMaxPoint : vector3d |
* 持有根据指定视图计算出的边界卷的最大范围。
implicitMinPoint : vector3d |
* * 持有根据指定视图计算的边界卷的最小范围。
implicitPointsValid : bool |
* 如果已指定视图且隐式边界属性是最新的,则设置为 True。* *
另请参阅 updateImplicitBounds 。
maxPoint : vector3d |
* 用户指定的边界卷的最大范围。设置后(连同最小范围),内部将使用该值来避免根据几何体计算体积。
minPoint : vector3d |
* 用户指定边界体的最小范围。设置后(与最大范围一起),将在内部使用,以避免根据几何体计算体积。
view : GeometryView |
* 持有指向 QGeometryView 实例的指针,如果已设置,该指针将用于计算包围体。
方法文档
bool updateImplicitBounds() |
* 更新指定视图的隐式边界。如果计算成功,则返回true
,否则返回 false。* *
注意: 计算在调用线程中完成,对于大型网格可能会耗费大量时间。
© 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.