4#ifndef QSSGMESHUTILITIES_P_H
5#define QSSGMESHUTILITIES_P_H
18#include <QtQuick3DUtils/private/qtquick3dutilsglobal_p.h>
20#include <QtQuick3DUtils/private/qssgbounds3_p.h>
22#include <QtQuick3DUtils/private/qssgrenderbasetypes_p.h>
24#include <QtCore/qstring.h>
25#include <QtCore/qbytearray.h>
26#include <QtCore/qiodevice.h>
27#include <QtCore/qmap.h>
31struct QSSGRenderVertexBufferEntry
35 QSSGRenderComponentType m_componentType;
37 quint32 m_numComponents;
39 quint32 m_firstItemOffset;
41 QSSGRenderVertexBufferEntry(
const QByteArray &nm,
42 QSSGRenderComponentType type,
43 quint32 numComponents,
44 quint32 firstItemOffset = 0)
45 : m_name(nm), m_componentType(type), m_numComponents(numComponents), m_firstItemOffset(firstItemOffset)
49 QSSGRenderVertexBufferEntry()
50 : m_componentType(QSSGRenderComponentType::Float32), m_numComponents(0), m_firstItemOffset(0)
54 QSSGRenderVertexBufferEntry(
const QSSGRenderVertexBufferEntry &inOther)
55 : m_name(inOther.m_name)
56 , m_componentType(inOther.m_componentType)
57 , m_numComponents(inOther.m_numComponents)
58 , m_firstItemOffset(inOther.m_firstItemOffset)
62 QSSGRenderVertexBufferEntry &operator=(
const QSSGRenderVertexBufferEntry &inOther)
64 if (
this != &inOther) {
65 m_name = inOther.m_name;
66 m_componentType = inOther.m_componentType;
67 m_numComponents = inOther.m_numComponents;
68 m_firstItemOffset = inOther.m_firstItemOffset;
76struct AssetVertexEntry;
77struct AssetMeshSubset;
78struct RuntimeMeshData;
81class Q_QUICK3DUTILS_EXPORT
Mesh
float simplifyScale(const float *vertexPositions, size_t vertexCount, size_t vertexPositionsStride)
static const size_t MESH_STRUCT_SIZE
static const size_t SUBSET_STRUCT_SIZE_V3_V4
static const size_t VERTEX_BUFFER_ENTRY_STRUCT_SIZE
static const size_t MULTI_ENTRY_STRUCT_SIZE
static const size_t SUBSET_STRUCT_SIZE_V6
size_t simplifyMesh(unsigned int *destination, const unsigned int *indices, size_t indexCount, const float *vertexPositions, size_t vertexCount, size_t vertexPositionsStride, size_t targetIndexCount, float targetError, unsigned int options, float *resultError)
static const size_t MULTI_HEADER_STRUCT_SIZE
static const size_t LOD_STRUCT_SIZE
void optimizeVertexCache(unsigned int *destination, const unsigned int *indices, size_t indexCount, size_t vertexCount)
static const size_t MESH_HEADER_STRUCT_SIZE
static const size_t SUBSET_STRUCT_SIZE_V5
static quint32 getAlignedOffset(quint32 offset, quint32 align)