Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QSSGRenderLight Struct Reference

#include <qssgrenderlight_p.h>

+ Inheritance diagram for QSSGRenderLight:
+ Collaboration diagram for QSSGRenderLight:

Public Types

enum class  DirtyFlag : quint8 { LightDirty = 0x1 }
 
using FlagT = std::underlying_type_t< DirtyFlag >
 
- Public Types inherited from QSSGRenderNode
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 : quint16 {
  Node = 0x10 , Light = 0x20 , Camera = 0x40 , Renderable = 0x80 ,
  Resource = 0x100 , Material = 0x200 , Texture = 0x400 , Extension = 0x800
}
 
enum class  Type : quint16 {
  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
}
 

Public Member Functions

 QSSGRenderLight (Type type=Type::DirectionalLight)
 
bool isEnabled () const
 
bool isDirty (DirtyFlag dirtyFlag=DirtyMask) const
 
void markDirty (DirtyFlag dirtyFlag)
 
void clearDirty (DirtyFlag dirtyFlag)
 
- Public Member Functions inherited from QSSGRenderNode
 QSSGRenderNode ()
 
 QSSGRenderNode (Type type)
 
 ~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 ()
 
bool calculateGlobalVariables ()
 
QSSGBounds3 getBounds (QSSGBufferManager &inManager, bool inIncludeChildren=true) const
 
QSSGBounds3 getChildBounds (QSSGBufferManager &inManager) const
 
QVector3D getGlobalPos () const
 
QVector3D getGlobalPivot () const
 
QVector3D getDirection () const
 
QVector3D getScalingCorrectDirection () const
 
void calculateMVPAndNormalMatrix (const QMatrix4x4 &inViewProjection, QMatrix4x4 &outMVP, QMatrix3x3 &outNormalMatrix) const
 
QMatrix3x3 calculateNormalMatrix () const
 
- Public Member Functions inherited from QSSGRenderGraphObject
Q_QUICK3D_PROFILE_ID QSSGRenderGraphObject (QSSGRenderGraphObject::Type inType)
 
virtual ~QSSGRenderGraphObject ()
 

Public Attributes

QSSGRenderNodem_scope
 
QVector3D m_diffuseColor
 
QVector3D m_specularColor
 
QVector3D m_ambientColor
 
float m_brightness
 
float m_constantFade
 
float m_linearFade
 
float m_quadraticFade
 
float m_coneAngle
 
float m_innerConeAngle
 
FlagT m_lightDirtyFlags = 0
 
bool m_castShadow
 
float m_shadowBias
 
float m_shadowFactor
 
quint32 m_shadowMapRes
 
float m_shadowMapFar
 
float m_shadowFilter
 
bool m_bakingEnabled
 
bool m_fullyBaked
 
- Public Attributes inherited from QSSGRenderNode
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
 
QSSGRenderNodeparent = nullptr
 
QSSGRenderNodenextSibling = nullptr
 
QSSGRenderNodepreviousSibling = nullptr
 
QSSGRenderNodeinstanceRoot = nullptr
 
quint32 dfsIndex = 0
 
ChildList children
 
QString debugObjectName
 
- Public Attributes inherited from QSSGRenderGraphObject
Type type
 

Static Public Attributes

static constexpr DirtyFlag DirtyMask { std::numeric_limits<FlagT>::max() }
 
- Static Public Attributes inherited from QSSGRenderNode
static constexpr QVector3D initScale { 1.0f, 1.0f, 1.0f }
 

Additional Inherited Members

- Static Public Member Functions inherited from QSSGRenderNode
static QMatrix4x4 calculateTransformMatrix (QVector3D position, QVector3D scale, QVector3D pivot, QQuaternion rotation)
 
static float signedSquared (float val)
 
- Static Public Member Functions inherited from QSSGRenderGraphObject
static Q_REQUIRED_RESULT constexpr bool isNodeType (Type type) Q_DECL_NOTHROW
 
static Q_REQUIRED_RESULT constexpr bool isLight (Type type) Q_DECL_NOTHROW
 
static Q_REQUIRED_RESULT constexpr bool isCamera (Type type) Q_DECL_NOTHROW
 
static Q_REQUIRED_RESULT constexpr bool isMaterial (Type type) Q_DECL_NOTHROW
 
