gmio/examples/3d_mesh.h

24 lines
379 B
C
Raw Normal View History

2017-01-30 18:41:20 +08:00
#pragma once
2016-03-02 00:05:52 +08:00
#include <stddef.h>
/* User-defined 3D point */
struct my_3d_point
{
double coords[3];
};
/* User-defined 3D triangle */
struct my_3d_triangle
{
struct my_3d_point vertex[3];
};
/* An example of user-defined 3D mesh */
struct my_3d_mesh
{
struct my_3d_triangle* triangle_array;
size_t triangle_array_count;
size_t triangle_array_capacity;
};