Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
|
#include <qssgrendernode_p.h>
Public Types | |
enum class | LocalState : quint8 { Active = 1 << 0 , Pickable = 1 << 1 } |
enum class | GlobalState : quint8 { Active = 1 << 2 , Pickable = 1 << 3 } |
enum class | DirtyFlag : quint32 { TransformDirty = 1 << 4 , OpacityDirty = 1 << 5 , ActiveDirty = 1 << 6 , PickableDirty = 1 << 7 , SubNodeDirty = 1 << 8 , GlobalValuesDirty = TransformDirty | OpacityDirty | ActiveDirty | PickableDirty , DirtyMask = GlobalValuesDirty | SubNodeDirty } |
using | FlagT = std::underlying_type_t<DirtyFlag> |
using | ChildList = QSSGInvasiveLinkedList<QSSGRenderNode, &QSSGRenderNode::previousSibling, &QSSGRenderNode::nextSibling> |
Public Types inherited from QSSGRenderGraphObject | |
enum | BaseType : quint32 { Node = 0x1000 , Light = 0x2000 , Camera = 0x4000 , Renderable = 0x8000 , Resource = 0x10000 , Material = 0x20000 , Texture = 0x40000 , Extension = 0x80000 , User = 0x80000000 } |
enum class | Type : quint32 { Unknown = 0 , Node = BaseType::Node , Layer , Joint , Skeleton , ImportScene , ReflectionProbe , DirectionalLight = BaseType::Light | BaseType::Node , PointLight , SpotLight , OrthographicCamera = BaseType::Camera | BaseType::Node , PerspectiveCamera , CustomFrustumCamera , CustomCamera , Model = BaseType::Renderable | BaseType::Node , Item2D , Particles , SceneEnvironment = BaseType::Resource , Effect , Geometry , TextureData , MorphTarget , ModelInstance , ModelBlendParticle , ResourceLoader , DefaultMaterial = BaseType::Material | BaseType::Resource , PrincipledMaterial , CustomMaterial , SpecularGlossyMaterial , Skin , Image2D = BaseType::Texture | BaseType::Resource , ImageCube , RenderExtension = BaseType::Extension } |
enum class | Flags : quint32 { HasGraphicsResources = 0x1 } |
using | TypeT = std::underlying_type_t<Type> |
using | FlagT = std::underlying_type_t<Flags> |
Static Public Member Functions | |
static QMatrix4x4 | calculateTransformMatrix (QVector3D position, QVector3D scale, QVector3D pivot, QQuaternion rotation) |
static void | calculateMVPAndNormalMatrix (const QMatrix4x4 &globalTransfor, const QMatrix4x4 &inViewProjection, QMatrix4x4 &outMVP, QMatrix3x3 &outNormalMatrix) |
static float | signedSquared (float val) |
Static Public Member Functions inherited from QSSGRenderGraphObject | |
static constexpr bool | isNodeType (Type type) noexcept |
static constexpr bool | isLight (Type type) noexcept |
static constexpr bool | isCamera (Type type) noexcept |
static constexpr bool | isMaterial (Type type) noexcept |
static constexpr bool | isTexture (Type type) noexcept |
static constexpr bool | isRenderable (Type type) noexcept |
static constexpr bool | isResource (Type type) noexcept |
static constexpr bool | isExtension (Type type) noexcept |
static constexpr bool | isUserType (Type type) noexcept |
Public Attributes | |
QVector3D | pivot |
int | staticFlags = 0 |
float | localOpacity = 1.0f |
FlagT | flags { FlagT(DirtyFlag::GlobalValuesDirty) | FlagT(LocalState::Active) } |
QMatrix4x4 | localTransform |
QMatrix4x4 | globalTransform |
QMatrix4x4 | localInstanceTransform |
QMatrix4x4 | globalInstanceTransform |
float | globalOpacity = 1.0f |
QSSGRenderNode * | parent = nullptr |
QSSGRenderNode * | nextSibling = nullptr |
QSSGRenderNode * | previousSibling = nullptr |
QSSGRenderNode * | instanceRoot = nullptr |
quint32 | dfsIndex = 0 |
ChildList | children |
QString | debugObjectName |
Public Attributes inherited from QSSGRenderGraphObject | |
const Type | type |
FlagT | flags { 0 } |
Static Public Attributes | |
static constexpr QVector3D | initScale { 1.0f, 1.0f, 1.0f } |
Additional Inherited Members | |
Protected Member Functions inherited from QSSGRenderGraphObject | |
QSSGRenderGraphObject (QSSGRenderGraphObject::Type inType) | |
QSSGRenderGraphObject (QSSGRenderGraphObject::Type inType, FlagT inFlags) | |
Definition at line 36 of file qssgrendernode_p.h.
using QSSGRenderNode::ChildList = QSSGInvasiveLinkedList<QSSGRenderNode, &QSSGRenderNode::previousSibling, &QSSGRenderNode::nextSibling> |
Definition at line 92 of file qssgrendernode_p.h.
using QSSGRenderNode::FlagT = std::underlying_type_t<DirtyFlag> |
Definition at line 61 of file qssgrendernode_p.h.
|
strong |
Enumerator | |
---|---|
TransformDirty | |
OpacityDirty | |
ActiveDirty | |
PickableDirty | |
SubNodeDirty | |
GlobalValuesDirty | |
DirtyMask |
Definition at line 50 of file qssgrendernode_p.h.
|
strong |
Enumerator | |
---|---|
Active | |
Pickable |
Definition at line 44 of file qssgrendernode_p.h.
|
strong |
Enumerator | |
---|---|
Active | |
Pickable |
Definition at line 38 of file qssgrendernode_p.h.
QT_BEGIN_NAMESPACE QSSGRenderNode::QSSGRenderNode | ( | ) |
Definition at line 18 of file qssgrendernode.cpp.
Referenced by QSSGRenderLayer::setImportScene().
|
explicit |
Definition at line 23 of file qssgrendernode.cpp.
References calculateTransformMatrix(), globalTransform, initScale, and localTransform.
|
overridedefault |
void QSSGRenderNode::addChild | ( | QSSGRenderNode & | inChild | ) |
Definition at line 164 of file qssgrendernode.cpp.
References children, GlobalValuesDirty, and QSSGInvasiveLinkedList< T, Previous, Next >::push_back().
Referenced by QQuick3DSceneManager::updateDirtySpatialNode().
bool QSSGRenderNode::calculateGlobalVariables | ( | ) |
Definition at line 72 of file qssgrendernode.cpp.
References Active, calculateGlobalVariables(), clearDirty(), QMatrix4x4::data(), getGlobalState(), getLocalState(), globalInstanceTransform, globalOpacity, globalTransform, GlobalValuesDirty, instanceRoot, isDirty(), localInstanceTransform, localOpacity, localTransform, parent, Pickable, QMatrix4x4::translate(), and QSSGRenderGraphObject::type.
Referenced by calculateGlobalVariables(), QSSGRenderCamera::calculateGlobalVariables(), and collectBoneTransforms().
|
static |
Definition at line 269 of file qssgrendernode.cpp.
References globalTransform, and QMatrix4x4::normalMatrix().
void QSSGRenderNode::calculateMVPAndNormalMatrix | ( | const QMatrix4x4 & | inViewProjection, |
QMatrix4x4 & | outMVP, | ||
QMatrix3x3 & | outNormalMatrix ) const |
Definition at line 263 of file qssgrendernode.cpp.
References calculateNormalMatrix(), and globalTransform.
Referenced by QSSGModelContext::QSSGModelContext().
QMatrix3x3 QSSGRenderNode::calculateNormalMatrix | ( | ) | const |
Definition at line 278 of file qssgrendernode.cpp.
References globalTransform, and QMatrix4x4::normalMatrix().
Referenced by calculateMVPAndNormalMatrix(), and QSSGRenderCamera::unproject().
|
static |
Definition at line 136 of file qssgrendernode.cpp.
References pivot, and position().
Referenced by QSSGRenderNode(), QQuick3DNodePrivate::calculateGlobalVariables(), calculateKinematicNodeTransform(), QSSGRenderCamera::lookAt(), setupCameraForShadowMap(), setupCubeReflectionCameras(), setupCubeShadowCameras(), and QQuick3DNode::updateSpatialNode().
Definition at line 44 of file qssgrendernode.cpp.
Referenced by calculateGlobalVariables(), QSSGRenderCamera::clearDirty(), and QSSGRenderLight::clearDirty().
QSSGBounds3 QSSGRenderNode::getBounds | ( | QSSGBufferManager & | inManager, |
bool | inIncludeChildren = true ) const |
Definition at line 202 of file qssgrendernode.cpp.
References getChildBounds(), and model.
QSSGBounds3 QSSGRenderNode::getChildBounds | ( | QSSGBufferManager & | inManager | ) | const |
Definition at line 216 of file qssgrendernode.cpp.
References child, and children.
Referenced by getBounds().
QVector3D QSSGRenderNode::getDirection | ( | ) | const |
Definition at line 231 of file qssgrendernode.cpp.
References QMatrix4x4::data(), and globalTransform.
Referenced by QSSGRenderCamera::unprojectToPosition().
QVector3D QSSGRenderNode::getGlobalPivot | ( | ) | const |
Definition at line 249 of file qssgrendernode.cpp.
References direction, QSSGUtils::mat44::getPosition(), globalTransform, localTransform, parent, and QSSGRenderGraphObject::type.
|
inline |
Definition at line 134 of file qssgrendernode_p.h.
Referenced by QSSGLayerRenderData::prepareReflectionProbesForRender().
|
inlineconstexpr |
Definition at line 108 of file qssgrendernode_p.h.
Referenced by calculateGlobalVariables().
|
inlineconstexpr |
Definition at line 107 of file qssgrendernode_p.h.
Referenced by calculateGlobalVariables(), and setState().
QVector3D QSSGRenderNode::getScalingCorrectDirection | ( | ) | const |
Definition at line 239 of file qssgrendernode.cpp.
References globalTransform, QMatrix4x4::normalMatrix(), and QSSGUtils::mat33::transform().
Referenced by QSSGRenderCamera::lookAt().
|
inlineconstexpr |
Definition at line 105 of file qssgrendernode_p.h.
Referenced by calculateGlobalVariables(), hasDirtyNonJointNodes(), QSSGRenderCamera::isDirty(), QSSGRenderLight::isDirty(), and updateDirtySkeletons().
Definition at line 32 of file qssgrendernode.cpp.
References children, and GlobalValuesDirty.
Referenced by QSSGRenderCamera::lookAt(), QSSGRenderCamera::markDirty(), QSSGRenderLight::markDirty(), setState(), and QQuick3DModel::updateSpatialNode().
void QSSGRenderNode::removeChild | ( | QSSGRenderNode & | inChild | ) |
Definition at line 177 of file qssgrendernode.cpp.
References children, GlobalValuesDirty, Q_ASSERT, Q_UNLIKELY, and QSSGInvasiveLinkedList< T, Previous, Next >::remove().
Referenced by removeFromGraph(), and QQuick3DSceneManager::updateDirtySpatialNode().
void QSSGRenderNode::removeFromGraph | ( | ) |
Definition at line 189 of file qssgrendernode.cpp.
References QSSGInvasiveLinkedList< T, Previous, Next >::begin(), children, QSSGInvasiveLinkedList< T, Previous, Next >::end(), it, parent, QSSGInvasiveLinkedList< T, Previous, Next >::remove(), and removeChild().
Referenced by QQuick3DSceneManager::cleanupNodes().
void QSSGRenderNode::setState | ( | LocalState | state, |
bool | on = true ) |
Definition at line 49 of file qssgrendernode.cpp.
References Active, ActiveDirty, getLocalState(), markDirty(), Pickable, PickableDirty, and state.
|
inlinestatic |
Definition at line 156 of file qssgrendernode_p.h.
References sign().
Referenced by QQuick3DParticleSpriteParticle::updateParticleNode(), and QQuick3DModel::updateSpatialNode().
ChildList QSSGRenderNode::children |
Definition at line 93 of file qssgrendernode_p.h.
Referenced by addChild(), collectBoneTransforms(), dfs(), getChildBounds(), hasDirtyNonJointNodes(), markDirty(), removeChild(), removeFromGraph(), QSSGRenderLayer::removeImportScene(), and QSSGRenderLayer::setImportScene().
QString QSSGRenderNode::debugObjectName |
Definition at line 95 of file qssgrendernode_p.h.
Referenced by QSSGRenderReflectionMap::addReflectionMapEntry().
quint32 QSSGRenderNode::dfsIndex = 0 |
Definition at line 90 of file qssgrendernode_p.h.
FlagT QSSGRenderNode::flags { FlagT(DirtyFlag::GlobalValuesDirty) | FlagT(LocalState::Active) } |
Definition at line 75 of file qssgrendernode_p.h.
QMatrix4x4 QSSGRenderNode::globalInstanceTransform |
Definition at line 80 of file qssgrendernode_p.h.
Referenced by calculateGlobalVariables().
float QSSGRenderNode::globalOpacity = 1.0f |
Definition at line 81 of file qssgrendernode_p.h.
Referenced by calculateGlobalVariables(), and QSSGLayerRenderData::prepareParticlesForRender().
QMatrix4x4 QSSGRenderNode::globalTransform |
Definition at line 78 of file qssgrendernode_p.h.
Referenced by QSSGRenderNode(), calculateGlobalVariables(), calculateMVPAndNormalMatrix(), calculateMVPAndNormalMatrix(), calculateNormalMatrix(), QSSGRenderCamera::calculateViewProjectionMatrix(), QSSGRenderCamera::calculateViewProjectionMatrix(), QSSGRenderCamera::calculateViewProjectionWithoutTranslation(), getDirection(), getGlobalPivot(), getScalingCorrectDirection(), QSSGRenderCamera::lookAt(), QSSGLayerRenderData::prepareParticlesForRender(), sortParticles(), and QSSGRenderCamera::unproject().
|
staticconstexpr |
Definition at line 63 of file qssgrendernode_p.h.
Referenced by QSSGRenderNode(), QSSGRenderCamera::lookAt(), setupCameraForShadowMap(), setupCubeReflectionCameras(), and setupCubeShadowCameras().
QSSGRenderNode* QSSGRenderNode::instanceRoot = nullptr |
Definition at line 87 of file qssgrendernode_p.h.
Referenced by calculateGlobalVariables(), and QQuick3DModel::updateSpatialNode().
QMatrix4x4 QSSGRenderNode::localInstanceTransform |
Definition at line 79 of file qssgrendernode_p.h.
Referenced by calculateGlobalVariables().
float QSSGRenderNode::localOpacity = 1.0f |
Definition at line 72 of file qssgrendernode_p.h.
Referenced by calculateGlobalVariables().
QMatrix4x4 QSSGRenderNode::localTransform |
Definition at line 77 of file qssgrendernode_p.h.
Referenced by QSSGRenderNode(), calculateGlobalVariables(), getGlobalPivot(), and QSSGRenderCamera::lookAt().
QSSGRenderNode* QSSGRenderNode::nextSibling = nullptr |
Definition at line 85 of file qssgrendernode_p.h.
QSSGRenderNode* QSSGRenderNode::parent = nullptr |
Definition at line 84 of file qssgrendernode_p.h.
Referenced by calculateGlobalVariables(), getGlobalPivot(), removeFromGraph(), scopeLight(), and QQuick3DSceneManager::updateDirtySpatialNode().
QVector3D QSSGRenderNode::pivot |
Definition at line 67 of file qssgrendernode_p.h.
Referenced by calculateTransformMatrix(), QSSGRenderCamera::lookAt(), and QQuick3DNode::updateSpatialNode().
QSSGRenderNode* QSSGRenderNode::previousSibling = nullptr |
Definition at line 86 of file qssgrendernode_p.h.
int QSSGRenderNode::staticFlags = 0 |
Definition at line 68 of file qssgrendernode_p.h.