static Q_REQUIRED_RESULT constexpr bool isTexture (Type type) Q_DECL_NOTHROW
 
static Q_REQUIRED_RESULT constexpr bool isRenderable (Type type) Q_DECL_NOTHROW
 
static Q_REQUIRED_RESULT constexpr bool isResource (Type type) Q_DECL_NOTHROW
 
static constexpr bool isExtension (Type type) noexcept
 
static Q_REQUIRED_RESULT constexpr bool hasGraphicsResources (Type type) Q_DECL_NOTHROW
 
static const char * asString (QSSGRenderGraphObject::Type type)
 
static QDebug debugPrintImpl (QDebug stream, QSSGRenderGraphObject::Type type)
 

Detailed Description

Definition at line 25 of file qssgrenderlight_p.h.

Member Typedef Documentation

◆ FlagT

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

Definition at line 31 of file qssgrenderlight_p.h.

Member Enumeration Documentation

◆ DirtyFlag

enum class QSSGRenderLight::DirtyFlag : quint8
strong
Enumerator
LightDirty 

Definition at line 27 of file qssgrenderlight_p.h.

Constructor & Destructor Documentation

◆ QSSGRenderLight()

QT_BEGIN_NAMESPACE QSSGRenderLight::QSSGRenderLight ( Type  type = Type::DirectionalLight)
explicit

Definition at line 9 of file qssgrenderlight.cpp.

References QSSGRenderGraphObject::isLight(), LightDirty, markDirty(), and Q_ASSERT.

+ Here is the call graph for this function:

Member Function Documentation

◆ clearDirty()

void QSSGRenderLight::clearDirty ( DirtyFlag  dirtyFlag)

Definition at line 38 of file qssgrenderlight.cpp.

References QSSGRenderNode::clearDirty(), m_lightDirtyFlags, and QSSGRenderNode::SubNodeDirty.

+ Here is the call graph for this function:

◆ isDirty()

bool QSSGRenderLight::isDirty ( DirtyFlag  dirtyFlag = DirtyMask) const
inline

Definition at line 66 of file qssgrenderlight_p.h.

References QSSGRenderNode::DirtyMask, and QSSGRenderNode::isDirty().

+ Here is the call graph for this function:

◆ isEnabled()

bool QSSGRenderLight::isEnabled ( ) const
inline

Definition at line 64 of file qssgrenderlight_p.h.

Referenced by maybeQueueNodeForRender().

+ Here is the caller graph for this function:

◆ markDirty()

void QSSGRenderLight::markDirty ( DirtyFlag  dirtyFlag)

Definition at line 32 of file qssgrenderlight.cpp.

References m_lightDirtyFlags, QSSGRenderNode::markDirty(), and QSSGRenderNode::SubNodeDirty.

Referenced by QSSGRenderLight(), and QQuick3DAbstractLight::updateSpatialNode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ DirtyMask

constexpr DirtyFlag QSSGRenderLight::DirtyMask { std::numeric_limits<FlagT>::max() }
staticconstexpr

Definition at line 33 of file qssgrenderlight_p.h.

◆ m_ambientColor

◆ m_bakingEnabled

bool QSSGRenderLight::m_bakingEnabled

Definition at line 58 of file qssgrenderlight_p.h.

Referenced by QQuick3DAbstractLight::updateSpatialNode().

◆ m_brightness

◆ m_castShadow

◆ m_coneAngle

◆ m_constantFade

◆ m_diffuseColor

◆ m_fullyBaked

◆ m_innerConeAngle

◆ m_lightDirtyFlags

FlagT QSSGRenderLight::m_lightDirtyFlags = 0

Definition at line 50 of file qssgrenderlight_p.h.

Referenced by clearDirty(), and markDirty().

◆ m_linearFade

◆ m_quadraticFade

◆ m_scope

QSSGRenderNode* QSSGRenderLight::m_scope

◆ m_shadowBias

float QSSGRenderLight::m_shadowBias

◆ m_shadowFactor

float QSSGRenderLight::m_shadowFactor

◆ m_shadowFilter

float QSSGRenderLight::m_shadowFilter

Definition at line 56 of file qssgrenderlight_p.h.

Referenced by QQuick3DAbstractLight::updateSpatialNode().

◆ m_shadowMapFar

◆ m_shadowMapRes

◆ m_specularColor

QVector3D QSSGRenderLight::m_specularColor

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