Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QSSGRenderGeometry Class Reference

#include <qssgrendergeometry_p.h>

+ Inheritance diagram for QSSGRenderGeometry:
+ Collaboration diagram for QSSGRenderGeometry:

Classes

struct  Attribute
 
struct  TargetAttribute
 

Public Member Functions

 QSSGRenderGeometry ()
 
virtual ~QSSGRenderGeometry ()
 
const QByteArrayvertexBuffer () const
 
QByteArrayvertexBuffer ()
 
const QByteArrayindexBuffer () const
 
QByteArrayindexBuffer ()
 
int attributeCount () const
 
Attribute attribute (int idx) const
 
QSSGMesh::Mesh::DrawMode primitiveType () const
 
QVector3D boundsMin () const
 
QVector3D boundsMax () const
 
int stride () const
 
int targetStride () const
 
void setVertexData (const QByteArray &data)
 
void setIndexData (const QByteArray &data)
 
void setStride (int stride)
 
void setBounds (const QVector3D &min, const QVector3D &max)
 
void setPrimitiveType (QSSGMesh::Mesh::DrawMode type)
 
void addAttribute (QSSGMesh::RuntimeMeshData::Attribute::Semantic semantic, int offset, QSSGMesh::Mesh::ComponentType componentType)
 
void addAttribute (const Attribute &att)
 
void addSubset (quint32 offset, quint32 count, const QVector3D &boundsMin, const QVector3D &boundsMax, const QString &name={})
 
void clear ()
 
void clearAttributes ()
 
uint32_t generationId () const
 
const QSSGMesh::RuntimeMeshDatameshData () const
 
void clearVertexAndIndex ()
 
void clearTarget ()
 
void setTargetData (const QByteArray &data)
 
void addTargetAttribute (quint32 targetId, QSSGMesh::RuntimeMeshData::Attribute::Semantic semantic, int offset, int stride=0)
 
void addTargetAttribute (const TargetAttribute &att)
 
- Public Member Functions inherited from QSSGRenderGraphObject
Q_QUICK3D_PROFILE_ID QSSGRenderGraphObject (QSSGRenderGraphObject::Type inType)
 
virtual ~QSSGRenderGraphObject ()
 

Public Attributes

QString debugObjectName
 
- Public Attributes inherited from QSSGRenderGraphObject
Type type
 

Protected Member Functions

void markDirty ()
 

Protected Attributes

uint32_t m_generationId = 1
 
QSSGMesh::RuntimeMeshData m_meshData
 
QSSGBounds3 m_bounds
 

Additional Inherited Members

- 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
}
 
- 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 28 of file qssgrendergeometry_p.h.

Constructor & Destructor Documentation

◆ QSSGRenderGeometry()

QSSGRenderGeometry::QSSGRenderGeometry ( )
explicit

Definition at line 8 of file qssgrendergeometry.cpp.

◆ ~QSSGRenderGeometry()

QSSGRenderGeometry::~QSSGRenderGeometry ( )
virtual

Definition at line 13 of file qssgrendergeometry.cpp.

Member Function Documentation

◆ addAttribute() [1/2]

void QSSGRenderGeometry::addAttribute ( const Attribute att)

Definition at line 83 of file qssgrendergeometry.cpp.

References QSSGRenderGeometry::Attribute::componentType, QSSGMesh::RuntimeMeshData::m_attributeCount, QSSGMesh::RuntimeMeshData::m_attributes, m_meshData, markDirty(), QSSGMesh::RuntimeMeshData::MAX_ATTRIBUTES, QSSGRenderGeometry::Attribute::offset, qWarning, and QSSGRenderGeometry::Attribute::semantic.

+ Here is the call graph for this function:

◆ addAttribute() [2/2]

void QSSGRenderGeometry::addAttribute ( QSSGMesh::RuntimeMeshData::Attribute::Semantic  semantic,
int  offset,
QSSGMesh::Mesh::ComponentType  componentType 
)

Definition at line 72 of file qssgrendergeometry.cpp.

References addAttribute(), QSSGRenderGeometry::Attribute::componentType, QSSGRenderGeometry::Attribute::offset, and QSSGRenderGeometry::Attribute::semantic.

Referenced by addAttribute(), and QQuick3DGeometry::updateSpatialNode().

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

◆ addSubset()

void QSSGRenderGeometry::addSubset ( quint32  offset,
quint32  count,
const QVector3D boundsMin,
const QVector3D boundsMax,
const QString name = {} 
)

Definition at line 129 of file qssgrendergeometry.cpp.

References boundsMax(), boundsMin(), m_meshData, and QSSGMesh::RuntimeMeshData::m_subsets.

