Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QSSGRenderNode Struct Reference

#include <qssgrendernode_p.h>

Inheritance diagram for QSSGRenderNode:
Collaboration diagram for QSSGRenderNode:

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 ,
  TagDirty = 1 << 8 , SubNodeDirty = 1 << 9 , 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 , Root , 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 , TextureProvider
}
enum class  Flags : quint32 { HasGraphicsResources = 0x1 }
using TypeT = std::underlying_type_t<Type>
using FlagT = std::underlying_type_t<Flags>

Public Member Functions

 QSSGRenderNode ()
 QSSGRenderNode (Type type, FlagT flags=0)
 ~QSSGRenderNode () override
void markDirty (DirtyFlag dirtyFlag)
void clearDirty (DirtyFlag dirtyFlag)
constexpr bool isDirty (DirtyFlag dirtyFlag=DirtyFlag::DirtyMask) const
void setState (LocalState state, bool on=true)
constexpr bool getLocalState (LocalState stateFlag) const
constexpr bool getGlobalState (GlobalState stateFlag) const
void addChild (QSSGRenderNode &inChild)
void removeChild (QSSGRenderNode &inChild)
void removeFromGraph ()
QSSGBounds3 getBounds (QSSGBufferManager &inManager, bool inIncludeChildren=true) const
QSSGBounds3 getChildBounds (QSSGBufferManager &inManager) const
Public Member Functions inherited from QSSGRenderGraphObject
bool hasGraphicsResources () const noexcept
virtual Q_QUICK3D_PROFILE_ID_ ~QSSGRenderGraphObject ()

Static Public Member Functions

static QMatrix4x4 calculateTransformMatrix (QVector3D position, QVector3D scale, QVector3D pivot, QQuaternion rotation)
static QVector3D getGlobalPos (const QMatrix4x4 &globalTransform)
static QVector3D getDirection (const QMatrix4x4 &globalTransform)
static QVector3D getScalingCorrectDirection (const QMatrix4x4 &globalTransform)
static void calculateMVP (const QMatrix4x4 &globalTransform, const QMatrix4x4 &inViewProjection, QMatrix4x4 &outMVP)
static void calculateNormalMatrix (const QMatrix4x4 &globalTransform, QMatrix3x3 &outNormalMatrix)
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
QSSGRenderRoot ** rootNodeRef = nullptr
QSSGRenderNodeparent = nullptr
QSSGRenderNodenextSibling = nullptr
QSSGRenderNodepreviousSibling = nullptr
QSSGRenderNodeinstanceRoot = nullptr
QSSGRenderNodeHandle h
QSSGRenderNodeTag tag
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)

Detailed Description

Definition at line 40 of file qssgrendernode_p.h.

Member Typedef Documentation

◆ ChildList

◆ FlagT

using QSSGRenderNode::FlagT = std::underlying_type_t<DirtyFlag>

Definition at line 66 of file qssgrendernode_p.h.

Member Enumeration Documentation

◆ DirtyFlag

enum class QSSGRenderNode::DirtyFlag : quint32
strong
Enumerator
TransformDirty 
OpacityDirty 
ActiveDirty 
PickableDirty 
TagDirty 
SubNodeDirty 
GlobalValuesDirty 
DirtyMask 

Definition at line 54 of file qssgrendernode_p.h.

◆ GlobalState

enum class QSSGRenderNode::GlobalState : quint8
strong
Enumerator
Active 
Pickable 

Definition at line 48 of file qssgrendernode_p.h.

◆ LocalState

enum class QSSGRenderNode::LocalState : quint8
strong
Enumerator
Active 
Pickable 

Definition at line 42 of file qssgrendernode_p.h.

Constructor & Destructor Documentation

◆ QSSGRenderNode() [1/2]

QT_BEGIN_NAMESPACE QSSGRenderNode::QSSGRenderNode ( )

Definition at line 21 of file qssgrendernode.cpp.

◆ QSSGRenderNode() [2/2]

QSSGRenderNode::QSSGRenderNode ( Type type,
FlagT flags = 0 )

◆ ~QSSGRenderNode()

QSSGRenderNode::~QSSGRenderNode ( )
overridedefault

Member Function Documentation

◆ addChild()

void QSSGRenderNode::addChild ( QSSGRenderNode & inChild)

Definition at line 101 of file qssgrendernode.cpp.

◆ calculateMVP()

void QSSGRenderNode::calculateMVP ( const QMatrix4x4 & globalTransform,
const QMatrix4x4 & inViewProjection,
QMatrix4x4 & outMVP )
static

Definition at line 205 of file qssgrendernode.cpp.

◆ calculateMVPAndNormalMatrix()

void QSSGRenderNode::calculateMVPAndNormalMatrix ( const QMatrix4x4 & globalTransfor,
const QMatrix4x4 & inViewProjection,
QMatrix4x4 & outMVP,
QMatrix3x3 & outNormalMatrix )
static

Definition at line 215 of file qssgrendernode.cpp.

◆ calculateNormalMatrix()

void QSSGRenderNode::calculateNormalMatrix ( const QMatrix4x4 & globalTransform,
QMatrix3x3 & outNormalMatrix )
static

