Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QSSGMesh::Mesh Class Reference

#include <qssgmesh_p.h>

+ Collaboration diagram for QSSGMesh::Mesh:

Classes

struct  IndexBuffer
 
struct  Lod
 
struct  Subset
 
struct  SubsetBounds
 
struct  TargetBuffer
 
struct  VertexBuffer
 
struct  VertexBufferEntry
 

Public Types

using DrawMode = QSSGRenderDrawMode
 
using Winding = QSSGRenderWinding
 
using ComponentType = QSSGRenderComponentType
 

Public Member Functions

VertexBuffer vertexBuffer () const
 
IndexBuffer indexBuffer () const
 
TargetBuffer targetBuffer () const
 
QVector< Subsetsubsets () const
 
bool isValid () const
 
DrawMode drawMode () const
 
Winding winding () const
 
quint32 save (QIODevice *device, quint32 id=0) const
 
bool hasLightmapUVChannel () const
 
bool createLightmapUVChannel (uint lightmapBaseResolution)
 

Static Public Member Functions

static Mesh loadMesh (QIODevice *device, quint32 id=0)
 
static QMap< quint32, MeshloadAll (QIODevice *device)
 
static Mesh fromAssetData (const QVector< AssetVertexEntry > &vbufEntries, const QByteArray &indexBufferData, ComponentType indexComponentType, const QVector< AssetMeshSubset > &subsets, quint32 numTargets=0, quint32 numTargetComps=0)
 
static Mesh fromRuntimeData (const RuntimeMeshData &data, QString *error)
 

Friends

struct MeshInternal
 

Detailed Description

Definition at line 38 of file qssgmesh_p.h.

Member Typedef Documentation

◆ ComponentType

◆ DrawMode

Definition at line 41 of file qssgmesh_p.h.

◆ Winding

Definition at line 42 of file qssgmesh_p.h.

Member Function Documentation

◆ createLightmapUVChannel()

◆ drawMode()

DrawMode QSSGMesh::Mesh::drawMode ( ) const
inline

Definition at line 118 of file qssgmesh_p.h.

Referenced by QSSGMeshBVHBuilder::buildTree().

+ Here is the caller graph for this function:

◆ fromAssetData()

Mesh QSSGMesh::Mesh::fromAssetData ( const QVector< AssetVertexEntry > &  vbufEntries,
const QByteArray indexBufferData,
ComponentType  indexComponentType,
const QVector< AssetMeshSubset > &  subsets,
quint32  numTargets = 0,
quint32  numTargetComps = 0 
)
static

◆ fromRuntimeData()

Mesh QSSGMesh::Mesh::fromRuntimeData ( const RuntimeMeshData data,
QString error 
)
static

Definition at line 764 of file qssgmesh.cpp.

References QVarLengthArray< T, Prealloc >::begin(), QSSGMesh::RuntimeMeshData::Attribute::BinormalSemantic, QSSGMesh::RuntimeMeshData::Attribute::ColorSemantic, QSSGMesh::RuntimeMeshData::Attribute::componentCount(), QSSGMesh::Mesh::IndexBuffer::componentType, QSSGMesh::RuntimeMeshData::Attribute::componentType, QByteArray::data(), QSSGMesh::Mesh::VertexBuffer::data, QSSGMesh::Mesh::IndexBuffer::data, QSSGMesh::Mesh::TargetBuffer::data, QVarLengthArray< T, Prealloc >::end(), QSSGMesh::Mesh::VertexBuffer::entries, QSSGMesh::Mesh::TargetBuffer::entries, error, QSSGMesh::MeshInternal::getColorAttrName(), QSSGMesh::MeshInternal::getJointAttrName(), QSSGMesh::MeshInternal::getNormalAttrName(), QSSGMesh::MeshInternal::getPositionAttrName(), QSSGMesh::MeshInternal::getTexBinormalAttrName(), QSSGMesh::MeshInternal::getTexTanAttrName(), QSSGMesh::MeshInternal::getUV0AttrName(), QSSGMesh::MeshInternal::getUV1AttrName(), QSSGMesh::MeshInternal::getWeightAttrName(), i, QSSGMesh::RuntimeMeshData::Attribute::IndexSemantic, j, QSSGMesh::RuntimeMeshData::Attribute::JointSemantic, QSSGMesh::RuntimeMeshData::Attribute::NormalSemantic, QSSGMesh::Mesh::TargetBuffer::numTargets, QSSGMesh::RuntimeMeshData::Attribute::offset, QSSGMesh::RuntimeMeshData::Attribute::PositionSemantic, Q_ASSERT, qCeil(), qSqrt(), QByteArray::resize(), QSSGMesh::RuntimeMeshData::Attribute::semantic, QByteArray::size(), QSSGMesh::Mesh::VertexBuffer::stride, QSSGMesh::RuntimeMeshData::Attribute::TangentSemantic, QSSGMesh::RuntimeMeshData::Attribute::TexCoord0Semantic, QSSGMesh::RuntimeMeshData::Attribute::TexCoord1Semantic, and QSSGMesh::RuntimeMeshData::Attribute::WeightSemantic.