Referenced by QQuick3DGeometry::updateSpatialNode().

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

◆ addTargetAttribute() [1/2]

◆ addTargetAttribute() [2/2]

void QSSGRenderGeometry::addTargetAttribute ( quint32  targetId,
QSSGMesh::RuntimeMeshData::Attribute::Semantic  semantic,
int  offset,
int  stride = 0 
)

Definition at line 99 of file qssgrendergeometry.cpp.

References addTargetAttribute(), QSSGRenderGeometry::TargetAttribute::attr, QSSGRenderGeometry::Attribute::offset, QSSGRenderGeometry::Attribute::semantic, QSSGRenderGeometry::TargetAttribute::stride, stride(), and QSSGRenderGeometry::TargetAttribute::targetId.

Referenced by addTargetAttribute(), and QQuick3DGeometry::updateSpatialNode().

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

◆ attribute()

QSSGRenderGeometry::Attribute QSSGRenderGeometry::attribute ( int  idx) const

Definition at line 62 of file qssgrendergeometry.cpp.

References QSSGRenderGeometry::Attribute::componentType, QSSGMesh::RuntimeMeshData::m_attributes, m_meshData, QSSGRenderGeometry::Attribute::offset, and QSSGRenderGeometry::Attribute::semantic.

Referenced by QSSGBufferManager::loadMeshBVH().

+ Here is the caller graph for this function:

◆ attributeCount()

int QSSGRenderGeometry::attributeCount ( ) const

Definition at line 37 of file qssgrendergeometry.cpp.

References QSSGMesh::RuntimeMeshData::m_attributeCount, and m_meshData.

Referenced by QSSGBufferManager::loadMeshBVH().

+ Here is the caller graph for this function:

◆ boundsMax()

QVector3D QSSGRenderGeometry::boundsMax ( ) const

Definition at line 47 of file qssgrendergeometry.cpp.

References m_bounds, and QSSGBounds3::maximum.

Referenced by addSubset().

+ Here is the caller graph for this function:

◆ boundsMin()

QVector3D QSSGRenderGeometry::boundsMin ( ) const

Definition at line 42 of file qssgrendergeometry.cpp.

References m_bounds, and QSSGBounds3::minimum.

Referenced by addSubset().

+ Here is the caller graph for this function:

◆ clear()

void QSSGRenderGeometry::clear ( )

Definition at line 152 of file qssgrendergeometry.cpp.

References QSSGMesh::RuntimeMeshData::clearTarget(), QSSGMesh::RuntimeMeshData::clearVertexAndIndex(), m_bounds, m_meshData, markDirty(), and QSSGBounds3::setEmpty().

+ Here is the call graph for this function:

◆ clearAttributes()

void QSSGRenderGeometry::clearAttributes ( )

◆ clearTarget()

void QSSGRenderGeometry::clearTarget ( )

Definition at line 168 of file qssgrendergeometry.cpp.

References QSSGMesh::RuntimeMeshData::clearTarget(), m_meshData, and markDirty().

Referenced by QQuick3DGeometry::updateSpatialNode().

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

◆ clearVertexAndIndex()

void QSSGRenderGeometry::clearVertexAndIndex ( )

Definition at line 160 of file qssgrendergeometry.cpp.

References QSSGMesh::RuntimeMeshData::clearVertexAndIndex(), m_bounds, m_meshData, markDirty(), and QSSGBounds3::setEmpty().

Referenced by QQuick3DGeometry::updateSpatialNode().

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

◆ generationId()

uint32_t QSSGRenderGeometry::generationId ( ) const

Definition at line 179 of file qssgrendergeometry.cpp.

References m_generationId.

◆ indexBuffer() [1/2]

QByteArray & QSSGRenderGeometry::indexBuffer ( )

Definition at line 32 of file qssgrendergeometry.cpp.

References QSSGMesh::RuntimeMeshData::m_indexBuffer, and m_meshData.

◆ indexBuffer() [2/2]

const QByteArray & QSSGRenderGeometry::indexBuffer ( ) const

Definition at line 27 of file qssgrendergeometry.cpp.

References QSSGMesh::RuntimeMeshData::m_indexBuffer, and m_meshData.

Referenced by QSSGBufferManager::loadMeshBVH().

+ Here is the caller graph for this function:

◆ markDirty()

void QSSGRenderGeometry::markDirty ( )
protected

Definition at line 207 of file qssgrendergeometry.cpp.

References m_generationId.

Referenced by addAttribute(), addTargetAttribute(), clear(), clearTarget(), clearVertexAndIndex(), setBounds(), setIndexData(), setPrimitiveType(), setStride(), setTargetData(), and setVertexData().

