3#include "Systems/ComponentSystem.h"
5#include "LoftedCrossSectionsComponent.h"
7#include "Foundation/Logging/Logger.h"
21 std::vector<uint8_t> inside;
22 std::vector<uint8_t> classification;
46 std::vector<CellClassCounts> shellCellClassCounts;
47 std::vector<CellClassCounts> hollowCellClassCounts;
48 std::vector<CellClassCounts> solidCellClassCounts;
50 void solidInitialize();
52 void shellInitialize();
54 void hollowInitialize();
57 static void solidOpenAlignedClassifySamples(std::vector<uint8_t>& inside,
58 const float* pos,
const size_t pos_stride,
59 const std::vector<glm::vec3>& spine,
60 const glm::vec3& viewer,
64 static void shellOpenAlignedClassifySamples(std::vector<uint8_t>& inside,
65 const float* pos,
const size_t pos_stride,
66 const std::vector<glm::vec3>& spine,
67 const glm::vec3& viewer,
68 const int slices,
const int samples);
70 static void hollowOpenAlignedClassifySamples(std::vector<uint8_t>& inside,
71 const float* pos,
const size_t pos_stride,
72 const std::vector<glm::vec3>& spine,
73 const glm::vec3& viewer,
74 const int slices,
const int samples);
77 void solidOpenAlignedCountCellResources(
size_t& newVertices,
size_t& outIndices,
size_t& cutIndices,
78 std::vector<uint8_t>& classification,
79 const std::vector<glm::vec3>& spine,
80 const std::vector<uint8_t>& inside,
81 const glm::vec3& viewer,
82 const int slices,
const int samples,
const bool doubleSeam);
84 void shellOpenAlignedCountCellResources(
size_t& newVertices,
size_t& outIndices,
85 std::vector<uint8_t>& classification,
86 const std::vector<glm::vec3>& spine,
87 const std::vector<uint8_t>& inside,
88 const glm::vec3& viewer,
89 const int slices,
const int samples,
const bool doubleSeam);
91 void hollowOpenAlignedCountCellResources(
size_t& newVertices,
94 std::vector<uint8_t>& classification,
95 const std::vector<glm::vec3>& spine,
96 const std::vector<uint8_t>& inside,
97 const glm::vec3& viewer,
98 const int slices,
const int samples,
const bool doubleSeam);
101 static void solidOpenAlignedSkin(std::vector<unsigned int>& outSurface,
102 std::vector<unsigned int>& cutSurface,
103 float* pos,
const size_t pos_stride,
104 float* tex,
const size_t tex_stride,
105 float* nrm,
const size_t nrm_stride,
106 const std::vector<uint8_t>& classification,
107 const std::vector<glm::vec3>& spine,
108 const glm::vec3& viewer,
109 const int slices,
const int samples,
const bool doubleSeam);
111 static void shellOpenAlignedSkin(std::vector<unsigned int>& outSurface,
112 float* pos,
const size_t pos_stride,
113 float* tex,
const size_t tex_stride,
114 float* nrm,
const size_t nrm_stride,
115 const std::vector<uint8_t>& classification,
116 const std::vector<glm::vec3>& spine,
117 const glm::vec3& viewer,
118 const int slices,
const int samples,
const bool doubleSeam);
120 static void hollowOpenAlignedSkin(std::vector<unsigned int>& outSurface,
121 std::vector<unsigned int>& cutSurface,
122 float* pos,
const size_t pos_stride,
123 float* tex,
const size_t tex_stride,
124 float* nrm,
const size_t nrm_stride,
125 const std::vector<uint8_t>& classification,
126 const std::vector<glm::vec3>& spine,
127 const glm::vec3& viewer,
128 const int slices,
const int samples,
const bool doubleSeam);
132 static void solidOpenCountCellResources(
size_t& newVertices,
size_t& outIndices,
size_t& cutIndices,
133 const int slices,
const int samples,
const bool doubleSeam);
135 static void shellOpenCountCellResources(
size_t& outIndices,
136 const int slices,
const int samples,
const bool doubleSeam);
138 static void hollowOpenCountCellResources(
size_t& newVertices,
size_t& outIndices,
size_t& cutIndices,
139 const int slices,
const int samples,
const bool doubleSeam);
143 static void solidOpenSkin(std::vector<unsigned int>& outSurface,
144 std::vector<unsigned int>& cutSurface,
145 float* pos,
const size_t pos_stride,
146 float* tex,
const size_t tex_stride,
147 float* nrm,
const size_t nrm_stride,
148 const std::vector<glm::vec3>& spine,
149 const int slices,
const int samples,
const bool doubleSeam);
151 static void shellOpenSkin(std::vector<unsigned int>& outSurface,
152 const int slices,
const int samples,
const bool doubleSeam);
157 static void hollowOpenSkin(std::vector<unsigned int>& outSurface,
158 std::vector<unsigned int>& cutSurface,
159 float* pos,
const size_t pos_stride,
160 float* tex,
const size_t tex_stride,
161 float* nrm,
const size_t nrm_stride,
162 const int slices,
const int samples,
const bool doubleSeam);
166 static void solidClosedCountCellResources(
size_t& newVertices,
size_t& outIndices,
const int slices,
const int samples,
const bool doubleSeam);
168 static void shellClosedCountCellResources(
size_t& outIndices,
const int slices,
const int samples,
const bool doubleSeam);
170 static void hollowClosedCountCellResources(
size_t& newVertices,
size_t& outIndices,
size_t& cutIndices,
171 const int slices,
const int samples,
const bool doubleSeam);
175 void solidClosedSkin(std::vector<unsigned int>& outSurface,
176 float* pos,
const size_t pos_stride,
177 float* tex,
const size_t tex_stride,
178 float* nrm,
const size_t nrm_stride,
179 const std::vector<glm::vec3>& spine,
180 const int slices,
const int samples,
const bool doubleSeam);
182 void shellClosedSkin(std::vector<unsigned int>& outSurface,
183 const int slices,
const int samples,
const bool doubleSeam);
186 void hollowClosedSkin(std::vector<unsigned int>& outSurface,
187 const int slices,
const int samples,
const bool doubleSeam);
192 glm::vec4 viewer_world,
Context * context
Pointer to the Context instance the system lives in.
void update()
Updates the system state to that of the current frame.
Component system with parallel data per component stored in a pool similar to how the components them...
A Context instance contains all the services, systems and runtime components needed to use Cogs.
void initialize(Context *context) override
Initialize the system.
Base allocator implementation.
Contains all Cogs related functionality.
ComponentIndex SizeType
Type used to track the size of pools.
bool visibilityProcessed
Visibility flag when update was invoked last time.
Meshes contain streams of vertex data in addition to index data and options defining geometry used fo...