This file looks large and may slow your browser down if we attempt
to syntax highlight it, so we are showing it without any
pretty colors.
Highlight
it anyway.
| 1 |
#ifndef THREED_H |
| 2 |
#define THREED_H |
| 3 |
|
| 4 |
#include "matrix.h" |
| 5 |
|
| 6 |
typedef struct surf3 { |
| 7 |
int type; // surface type; |
| 8 |
int mat; |
| 9 |
int refs; |
| 10 |
int point[3]; |
| 11 |
double u[3]; |
| 12 |
double v[3]; |
| 13 |
} Surface3; |
| 14 |
|
| 15 |
typedef struct obj3d { |
| 16 |
void *child; //Points to first child, null for no children |
| 17 |
void *next; //Points to next sibling object. null for last entry |
| 18 |
int type; // 0=world, 1=group, 2=poly |
| 19 |
int kids; |
| 20 |
char *name; |
| 21 |
char *texture; |
| 22 |
char *data; |
| 23 |
int datac; |
| 24 |
int texrep_u; //docs say double but practice disagrees. |
| 25 |
int texrep_v; |
| 26 |
double crease; |
| 27 |
Matrix3 *rot; |
| 28 |
Vector3 loc; |
| 29 |
char *url; |
| 30 |
int numverts; |
| 31 |
int allocverts; |
| 32 |
Vector3 *vert; |
| 33 |
int numsurf; |
| 34 |
int allocsurf; |
| 35 |
Surface3 *surf; |
| 36 |
} Object3D; |
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
//Prototypes |
| 41 |
Object3D *CreateObject(unsigned int numvert, unsigned int numsurf, char *name, char *texture, int type); |
| 42 |
void DestroyObject(Object3D *obj); |
| 43 |
int WriteObject(Object3D *obj, FILE *fp); |
| 44 |
|
| 45 |
#endif //not defined THREED_H |