Random Quotes

I'm selfish, impatient, and a little insecure. I make mistakes, I am out of control, and at times hard to handle, but if you can't handle me at my worst, then you sure as hell don't deserve me at my best.

Countries

24.6%Philippines Philippines
17.6%United States United States
6.2%Australia Australia
4%Germany Germany
3%Poland Poland

Who's Online

We have 1 guest 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