Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QSSGMesh::MeshInternal Struct Reference

#include <qssgmesh_p.h>

+ Collaboration diagram for QSSGMesh::MeshInternal:

Classes

struct  MeshDataHeader
 
struct  MeshOffsetTracker
 
struct  MultiMeshInfo
 
struct  Subset
 

Static Public Member Functions

static MultiMeshInfo readFileHeader (QIODevice *device)
 
static void writeFileHeader (QIODevice *device, const MultiMeshInfo &meshFileInfo)
 
static quint64 readMeshData (QIODevice *device, quint64 offset, Mesh *mesh, MeshDataHeader *header)
 
static void writeMeshHeader (QIODevice *device, const MeshDataHeader &header)
 
static quint64 writeMeshData (QIODevice *device, const Mesh &mesh)
 
static quint32 byteSizeForComponentType (Mesh::ComponentType componentType)
 
static const char * getPositionAttrName ()
 
static const char * getNormalAttrName ()
 
static const char * getUV0AttrName ()
 
static const char * getUV1AttrName ()
 
static const char * getLightmapUVAttrName ()
 
static const char * getTexTanAttrName ()
 
static const char * getTexBinormalAttrName ()
 
static const char * getColorAttrName ()
 
static const char * getJointAttrName ()
 
static const char * getWeightAttrName ()
 
static QSSGBounds3 calculateSubsetBounds (const Mesh::VertexBufferEntry &entry, const QByteArray &vertexBufferData, quint32 vertexBufferStride, const QByteArray &indexBufferData, Mesh::ComponentType indexComponentType, quint32 subsetCount, quint32 subsetOffset)
 

Detailed Description

Definition at line 236 of file qssgmesh_p.h.

Member Function Documentation

◆ byteSizeForComponentType()

static quint32 QSSGMesh::MeshInternal::byteSizeForComponentType ( Mesh::ComponentType  componentType)
inlinestatic

Definition at line 347 of file qssgmesh_p.h.

References QSSGBaseTypeHelpers::getSizeOfType().

Referenced by calculateSubsetBounds(), QSSGMesh::Mesh::createLightmapUVChannel(), QSSGMesh::Mesh::fromAssetData(), AssimpUtils::generateMeshData(), QSSGLightmapUVGenerator::run(), and QQuick3DGeometry::updateSpatialNode().

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

◆ calculateSubsetBounds()

QSSGBounds3 QSSGMesh::MeshInternal::calculateSubsetBounds ( const Mesh::VertexBufferEntry entry,
const QByteArray vertexBufferData,
quint32  vertexBufferStride,
const QByteArray indexBufferData,
Mesh::ComponentType  indexComponentType,
quint32  subsetCount,
quint32  subsetOffset 
)
static

Definition at line 957 of file qssgmesh.cpp.

References byteSizeForComponentType(), QByteArray::constData(), Q_ASSERT, and QByteArray::size().

Referenced by QSSGMesh::Mesh::fromAssetData().

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

◆ getColorAttrName()

static const char * QSSGMesh::MeshInternal::getColorAttrName ( )
inlinestatic

Definition at line 356 of file qssgmesh_p.h.

Referenced by QSSGRhiShaderPipeline::addStage(), QT_BEGIN_NAMESPACE::VertexBufferDataExt::createEntries(), QSSGMesh::Mesh::fromRuntimeData(), and QQuick3DGeometryPrivate::semanticFromName().

+ Here is the caller graph for this function:

◆ getJointAttrName()

static const char * QSSGMesh::MeshInternal::getJointAttrName ( )
inlinestatic

Definition at line 357 of file qssgmesh_p.h.

Referenced by QSSGRhiShaderPipeline::addStage(), QT_BEGIN_NAMESPACE::VertexBufferDataExt::createEntries(), QSSGMesh::Mesh::fromRuntimeData(), and QQuick3DGeometryPrivate::semanticFromName().

+ Here is the caller graph for this function:

◆ getLightmapUVAttrName()

static const char * QSSGMesh::MeshInternal::getLightmapUVAttrName ( )
inlinestatic

Definition at line 353 of file qssgmesh_p.h.

Referenced by QSSGRhiShaderPipeline::addStage(), QSSGMesh::Mesh::createLightmapUVChannel(), and QSSGMesh::Mesh::hasLightmapUVChannel().

+ Here is the caller graph for this function:

◆ getNormalAttrName()

static const char * QSSGMesh::MeshInternal::getNormalAttrName ( )
inlinestatic

Definition at line 350 of file qssgmesh_p.h.

Referenced by QSSGRhiShaderPipeline::addStage(), QT_BEGIN_NAMESPACE::VertexBufferDataExt::createEntries(), QSSGMesh::Mesh::createLightmapUVChannel(), QSSGMesh::Mesh::fromRuntimeData(), QSSGLayerRenderData::prepareModelsForRender(), readMeshData(), and QQuick3DGeometryPrivate::semanticFromName().

+ Here is the caller graph for this function:

◆ getPositionAttrName()

static const char * QSSGMesh::MeshInternal::getPositionAttrName ( )
inlinestatic

