Original Post
Ok here''s what I''ve done for my game''s object struct so far:
hope someone can make sense of what I''m trying to do here. This is a cut down version, I''m just trying to show my understanding of the topic. object_t is suppost to be a general object holder. It''s got an array of sub objects, like arms and stuff.
Is this how it''s "suppost" to be done? How would I go about loading an x file or something into this? How would I animate it?
thanks for any help,
Frank
struct sub_object_t {
vertex *v; //array of vertices
int nv; //no. of vertices
int primt; //like TRIANGLE_STRIP
texture_t *tex; //texture to wrap on this primitive
};
struct object_t {
sub_object_t *sobjs; //array of sub objects
int nsobjs; //no. of sub objects
};
struct entity_t {
object_t *obj;
matrix_t pos;
matrix_t orientation;
matrix_t scale;
};
|