0.2.0-dev Download ZIP
19 lines ·815 B Raw
| 1 | // Jolt Physics Library (https://github.com/jrouwe/JoltPhysics) |
| 2 | // SPDX-FileCopyrightText: 2021 Jorrit Rouwe |
| 3 | // SPDX-License-Identifier: MIT |
| 4 | |
| 5 | #pragma once |
| 6 | |
| 7 | #include <Jolt/Geometry/Triangle.h> |
| 8 | #include <Jolt/Geometry/IndexedTriangle.h> |
| 9 | |
| 10 | JPH_NAMESPACE_BEGIN |
| 11 | |
| 12 | /// Take a list of triangles and get the unique set of vertices and use them to create indexed triangles. |
| 13 | /// Vertices that are less than inVertexWeldDistance apart will be combined to a single vertex. |
| 14 | JPH_EXPORT void Indexify(const TriangleList &inTriangles, VertexList &outVertices, IndexedTriangleList &outTriangles, float inVertexWeldDistance = 1.0e-4f); |
| 15 | |
| 16 | /// Take a list of indexed triangles and unpack them |
| 17 | JPH_EXPORT void Deindexify(const VertexList &inVertices, const IndexedTriangleList &inTriangles, TriangleList &outTriangles); |
| 18 | |
| 19 | JPH_NAMESPACE_END |