Skip to content

Commit

Permalink
add MioMesh struct
Browse files Browse the repository at this point in the history
  • Loading branch information
chitalu committed Nov 15, 2023
1 parent 4c61d0a commit 3cb993c
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions include/mio/mio.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,24 @@ typedef intptr_t ssize_t;
ssize_t getline(char** lineptr, size_t* n, FILE* stream);
#endif // #if defined(_WIN32)

// structure for a mesh that is loaded from file using mio functions
struct MioMesh
{
double* pVertices = NULL;
double* pNormals = NULL;
double* pTexCoords = NULL;

unsigned int* pFaceSizes = NULL;
unsigned int* pFaceVertexIndices = NULL;
unsigned int* pFaceVertexTexCoordIndices = NULL;
unsigned int* pFaceVertexNormalIndices = NULL;

unsigned int numVertices = 0;
unsigned int numNormals = 0;
unsigned int numTexCoords = 0;
unsigned int numFaces = 0;
};

/*
Function to read in a mesh file. Supported file formats are .obj and .off
*/
Expand Down

0 comments on commit 3cb993c

Please sign in to comment.