◆ getTexBinormalAttrName()

static const char * QSSGMesh::MeshInternal::getTexBinormalAttrName ( )
inlinestatic

Definition at line 355 of file qssgmesh_p.h.

Referenced by QSSGRhiShaderPipeline::addStage(), QT_BEGIN_NAMESPACE::VertexBufferDataExt::createEntries(), QSSGMesh::Mesh::fromRuntimeData(), readMeshData(), and QQuick3DGeometryPrivate::semanticFromName().

+ Here is the caller graph for this function:

◆ getTexTanAttrName()

static const char * QSSGMesh::MeshInternal::getTexTanAttrName ( )
inlinestatic

Definition at line 354 of file qssgmesh_p.h.

Referenced by QSSGRhiShaderPipeline::addStage(), QT_BEGIN_NAMESPACE::VertexBufferDataExt::createEntries(), QSSGMesh::Mesh::fromRuntimeData(), readMeshData(), and QQuick3DGeometryPrivate::semanticFromName().

+ Here is the caller graph for this function:

◆ getUV0AttrName()

static const char * QSSGMesh::MeshInternal::getUV0AttrName ( )
inlinestatic

Definition at line 351 of file qssgmesh_p.h.

Referenced by QSSGMeshBVHBuilder::QSSGMeshBVHBuilder(), QSSGRhiShaderPipeline::addStage(), QT_BEGIN_NAMESPACE::VertexBufferDataExt::createEntries(), QSSGMesh::Mesh::createLightmapUVChannel(), QSSGMesh::Mesh::fromRuntimeData(), and QQuick3DGeometryPrivate::semanticFromName().

+ Here is the caller graph for this function:

◆ getUV1AttrName()

static const char * QSSGMesh::MeshInternal::getUV1AttrName ( )
inlinestatic

Definition at line 352 of file qssgmesh_p.h.

Referenced by QSSGMeshBVHBuilder::QSSGMeshBVHBuilder(), QSSGRhiShaderPipeline::addStage(), QT_BEGIN_NAMESPACE::VertexBufferDataExt::createEntries(), QSSGMesh::Mesh::fromRuntimeData(), and QQuick3DGeometryPrivate::semanticFromName().

+ Here is the caller graph for this function:

◆ getWeightAttrName()

static const char * QSSGMesh::MeshInternal::getWeightAttrName ( )
inlinestatic

Definition at line 358 of file qssgmesh_p.h.

Referenced by QSSGRhiShaderPipeline::addStage(), QT_BEGIN_NAMESPACE::VertexBufferDataExt::createEntries(), QSSGMesh::Mesh::fromRuntimeData(), and QQuick3DGeometryPrivate::semanticFromName().

+ Here is the caller graph for this function:

◆ readFileHeader()

MeshInternal::MultiMeshInfo QSSGMesh::MeshInternal::readFileHeader ( QIODevice device)
static

Definition at line 43 of file qssgmesh.cpp.

References device, QSSGMesh::MeshInternal::MultiMeshInfo::fileId, QSSGMesh::MeshInternal::MultiMeshInfo::fileVersion, i, QMap< Key, T >::insert(), QSSGMesh::MeshInternal::MultiMeshInfo::isValid(), QDataStream::LittleEndian, QSSGMesh::MeshInternal::MultiMeshInfo::meshEntries, QSSGMesh::MULTI_ENTRY_STRUCT_SIZE, QSSGMesh::MULTI_HEADER_STRUCT_SIZE, qWarning, QDataStream::setByteOrder(), QDataStream::setFloatingPointPrecision(), and QDataStream::SinglePrecision.

Referenced by QSSGMesh::Mesh::loadAll(), QSSGMesh::Mesh::loadMesh(), and QSSGMesh::Mesh::save().

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

◆ readMeshData()

quint64 QSSGMesh::MeshInternal::readMeshData ( QIODevice device,
quint64  offset,
Mesh mesh,
MeshDataHeader header 
)
static

Definition at line 95 of file qssgmesh.cpp.