Definition at line 210 of file qssgrendernode.cpp.

◆ calculateTransformMatrix()

QMatrix4x4 QSSGRenderNode::calculateTransformMatrix ( QVector3D position,
QVector3D scale,
QVector3D pivot,
QQuaternion rotation )
staticnodiscard

Definition at line 73 of file qssgrendernode.cpp.

◆ clearDirty()

void QSSGRenderNode::clearDirty ( DirtyFlag dirtyFlag)

Definition at line 47 of file qssgrendernode.cpp.

◆ getBounds()

QSSGBounds3 QSSGRenderNode::getBounds ( QSSGBufferManager & inManager,
bool inIncludeChildren = true ) const

Definition at line 158 of file qssgrendernode.cpp.

◆ getChildBounds()

QSSGBounds3 QSSGRenderNode::getChildBounds ( QSSGBufferManager & inManager) const

Definition at line 172 of file qssgrendernode.cpp.

◆ getDirection()

QVector3D QSSGRenderNode::getDirection ( const QMatrix4x4 & globalTransform)
staticnodiscard

Definition at line 187 of file qssgrendernode.cpp.

◆ getGlobalPos()

QVector3D QSSGRenderNode::getGlobalPos ( const QMatrix4x4 & globalTransform)
inlinestaticnodiscard

Definition at line 132 of file qssgrendernode_p.h.

◆ getGlobalState()

bool QSSGRenderNode::getGlobalState ( GlobalState stateFlag) const
inlinenodiscardconstexpr

Definition at line 111 of file qssgrendernode_p.h.

◆ getLocalState()

bool QSSGRenderNode::getLocalState ( LocalState stateFlag) const
inlinenodiscardconstexpr

Definition at line 110 of file qssgrendernode_p.h.

◆ getScalingCorrectDirection()

QVector3D QSSGRenderNode::getScalingCorrectDirection ( const QMatrix4x4 & globalTransform)
staticnodiscard

Definition at line 195 of file qssgrendernode.cpp.

◆ isDirty()

bool QSSGRenderNode::isDirty ( DirtyFlag dirtyFlag = DirtyFlag::DirtyMask) const
inlinenodiscardconstexpr

Definition at line 108 of file qssgrendernode_p.h.

◆ markDirty()

void QSSGRenderNode::markDirty ( DirtyFlag dirtyFlag)

Definition at line 35 of file qssgrendernode.cpp.

◆ removeChild()

void QSSGRenderNode::removeChild ( QSSGRenderNode & inChild)

Definition at line 128 of file qssgrendernode.cpp.

◆ removeFromGraph()

void QSSGRenderNode::removeFromGraph ( )

Definition at line 145 of file qssgrendernode.cpp.

◆ setState()

void QSSGRenderNode::setState ( LocalState state,
bool on = true )

Definition at line 52 of file qssgrendernode.cpp.

◆ signedSquared()

float QSSGRenderNode::signedSquared ( float val)
inlinestaticnodiscard

Definition at line 154 of file qssgrendernode_p.h.

Member Data Documentation

◆ children

ChildList QSSGRenderNode::children

Definition at line 96 of file qssgrendernode_p.h.

◆ debugObjectName

QString QSSGRenderNode::debugObjectName

Definition at line 98 of file qssgrendernode_p.h.

◆ flags

Definition at line 80 of file qssgrendernode_p.h.

◆ h

QSSGRenderNodeHandle QSSGRenderNode::h

Definition at line 92 of file qssgrendernode_p.h.

◆ initScale

QVector3D QSSGRenderNode::initScale { 1.0f, 1.0f, 1.0f }
staticconstexpr

Definition at line 68 of file qssgrendernode_p.h.

◆ instanceRoot

QSSGRenderNode* QSSGRenderNode::instanceRoot = nullptr

Definition at line 89 of file qssgrendernode_p.h.

◆ localOpacity

float QSSGRenderNode::localOpacity = 1.0f

Definition at line 77 of file qssgrendernode_p.h.

◆ localTransform

QMatrix4x4 QSSGRenderNode::localTransform

Definition at line 82 of file qssgrendernode_p.h.

◆ nextSibling

QSSGRenderNode* QSSGRenderNode::nextSibling = nullptr

Definition at line 87 of file qssgrendernode_p.h.

◆ parent

QSSGRenderNode* QSSGRenderNode::parent = nullptr

Definition at line 86 of file qssgrendernode_p.h.

◆ pivot

QVector3D QSSGRenderNode::pivot

Definition at line 72 of file qssgrendernode_p.h.

◆ previousSibling

QSSGRenderNode* QSSGRenderNode::previousSibling = nullptr

Definition at line 88 of file qssgrendernode_p.h.

◆ rootNodeRef

QSSGRenderRoot** QSSGRenderNode::rootNodeRef = nullptr

Definition at line 85 of file qssgrendernode_p.h.

◆ staticFlags

int QSSGRenderNode::staticFlags = 0

Definition at line 73 of file qssgrendernode_p.h.

◆ tag

QSSGRenderNodeTag QSSGRenderNode::tag

Definition at line 93 of file qssgrendernode_p.h.


The documentation for this struct was generated from the following files: