refactor(src/klein.c): Fix values on klein format
This commit is contained in:
10
src/klein.c
10
src/klein.c
@@ -7,7 +7,7 @@
|
||||
5 bytes with KLEIN
|
||||
1 byte empty for scaling
|
||||
1 byte with the dimention of the surface
|
||||
8 bytes interprated as a long with the number of vertex
|
||||
8 bytes interprated as an int with the number of vertex
|
||||
n bytes with the vertex data of the surface
|
||||
n bytes with the normal data of the surface
|
||||
|
||||
@@ -35,10 +35,10 @@ int create_surface_klein(unsigned char *path, struct surface *surface)
|
||||
|
||||
size = surface->dim * surface->vertex;
|
||||
|
||||
surface->data = malloc(16 * size);
|
||||
fread(surface->data, 16, size, file);
|
||||
surface->data = malloc(4 * size);
|
||||
fread(surface->data, 4, size, file);
|
||||
|
||||
surface->norm = malloc(16 * size);
|
||||
fread(surface->norm, 16, size, file);
|
||||
surface->norm = malloc(4 * size);
|
||||
fread(surface->norm, 4, size, file);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user