Read Klein file

This commit is contained in:
PedroEdiaz
2024-12-01 21:08:35 -06:00
parent 1d254eade5
commit 987ce54429
3 changed files with 16 additions and 43 deletions

View File

@@ -15,9 +15,6 @@
#define M_PI 3.14159
#endif
float *generate_data_surface(unsigned char *, unsigned long *);
float *generate_normals_surface(float *, unsigned char, unsigned long);
struct projection projection = {.x = 0, .y = 1, .z = 2, .w = 3};
const char *wname = "manigraph: manifold grapher";
@@ -134,9 +131,11 @@ int main(void)
{
struct surface surface;
surface.data = generate_data_surface(&surface.dim, &surface.vertex);
surface.norm =
generate_normals_surface(surface.data, surface.dim, surface.vertex);
if( create_surface_klein("test.klein", &surface) )
{
mlog("[MESH] Error al leer el archivo...\n");
goto error_mesh_surface;
}
if (!(m_surface = create_mesh(surface)))
{
@@ -146,7 +145,6 @@ int main(void)
projection.m = surface.dim;
projection.mesh = m_surface;
set_projection_mesh(projection);
free(surface.norm);