/
redgpu
/
ezEngine
Обзор
Документация
Войти
/
redgpu
/
ezEngine
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
release-22.11
Code/EnginePlugins/JoltCooking/JoltCooking.h
36 строк
1 KB
Jan Krassnigg
Updated V-HACD to latest (#651)
15 авг 2022, 13:21
Не верифицирован
15 авг 2022, 13:21
85a820b
Код
Авторство
О чём код?
#pragma once #include <Foundation/Types/Status.h> #include <JoltCooking/JoltCookingDLL.h> class ezStreamWriter; class ezChunkStreamWriter; struct EZ_JOLTCOOKING_DLL ezJoltCookingMesh { bool m_bFlipNormals = false; ezDynamicArray<ezVec3> m_Vertices; ezDynamicArray<ezUInt8> m_VerticesInPolygon; ezDynamicArray<ezUInt32> m_PolygonIndices; ezDynamicArray<ezUInt16> m_PolygonSurfaceID; }; class EZ_JOLTCOOKING_DLL ezJoltCooking { public: enum class MeshType { Triangle, ConvexHull, ConvexDecomposition }; static ezResult CookTriangleMesh(const ezJoltCookingMesh& mesh, ezStreamWriter& OutputStream); static ezResult CookConvexMesh(const ezJoltCookingMesh& mesh, ezStreamWriter& OutputStream); static ezResult ComputeConvexHull(const ezJoltCookingMesh& mesh, ezJoltCookingMesh& outMesh); static ezStatus WriteResourceToStream(ezChunkStreamWriter& stream, const ezJoltCookingMesh& mesh, const ezArrayPtr<ezString>& surfaces, MeshType meshType, ezUInt32 uiMaxConvexPieces = 1); static ezResult CookDecomposedConvexMesh(const ezJoltCookingMesh& mesh, ezStreamWriter& OutputStream, ezUInt32 uiMaxConvexPieces); private: static ezResult CookSingleConvexJoltMesh(const ezJoltCookingMesh& mesh, ezStreamWriter& OutputStream); };