Added getmesh function

This commit is contained in:
_
2018-04-17 18:32:23 -07:00
parent 383abb1607
commit 9a75cd0940
3 changed files with 42 additions and 22 deletions

View File

@@ -52,7 +52,7 @@ struct BatchData {
};
struct VertexData {
// following structs should in an array of size numVertex
// following structs should in an array of size 'numVertex'
struct Coordinate *positions;
struct Coordinate *normals;
struct UVs *u;
@@ -60,15 +60,13 @@ struct VertexData {
struct BoneWeights *bw;
};
// This is where most of the parsing will be.
// this struct is in-order of what the file format will have.
struct Batch {
struct BatchData *bd;
struct VertexData vd;
struct BatchData *bd; // pointer to region in file data
struct VertexData vd; // collection of pointers to regions in file data
};
struct Mesh {
// may contain multiple batches
// array of batches
struct Batch *b;
};
@@ -85,10 +83,9 @@ void printcoordinate(struct Coordinate*, unsigned int);
// ** = 'pass by reference' of a pointer to struct
bool getmeshheader(struct MeshHeader**, unsigned int i, const char * const);
// ** = 'pass by reference' of a pointer to struct
bool getmeshbatch(struct Batch*,
unsigned int offset,
const char * const);
bool getmeshbatch(struct Batch*, unsigned int offset, const char * const);
bool getmesh(struct Mesh*, unsigned int i, const char* filename);
#endif