box3d/samples/mesh_loader.h
Erin Catto c52908c9a9
Fixes 08 (#98)
- fix hull builder face and edge leak
- fix #95
- samples app will no longer crash if data folder is not found
2026-07-22 15:55:02 -07:00

26 lines
622 B
C++

// SPDX-FileCopyrightText: 2025 Erin Catto
// SPDX-License-Identifier: MIT
#pragma once
#include "box3d/math_functions.h"
#include <vector>
struct b3MeshData;
// Returns null if the mesh cannot be created.
b3MeshData* CreateMeshData( const char* path, float scale, bool zUp, bool useMedianSplit, bool identifyConvexEdges,
bool weldVertices );
// Null tolerant.
void DestroyMeshData( b3MeshData* meshData );
struct TempMesh
{
std::vector<b3Vec3> vertices;
std::vector<int> indices;
std::vector<uint8_t> materialIndices;
};
bool LoadTempMesh( const char* path, TempMesh* tempMesh, float scale, bool zUp );