QSSGModelHelpers Class
包含用于修改和设置模型可呈现数据的辅助函数的类。更多
Header: | #include <QSSGModelHelpers> |
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)
返回 返回model 在prepId 上下文中的全局不透明度。默认情况下,预置上下文参数为 QSSGPrepContextId::Uninitialized,它会返回模型的原始全局不透明度。
frameData
另请参阅 QSSGRenderHelpers::createRenderables() 。
[static]
QMatrix4x4 QSSGModelHelpers::getGlobalTransform(const QSSGFrameData &frameData, QSSGNodeId model, QSSGPrepContextId prepId = {})
返回 返回model 在prepId 上下文中的全局变换。默认情况下,预置上下文参数是 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
© 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.