Referenced by QSSGBufferManager::loadMeshData().

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

◆ hasLightmapUVChannel()

bool QSSGMesh::Mesh::hasLightmapUVChannel ( ) const

Definition at line 1012 of file qssgmesh.cpp.

References QSSGMesh::Mesh::VertexBuffer::entries, and QSSGMesh::MeshInternal::getLightmapUVAttrName().

Referenced by createLightmapUVChannel().

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

◆ indexBuffer()

IndexBuffer QSSGMesh::Mesh::indexBuffer ( ) const
inline

Definition at line 98 of file qssgmesh_p.h.

Referenced by QSSGMeshBVHBuilder::QSSGMeshBVHBuilder(), QSSGLayerRenderData::prepareModelsForRender(), and QQuick3DPhysicsMesh::triangleMesh().

+ Here is the caller graph for this function:

◆ isValid()

bool QSSGMesh::Mesh::isValid ( ) const
inline

◆ loadAll()

QMap< quint32, Mesh > QSSGMesh::Mesh::loadAll ( QIODevice device)
static

Definition at line 600 of file qssgmesh.cpp.

References QMap< Key, T >::cbegin(), QMap< Key, T >::cend(), device, header(), QMap< Key, T >::insert(), it, QSSGMesh::MeshInternal::MultiMeshInfo::meshEntries, qWarning, QSSGMesh::MeshInternal::readFileHeader(), and QSSGMesh::MeshInternal::readMeshData().

+ Here is the call graph for this function:

◆ loadMesh()

Mesh QSSGMesh::Mesh::loadMesh ( QIODevice device,
quint32  id = 0 
)
static

Definition at line 581 of file qssgmesh.cpp.

References QMap< Key, T >::cbegin(), QMap< Key, T >::constEnd(), QMap< Key, T >::constFind(), device, header(), QMap< Key, T >::isEmpty(), it, QSSGMesh::MeshInternal::MultiMeshInfo::meshEntries, QSSGMesh::MeshInternal::readFileHeader(), and QSSGMesh::MeshInternal::readMeshData().

Referenced by QSSGBufferManager::loadMeshData(), loadModelBlendParticleMesh(), and loadModelShapeMesh().

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

◆ save()

◆ subsets()

QVector< Subset > QSSGMesh::Mesh::subsets ( ) const
inline

Definition at line 100 of file qssgmesh_p.h.

Referenced by QQuick3DPhysicsMesh::bounds(), QSSGMeshBVHBuilder::buildTree(), fromAssetData(), and QSSGBufferManager::getModelBounds().

+ Here is the caller graph for this function:

◆ targetBuffer()

TargetBuffer QSSGMesh::Mesh::targetBuffer ( ) const
inline

Definition at line 99 of file qssgmesh_p.h.

◆ vertexBuffer()

VertexBuffer QSSGMesh::Mesh::vertexBuffer ( ) const
inline

Definition at line 97 of file qssgmesh_p.h.

Referenced by QSSGMeshBVHBuilder::QSSGMeshBVHBuilder(), QQuick3DPhysicsMesh::convexMesh(), QSSGLayerRenderData::prepareModelsForRender(), and QQuick3DPhysicsMesh::triangleMesh().

+ Here is the caller graph for this function:

◆ winding()

Winding QSSGMesh::Mesh::winding ( ) const
inline

Definition at line 119 of file qssgmesh_p.h.

Friends And Related Symbol Documentation

◆ MeshInternal

friend struct MeshInternal
friend

Definition at line 134 of file qssgmesh_p.h.


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