43#ifndef CONVHULL_3D_INCLUDED
44#define CONVHULL_3D_INCLUDED
46#if !defined(__cplusplus) && defined(_MSC_VER)
47# pragma warning(disable : 4201)
54#ifdef CONVHULL_3D_USE_FLOAT_PRECISION
55typedef float CH_FLOAT;
57typedef double CH_FLOAT;
62typedef struct _ch_vertex {
115 CH_FLOAT*
const in_vertices,
141 const int keepOnlyUsedVerticesFLAG,
142 char*
const obj_filename);
159 char*
const m_filename);
169 char*
const obj_filename,
void convhull_3d_build(ch_vertex *const in_vertices, const int nVert, int **out_faces, CH_FLOAT **out_cf, CH_FLOAT **out_df, int *nOut_faces)
Builds the 3-D convexhull using the quickhull algorithm [1].
void convhull_3d_export_m(ch_vertex *const vertices, const int nVert, int *const faces, const int nFaces, char *const m_filename)
Exports the vertices, face indices, and face normals, as an '.m' file, for Matlab verification.
void extractVerticesFromObjFile(char *const obj_filename, ch_vertex **out_vertices, int *out_nVert)
Reads an '.obj' file and extracts only the vertices.
void convhull_3d_export_obj(ch_vertex *const vertices, const int nVert, int *const faces, const int nFaces, const int keepOnlyUsedVerticesFLAG, char *const obj_filename)
Exports the vertices, face indices, and face normals, as an '.obj' file, ready for the GPU.
void convhull_nd_build(CH_FLOAT *const in_vertices, const int nVert, const int d, int **out_faces, CH_FLOAT **out_cf, CH_FLOAT **out_df, int *nOut_faces)
Builds the N-D convexhull using the quickhull algorithm [1].
vertex structure, used by convhull_3d