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>.
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
bool hasGraphicsResources () const noexcept
 
virtual Q_QUICK3D_PROFILE_ID_ ~QSSGRenderGraphObject ()
 

Public Attributes

QString debugObjectName
 
- Public Attributes inherited from QSSGRenderGraphObject
const Type type
 
FlagT flags { 0 }
 

Protected Member Functions

void markDirty ()
 
- Protected Member Functions inherited from QSSGRenderGraphObject
 QSSGRenderGraphObject (QSSGRenderGraphObject::Type inType)
 
 QSSGRenderGraphObject (QSSGRenderGraphObject::Type inType, FlagT inFlags)
 

Protected Attributes

uint32_t m_generationId = 1
 
QSSGMesh::RuntimeMeshData m_meshData
 
QSSGBounds3 m_bounds
 

Additional Inherited Members

- 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 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
 

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(), 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: