Path: blob/master/thirdparty/jolt_physics/Jolt/Geometry/Indexify.h
9913 views
// Jolt Physics Library (https://github.com/jrouwe/JoltPhysics)1// SPDX-FileCopyrightText: 2021 Jorrit Rouwe2// SPDX-License-Identifier: MIT34#pragma once56#include <Jolt/Geometry/Triangle.h>7#include <Jolt/Geometry/IndexedTriangle.h>89JPH_NAMESPACE_BEGIN1011/// Take a list of triangles and get the unique set of vertices and use them to create indexed triangles.12/// Vertices that are less than inVertexWeldDistance apart will be combined to a single vertex.13JPH_EXPORT void Indexify(const TriangleList &inTriangles, VertexList &outVertices, IndexedTriangleList &outTriangles, float inVertexWeldDistance = 1.0e-4f);1415/// Take a list of indexed triangles and unpack them16JPH_EXPORT void Deindexify(const VertexList &inVertices, const IndexedTriangleList &inTriangles, TriangleList &outTriangles);1718JPH_NAMESPACE_END192021