2014-03-31 21:52:04 +08:00
|
|
|
#ifndef GMIO_LIBSTL_STL_MESH_H
|
|
|
|
#define GMIO_LIBSTL_STL_MESH_H
|
2014-01-29 23:59:19 +08:00
|
|
|
|
|
|
|
#include "stl_global.h"
|
|
|
|
#include "stl_triangle.h"
|
|
|
|
|
2014-03-13 21:37:55 +08:00
|
|
|
/*! Provides an interface for accessing the underlying(hidden) user mesh */
|
2014-03-31 21:52:04 +08:00
|
|
|
struct gmio_stl_mesh
|
2014-01-29 23:59:19 +08:00
|
|
|
{
|
2014-03-13 21:37:55 +08:00
|
|
|
/*! Opaque pointer on the user mesh, passed as first argument to hook functions */
|
2014-01-29 23:59:19 +08:00
|
|
|
const void* cookie;
|
2014-03-13 21:37:55 +08:00
|
|
|
|
|
|
|
/*! Number of triangles in the mesh */
|
2014-01-29 23:59:19 +08:00
|
|
|
uint32_t triangle_count;
|
2014-03-13 21:37:55 +08:00
|
|
|
|
|
|
|
/*! Pointer on a function that stores the mesh triangle of index \p tri_id into \p triangle */
|
2014-03-28 23:33:35 +08:00
|
|
|
void (*get_triangle_func)(const void* cookie, uint32_t tri_id, gmio_stl_triangle_t* triangle);
|
2014-02-13 19:02:40 +08:00
|
|
|
};
|
|
|
|
|
2014-03-31 21:52:04 +08:00
|
|
|
typedef struct gmio_stl_mesh gmio_stl_mesh_t;
|
2014-01-29 23:59:19 +08:00
|
|
|
|
2014-03-31 21:52:04 +08:00
|
|
|
#endif /* GMIO_LIBSTL_STL_MESH_H */
|