2#include "Resources/Resources.h"
3#include "Services/TaskManager.h"
6#include "Foundation/Memory/MemoryBuffer.h"
17namespace Cogs::Core::IsoSurfaces
49 const std::vector<float>& thresholds,
50 const float* densityField,
51 const float* dataField,
52 const glm::uvec3 fieldSize,
53 const glm::vec3 minCorner,
54 const glm::vec3 maxCorner,
55 const bool exteriorIsInside =
true,
56 const bool flipOrientation =
true,
57 const bool closeZNeg =
true,
58 const bool closeZPos =
true,
59 const bool closeYNeg =
true,
60 const bool closeYPos =
true,
61 const bool closeXNeg =
true,
62 const bool closeXPos =
true,
68 void COGSCORE_DLL_API analyze(
Context* context,
69 std::vector<int32_t>& vertexOffsets,
70 std::vector<int32_t>& indexOffsets,
71 std::vector<int32_t>& cellOffsets,
78 const std::vector<float>& thresholds,
79 const bool exteriorIsInside,
81 const glm::ivec3 fieldDim,
82 const glm::ivec3 gridA,
83 const glm::ivec3 gridB,
84 std::atomic<uint64_t>* elapsed_us =
nullptr);
99 typedef std::function<void(int32_t ixIndex, glm::ivec4* samples,
const uint32_t ixN)> VertexEmitFunc;
104 void COGSCORE_DLL_API extractVertices(
Context* context,
106 VertexEmitFunc vertexEmit,
107 const uint8_t* activeCellCases,
108 const int32_t* activeCellVertexOffsets,
109 const int32_t* activeCellIndices,
111 const int32_t activeCellCount,
112 const glm::ivec3 gridA,
113 const glm::ivec3 gridB,
114 std::atomic<uint64_t>* elapsed_us =
nullptr);
127 typedef std::function<void(uint32_t ixIndex, glm::ivec3 cell,
const uint32_t* indices,
const uint32_t ixN)> IndexEmitFunc;
132 void COGSCORE_DLL_API extractIndices(
Context* context,
134 IndexEmitFunc& emitFunc,
135 const int32_t* cellMap,
136 const uint8_t* activeCellCases,
137 const int32_t* activeCellVertexOffsets,
138 const int32_t* activeCellIndexOffsets,
139 const int32_t* activeCellIndices,
141 const int32_t activeCellCount,
142 const glm::ivec3 gridA,
143 const glm::ivec3 gridB,
144 std::atomic<uint64_t>* elapsed_us =
nullptr);
A Context instance contains all the services, systems and runtime components needed to use Cogs.
Contains the Engine, Renderer, resource managers and other systems needed to run Cogs....
Struct that holds temporary data between the different passes.
static const ResourceHandle_t NoHandle
Handle representing a default (or none if default not present) resource.
Task id struct used to identify unique Task instances.