QSSGModelHelpers Class
包含用于修改和设置模型可渲染对象数据的辅助函数的类。更多...
| Header: | #include <qssgrenderhelpers.h> |
| Since: | Qt 6.7 |
静态公共成员
| float | getGlobalOpacity(const QSSGFrameData &frameData, QSSGNodeId model) |
| float | getGlobalOpacity(const QSSGFrameData &frameData, QSSGNodeId model, QSSGPrepContextId prepId) |
| QMatrix4x4 | getGlobalTransform(const QSSGFrameData &frameData, QSSGNodeId model, QSSGPrepContextId prepId = {}) |
| float | getLocalOpacity(const QSSGFrameData &frameData, QSSGNodeId model) |
| QMatrix4x4 | getLocalTransform(const QSSGFrameData &frameData, QSSGNodeId model) |
| void | setGlobalOpacity(const QSSGFrameData &frameData, QSSGRenderablesId renderablesId, QSSGNodeId model, float opacity) |
| void | setGlobalTransform(const QSSGFrameData &frameData, QSSGRenderablesId renderablesId, QSSGNodeId model, const QMatrix4x4 &transform) |
| void | setModelMaterials(const QSSGFrameData &frameData, QSSGRenderablesId renderablesId, QSSGModelHelpers::MaterialList materials) |
| void | setModelMaterials(const QSSGFrameData &frameData, QSSGRenderablesId renderablesId, QSSGNodeId model, QSSGModelHelpers::MaterialList materials) |
成员函数文档
[static] float QSSGModelHelpers::getGlobalOpacity(const QSSGFrameData &frameData, QSSGNodeId model)
返回 返回model 的全局不透明度。
frameData
[static] float QSSGModelHelpers::getGlobalOpacity(const QSSGFrameData &frameData, QSSGNodeId model, QSSGPrepContextId prepId)
返回 返回在prepId 上下文中model 的全局不透明度。默认情况下,prep context 参数为 QSSGPrepContextId::Uninitialized,此时返回模型的原始全局不透明度。
frameData
另请参阅 QSSGRenderHelpers::createRenderables()。
[static] QMatrix4x4 QSSGModelHelpers::getGlobalTransform(const QSSGFrameData &frameData, QSSGNodeId model, QSSGPrepContextId prepId = {})
返回 返回model 在prepId 上下文中的全局变换。默认情况下,prep context 参数为 QSSGPrepContextId::Uninitialized,此时将返回模型的原始全局变换。
frameData
另请参阅 QSSGRenderHelpers::createRenderables()。
[static] float QSSGModelHelpers::getLocalOpacity(const QSSGFrameData &frameData, QSSGNodeId model)
返回 返回model 的本地不透明度。
frameData
[static] QMatrix4x4 QSSGModelHelpers::getLocalTransform(const QSSGFrameData &frameData, QSSGNodeId model)
返回 返回model 的本地变换。
frameData
[static] void QSSGModelHelpers::setGlobalOpacity(const QSSGFrameData &frameData, QSSGRenderablesId renderablesId, QSSGNodeId model, float opacity)
在renderablesId 上下文中,设置model 的全局不透明度。
frameData,opacity
另请参阅 QSSGRenderHelpers::createRenderables()。
[static] void QSSGModelHelpers::setGlobalTransform(const QSSGFrameData &frameData, QSSGRenderablesId renderablesId, QSSGNodeId model, const QMatrix4x4 &transform)
在renderablesId 上下文中,为model 设置全局变换。
frameData,transform
另请参阅 QSSGRenderHelpers::createRenderables()。
[static] void QSSGModelHelpers::setModelMaterials(const QSSGFrameData &frameData, QSSGRenderablesId renderablesId, QSSGModelHelpers::MaterialList materials)
一个便捷函数,用于将 `materials ` 应用于 `renderablesId` 集合中的所有模型。
frameData,renderablesId
另请参阅 QSSGRenderHelpers::createRenderables()。
[static] void QSSGModelHelpers::setModelMaterials(const QSSGFrameData &frameData, QSSGRenderablesId renderablesId, QSSGNodeId model, QSSGModelHelpers::MaterialList materials)
将“materials ”设置为在“model ”上使用。
子网格使用materials 列表中与其索引相对应的材质。如果材质数量少于子网格数量,则列表中的最后一种材质将用于后续的子网格。
frameData renderablesId
© 2026 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.