+ Here is the caller graph for this function:

◆ meshData()

const QSSGMesh::RuntimeMeshData & QSSGRenderGeometry::meshData ( ) const

Definition at line 184 of file qssgrendergeometry.cpp.

References m_meshData.

Referenced by QSSGBufferManager::loadMeshData().

+ Here is the caller graph for this function:

◆ primitiveType()

QSSGMesh::Mesh::DrawMode QSSGRenderGeometry::primitiveType ( ) const

Definition at line 57 of file qssgrendergeometry.cpp.

References m_meshData, and QSSGMesh::RuntimeMeshData::m_primitiveType.

Referenced by QSSGBufferManager::loadMeshBVH().

+ Here is the caller graph for this function:

◆ setBounds()

void QSSGRenderGeometry::setBounds ( const QVector3D min,
const QVector3D max 
)

Definition at line 146 of file qssgrendergeometry.cpp.

References m_bounds, and markDirty().

Referenced by QQuick3DGeometry::updateSpatialNode().

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

◆ setIndexData()

void QSSGRenderGeometry::setIndexData ( const QByteArray data)

Definition at line 195 of file qssgrendergeometry.cpp.

References QSSGMesh::RuntimeMeshData::m_indexBuffer, m_meshData, and markDirty().

Referenced by QQuick3DGeometry::updateSpatialNode().

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

◆ setPrimitiveType()

void QSSGRenderGeometry::setPrimitiveType ( QSSGMesh::Mesh::DrawMode  type)

Definition at line 140 of file qssgrendergeometry.cpp.

References m_meshData, QSSGMesh::RuntimeMeshData::m_primitiveType, markDirty(), and QSSGRenderGraphObject::type.

Referenced by QQuick3DGeometry::updateSpatialNode().

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

◆ setStride()

void QSSGRenderGeometry::setStride ( int  stride)

Definition at line 134 of file qssgrendergeometry.cpp.

References m_meshData, QSSGMesh::RuntimeMeshData::m_stride, markDirty(), and stride().

Referenced by QQuick3DGeometry::updateSpatialNode().

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

◆ setTargetData()

void QSSGRenderGeometry::setTargetData ( const QByteArray data)

Definition at line 201 of file qssgrendergeometry.cpp.

References m_meshData, QSSGMesh::RuntimeMeshData::m_targetBuffer, and markDirty().

Referenced by QQuick3DGeometry::updateSpatialNode().

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

◆ setVertexData()

void QSSGRenderGeometry::setVertexData ( const QByteArray data)

Definition at line 189 of file qssgrendergeometry.cpp.

References m_meshData, QSSGMesh::RuntimeMeshData::m_vertexBuffer, and markDirty().

Referenced by QQuick3DGeometry::updateSpatialNode().

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

◆ stride()

int QSSGRenderGeometry::stride ( ) const

Definition at line 52 of file qssgrendergeometry.cpp.

References m_meshData, and QSSGMesh::RuntimeMeshData::m_stride.

Referenced by addTargetAttribute(), QSSGBufferManager::loadMeshBVH(), and setStride().

+ Here is the caller graph for this function:

◆ targetStride()

int QSSGRenderGeometry::targetStride ( ) const

◆ vertexBuffer() [1/2]

QByteArray & QSSGRenderGeometry::vertexBuffer ( )

Definition at line 22 of file qssgrendergeometry.cpp.

References m_meshData, and QSSGMesh::RuntimeMeshData::m_vertexBuffer.

◆ vertexBuffer() [2/2]

const QByteArray & QSSGRenderGeometry::vertexBuffer ( ) const

Definition at line 17 of file qssgrendergeometry.cpp.

References m_meshData, and QSSGMesh::RuntimeMeshData::m_vertexBuffer.

Referenced by QSSGBufferManager::loadMeshBVH().

+ Here is the caller graph for this function:

Member Data Documentation

◆ debugObjectName

QString QSSGRenderGeometry::debugObjectName

Definition at line 75 of file qssgrendergeometry_p.h.

◆ m_bounds

QSSGBounds3 QSSGRenderGeometry::m_bounds
protected

Definition at line 93 of file qssgrendergeometry_p.h.

Referenced by boundsMax(), boundsMin(), clear(), clearVertexAndIndex(), and setBounds().

◆ m_generationId

uint32_t QSSGRenderGeometry::m_generationId = 1
protected

Definition at line 91 of file qssgrendergeometry_p.h.

Referenced by generationId(), and markDirty().

◆ m_meshData


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