Class containing helper functions for modifying and setting data for model renderables. 更多...
头: | #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 , QSSGNodeId model , QSSGModelHelpers::MaterialList materials ) |
void | setModelMaterials (const QSSGFrameData & frameData , QSSGRenderablesId renderablesId , QSSGModelHelpers::MaterialList materials ) |
[static]
float
QSSGModelHelpers::
getGlobalOpacity
(const
QSSGFrameData
&
frameData
,
QSSGNodeId
model
)
Returns Returns the global opacity for the model .
frameData
[static]
float
QSSGModelHelpers::
getGlobalOpacity
(const
QSSGFrameData
&
frameData
,
QSSGNodeId
model
,
QSSGPrepContextId
prepId
)
Returns Returns the global opacity for the model in context of the prepId . By default the prep context argument is QSSGPrepContextId::Uninitialized which returns the model's original global opacity.
frameData
另请参阅 QSSGRenderHelpers::createRenderables ().
[static]
QMatrix4x4
QSSGModelHelpers::
getGlobalTransform
(const
QSSGFrameData
&
frameData
,
QSSGNodeId
model
,
QSSGPrepContextId
prepId
= {})
Returns Returns the global transform for the model in context of the prepId . By default the prep context argument is QSSGPrepContextId::Uninitialized which returns the model's original global transform.
frameData
另请参阅 QSSGRenderHelpers::createRenderables ().
[static]
float
QSSGModelHelpers::
getLocalOpacity
(const
QSSGFrameData
&
frameData
,
QSSGNodeId
model
)
Returns Returns the local opacity for the model .
frameData
[static]
QMatrix4x4
QSSGModelHelpers::
getLocalTransform
(const
QSSGFrameData
&
frameData
,
QSSGNodeId
model
)
Returns Returns the local transform for the model .
frameData
[static]
void
QSSGModelHelpers::
setGlobalOpacity
(const
QSSGFrameData
&
frameData
,
QSSGRenderablesId
renderablesId
,
QSSGNodeId
model
,
float
opacity
)
Sets the global opacity for model in the context of the renderablesId .
frameData , opacity
另请参阅 QSSGRenderHelpers::createRenderables ().
[static]
void
QSSGModelHelpers::
setGlobalTransform
(const
QSSGFrameData
&
frameData
,
QSSGRenderablesId
renderablesId
,
QSSGNodeId
model
, const
QMatrix4x4
&
transform
)
Sets the global transform for model in the context of the renderablesId .
frameData , transform
另请参阅 QSSGRenderHelpers::createRenderables ().
[static]
void
QSSGModelHelpers::
setModelMaterials
(const
QSSGFrameData
&
frameData
,
QSSGRenderablesId
renderablesId
,
QSSGNodeId
model
,
QSSGModelHelpers::MaterialList
materials
)
设置 materials to be used on model .
注意: 就像 materials 在 model item, materials are applied in the same manner.
The sub-mesh uses a material from the materials list, corresponding to its index. If the number of materials is less than the sub-meshes, the last material in the list is used for subsequent sub-meshes.
frameData renderablesId
另请参阅 QSSGRenderHelpers::createRenderables ().
[static]
void
QSSGModelHelpers::
setModelMaterials
(const
QSSGFrameData
&
frameData
,
QSSGRenderablesId
renderablesId
,
QSSGModelHelpers::MaterialList
materials
)
Convenience function to apply materials to all models in the renderablesId set.
frameData , renderablesId
另请参阅 QSSGRenderHelpers::createRenderables ().