Random Quotes

I love you but I can't be with you. My heart breaks when thinking of you. But what should I do because I'm not free for you?

Countries

23.8%Philippines Philippines
15.2%United States United States
9.7%Australia Australia
3.7%Germany Germany
3.3%Malaysia Malaysia

Who's Online

We have 4 guests online

3D Model Format

Attention: open in a new window. PDFPrintE-mail

I'm playing around with the MD5 Model format and I'm impressed with it. The MD5 Models are in plain text, so you can use any text editor to view it if anything goes wrong. To load it, you just need to read per line in text mode and get the data you need for your engine. The good thing about this 3d format is it uses bones. And to animate it smoothly, you just need to use Quaternion spherical linear interpolation (SLERP).

I still can't decide if I'm going to use it on my engine because I really want to use Collada that supports everything under the sun but it is really hard to understand.

Anyway, here's my Mesh Class so far.

 


class Mesh
{
public:
    Mesh( char *name, char *path = "./" );
    ~Mesh();
    Material *getMaterial();
    bool Load(struct md5_model_t *mdl);
    void DrawSkeleton(struct md5_joint_t *skeleton, int num_joints);
    void Draw();
    void SetAnim( int type );
    void Animate( float time );

private:
    int max_verts;
    int max_tris;
    md5_model_t mdl;
    Material    *texture;
    vector3df    *m_vertices;
    vector3df    *m_color;
    vector3df    *m_normals;
    vector2df    *m_stVertices;
    vector3di    *m_indices;

};

Comments (0)
Write comment
Your Contact Details:
Comment:
[b] [i] [u] [url] [quote] [code] [img]   
:angry::0:confused::cheer:B):evil::silly::dry::lol::kiss::D:pinch:
:(:shock::X:side::):P:unsure::woohoo::huh::whistle:;):s
:!::?::idea::arrow:
Security
Please input the anti-spam code that you can read in the image.

Login