Click here to Skip to main content
15,892,005 members
Articles / Multimedia / OpenGL

Modified version of lib3ds reader of .3ds format

Rate me:
Please Sign up or sign in to vote.
4.78/5 (15 votes)
4 Oct 2012CPOL3 min read 42.8K   2.9K   23  
In this article I present version of lib3ds reader for C++ language
#ifndef LIB3DS_TRACK_H
#define LIB3DS_TRACK_H

#include "Lib3ds_light.h"

class Lib3ds_track: public Lib3ds_light
{
public:
    Lib3ds_track();

protected:

    void lib3ds_track_resize(Lib3dsTrack *track, int nkeys);

    void pos_key_setup(int n, Lib3dsKey *pp, Lib3dsKey *pc, Lib3dsKey *pn, float *dd, float *ds);

    void rot_key_setup(Lib3dsKey *prev, Lib3dsKey *cur, Lib3dsKey *next, float a[4], float b[4]);

    void quat_for_index(Lib3dsTrack *track, int index, float q[4]);

    int find_index(Lib3dsTrack *track, float t, float *u);

    void setup_segment(Lib3dsTrack *track, int index, Lib3dsKey *pp, Lib3dsKey *p0, Lib3dsKey *p1, Lib3dsKey *pn);

    void lib3ds_track_eval_bool(Lib3dsTrack *track, int *b, float t);

    void track_eval_linear(Lib3dsTrack *track, float *value, float t);

    void lib3ds_track_eval_float(Lib3dsTrack *track, float *f, float t);

    void lib3ds_track_eval_vector(Lib3dsTrack *track, float v[3], float t);

    void lib3ds_track_eval_quat(Lib3dsTrack *track, float q[4], float t);

    void tcb_read(Lib3dsKey *key);

    void lib3ds_track_read(Lib3dsTrack *track);
};

#endif // LIB3DS_TRACK_H

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
Australia Australia
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions