1
1
// Copyright (C) 2018-2025 - DevSH Graphics Programming Sp. z O.O.
2
2
// This file is part of the "Nabla Engine".
3
3
// For conditions of distribution and use, see copyright notice in nabla.h
4
- #ifndef _NBL_ASSET_I_POLYGON_GEOMETRY_MANIPULATOR_H_INCLUDED_
5
- #define _NBL_ASSET_I_POLYGON_GEOMETRY_MANIPULATOR_H_INCLUDED_
4
+ #ifndef _NBL_ASSET_C_POLYGON_GEOMETRY_MANIPULATOR_H_INCLUDED_
5
+ #define _NBL_ASSET_C_POLYGON_GEOMETRY_MANIPULATOR_H_INCLUDED_
6
6
7
7
8
8
#include " nbl/core/declarations.h"
@@ -17,7 +17,6 @@ namespace nbl::asset
17
17
class NBL_API2 CPolygonGeometryManipulator
18
18
{
19
19
public:
20
- #if 0 // TODO: REDO
21
20
// ! Comparison methods
22
21
enum E_ERROR_METRIC
23
22
{
@@ -36,6 +35,7 @@ class NBL_API2 CPolygonGeometryManipulator
36
35
EEM_QUATERNION,
37
36
EEM_COUNT
38
37
};
38
+ #if 0 // TODO: REDO
39
39
//! Struct used to pass chosen comparison method and epsilon to functions performing error metrics.
40
40
/**
41
41
By default epsilon equals 2^-16 and EEM_POSITIONS comparison method is set.
@@ -186,53 +186,6 @@ class NBL_API2 CPolygonGeometryManipulator
186
186
*/
187
187
static core::smart_refctd_ptr<ICPUBuffer> idxBufferFromTrianglesFanToTriangles(const void* _input, uint32_t& _idxCount, E_INDEX_TYPE _inIndexType, E_INDEX_TYPE _outIndexType);
188
188
189
- //! Get amount of polygons in mesh buffer.
190
- /** \param meshbuffer Input mesh buffer
191
- \param Outputted Number of polygons in mesh buffer, if successful.
192
- \return If successfully can provide information */
193
- template<typename ...MeshbufTemplParams>
194
- static inline bool getPolyCount(uint32_t& outCount, const IMeshBuffer<MeshbufTemplParams...>* meshbuffer)
195
- {
196
- outCount = 0;
197
- if (!meshbuffer)
198
- return false;
199
- if (!meshbuffer->getPipeline())
200
- return false;
201
-
202
- const auto& assemblyParams = meshbuffer->getPipeline()->getCachedCreationParams().primitiveAssembly;
203
- const E_PRIMITIVE_TOPOLOGY primType = assemblyParams.primitiveType;
204
- switch (primType)
205
- {
206
- case EPT_POINT_LIST:
207
- outCount = meshbuffer->getIndexCount();
208
- break;
209
- case EPT_LINE_STRIP:
210
- outCount = meshbuffer->getIndexCount() - 1;
211
- break;
212
- case EPT_LINE_LIST:
213
- outCount = meshbuffer->getIndexCount() / 2;
214
- break;
215
- case EPT_TRIANGLE_STRIP:
216
- outCount = meshbuffer->getIndexCount() - 2;
217
- break;
218
- case EPT_TRIANGLE_FAN:
219
- outCount = meshbuffer->getIndexCount() - 2;
220
- break;
221
- case EPT_TRIANGLE_LIST:
222
- outCount = meshbuffer->getIndexCount() / 3;
223
- break;
224
- case EPT_PATCH_LIST:
225
- outCount = meshbuffer->getIndexCount() / assemblyParams.tessPatchVertCount;
226
- break;
227
- default:
228
- assert(false); // need to implement calculation for more types
229
- return false;
230
- break;
231
- }
232
-
233
- return true;
234
- }
235
-
236
189
//!
237
190
static inline std::array<uint32_t,3u> getTriangleIndices(const ICPUMeshBuffer* mb, uint32_t triangleIx)
238
191
{
0 commit comments