References QSSGMesh::MeshInternal::MeshOffsetTracker::advance(), QSSGMesh::MeshInternal::MeshOffsetTracker::alignedAdvance(), QList< T >::append(), QSSGMesh::MeshInternal::Subset::bounds, QSSGMesh::Mesh::VertexBufferEntry::componentCount, QSSGMesh::Mesh::VertexBufferEntry::componentType, QSSGMesh::Mesh::IndexBuffer::componentType, QByteArray::constData(), QSSGMesh::MeshInternal::Subset::count, QByteArray::data(), QSSGMesh::Mesh::VertexBuffer::data, QSSGMesh::Mesh::IndexBuffer::data, QSSGMesh::Mesh::TargetBuffer::data, device, QSSGMesh::Mesh::VertexBuffer::entries, QSSGMesh::Mesh::TargetBuffer::entries, QSSGMesh::MeshInternal::MeshDataHeader::FILE_ID, QSSGMesh::MeshInternal::MeshDataHeader::FILE_VERSION, getNormalAttrName(), getPositionAttrName(), getTexBinormalAttrName(), getTexTanAttrName(), header(), i, j, QSSGMesh::MeshInternal::MeshDataHeader::LEGACY_MESH_FILE_VERSION, QSSGMesh::MeshInternal::Subset::lightmapSizeHint, QDataStream::LittleEndian, QSSGMesh::LOD_STRUCT_SIZE, QSSGMesh::MeshInternal::Subset::lodCount, QSSGMesh::Mesh::SubsetBounds::max, QSSGMesh::MESH_HEADER_STRUCT_SIZE, QSSGMesh::MESH_STRUCT_SIZE, QSSGMesh::Mesh::SubsetBounds::min, QSSGMesh::MeshInternal::Subset::nameLength, QSSGMesh::Mesh::TargetBuffer::numTargets, QSSGMesh::Mesh::VertexBufferEntry::offset, QSSGMesh::MeshInternal::MeshOffsetTracker::offset(), QSSGMesh::MeshInternal::Subset::offset, Q_ASSERT, qCeil(), qMax(), qSqrt(), qWarning, QByteArray::resize(), QDataStream::setByteOrder(), QDataStream::setFloatingPointPrecision(), QDataStream::SinglePrecision, QByteArray::size(), QList< T >::size(), QString::startsWith(), QSSGMesh::Mesh::VertexBuffer::stride, QSSGMesh::SUBSET_STRUCT_SIZE_V3_V4, QSSGMesh::SUBSET_STRUCT_SIZE_V5, QSSGMesh::SUBSET_STRUCT_SIZE_V6, and QSSGMesh::VERTEX_BUFFER_ENTRY_STRUCT_SIZE.

Referenced by QSSGMesh::Mesh::loadAll(), and QSSGMesh::Mesh::loadMesh().

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

◆ writeFileHeader()

void QSSGMesh::MeshInternal::writeFileHeader ( QIODevice device,
const MultiMeshInfo meshFileInfo 
)
static

Definition at line 77 of file qssgmesh.cpp.

References QMap< Key, T >::cbegin(), QMap< Key, T >::cend(), device, QSSGMesh::MeshInternal::MultiMeshInfo::fileId, QSSGMesh::MeshInternal::MultiMeshInfo::fileVersion, it, QDataStream::LittleEndian, QSSGMesh::MeshInternal::MultiMeshInfo::meshEntries, QDataStream::setByteOrder(), QDataStream::setFloatingPointPrecision(), QDataStream::SinglePrecision, and QMap< Key, T >::size().

Referenced by QSSGMesh::Mesh::save().

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

◆ writeMeshData()

quint64 QSSGMesh::MeshInternal::writeMeshData ( QIODevice device,
const Mesh mesh 
)
static

Definition at line 407 of file qssgmesh.cpp.

References QSSGMesh::MeshInternal::MeshOffsetTracker::advance(), QSSGMesh::MeshInternal::MeshOffsetTracker::alignedAdvance(), QSSGMesh::Mesh::Subset::bounds, QSSGMesh::Mesh::IndexBuffer::componentType, QByteArray::constData(), QSSGMesh::Mesh::Subset::count, QSSGMesh::Mesh::VertexBuffer::data, QSSGMesh::Mesh::IndexBuffer::data, QSSGMesh::Mesh::TargetBuffer::data, device, QSSGMesh::Mesh::VertexBuffer::entries, QSSGMesh::Mesh::TargetBuffer::entries, QSize::height(), i, QSSGMesh::Mesh::Subset::lightmapSizeHint, QDataStream::LittleEndian, QSSGMesh::LOD_STRUCT_SIZE, QSSGMesh::Mesh::Subset::lods, QSSGMesh::Mesh::SubsetBounds::max, QSSGMesh::MESH_STRUCT_SIZE, QSSGMesh::Mesh::SubsetBounds::min, QSSGMesh::Mesh::Subset::name, QSSGMesh::Mesh::TargetBuffer::numTargets, QSSGMesh::Mesh::Subset::offset, QSSGMesh::MeshInternal::MeshOffsetTracker::offset(), Q_ASSERT, qMax(), QDataStream::setByteOrder(), QDataStream::setFloatingPointPrecision(), QDataStream::SinglePrecision, QString::size(), QByteArray::size(), QSSGMesh::Mesh::VertexBuffer::stride, QSSGMesh::SUBSET_STRUCT_SIZE_V6, QString::utf16(), QSSGMesh::VERTEX_BUFFER_ENTRY_STRUCT_SIZE, QSize::width(), QVector3D::x(), QVector3D::y(), and QVector3D::z().

Referenced by QSSGMesh::Mesh::save().

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

◆ writeMeshHeader()

void QSSGMesh::MeshInternal::writeMeshHeader ( QIODevice device,
const MeshDataHeader header 
)
static

Definition at line 389 of file qssgmesh.cpp.

References device, header(), QDataStream::LittleEndian, QDataStream::setByteOrder(), QDataStream::setFloatingPointPrecision(), and QDataStream::SinglePrecision.

Referenced by QSSGMesh::Mesh::save().

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

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