Original Post
Hi, im trying to find the 3d object format more suitable for loading and playing around in a C++ graphic motor based on directx 9, i have tried .cob, .asc and .md2 and i wish to try with .md3, but i dont know how is the C++ class or the container containing a .MD3, and i cant write the loading function to load .md3 without knowing MD3 header and format,so i ask...
1) Is there someone who know how to write a loading function for .MD3 in VC++, or who know how to write a container for .md3 in VC++, or who know how is the whole header and format of a .md3 from where extrapolate an object like this:
typedef struct OBJECT4DV2_TYP
{
int id; // numeric id of this object
char name[64]; // ASCII name of object just for kicks
int state; // state of object
int attr; // attributes of object
int mati; // material index overide (-1) - no material (new)
float *avg_radius; // [OBJECT4DV2_MAX_FRAMES]; // average radius of object used for collision detection
float *max_radius; // [OBJECT4DV2_MAX_FRAMES]; // maximum radius of object
POINT4D world_pos; // position of object in world
VECTOR4D dir; // rotation angles of object in local
// cords or unit direction vector
VECTOR4D ux,uy,uz; // local axes to track full orientation
// this is updated automatically during
// rotation calls
int num_vertices; // number of vertices per frame of this object
int num_frames; // number of frames
int total_vertices; // total vertices
int curr_frame; // current animation frame (0) if single frame
VERTEX4DTV1_PTR vlist_local; // array of local vertices
VERTEX4DTV1_PTR vlist_trans; // array of transformed vertices
VERTEX4DTV1_PTR head_vlist_local;
VERTEX4DTV1_PTR head_vlist_trans;
// texture coordinates list
POINT2D_PTR tlist;
BITMAP_IMAGE_PTR texture; // pointer to the texture information for simple texture mapping
int num_polys; // number of polygons in object mesh
POLY4DV2_PTR plist; // ptr to polygons
} OBJECT4DV2, *OBJECT4DV2_PTR;
or whatever object else?
2) Or is possible (and convenient) to convert .md3 to .md2 or to .cob, i think no, but i ask...)(i have already tried polytrans2.2 but it doeasn''t support .md2, neither .md3 or .cob)
3) Which is the best object format to load in a C++ graphic motor from the viewpoint of the most care, and the best appearance? .md3?
Thank you for any help
Kev