2008-04-10 00:59:47 +02:00
|
|
|
#ifndef __LOAD3DS_H
|
|
|
|
#define __LOAD3DS_H
|
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
#include <fstream>
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
2008-04-11 15:57:56 +02:00
|
|
|
#include "model.h"
|
2008-04-13 03:17:27 +02:00
|
|
|
#include "../glcolor.h"
|
2008-04-10 00:59:47 +02:00
|
|
|
|
|
|
|
class Chunk {
|
|
|
|
private:
|
|
|
|
short ident;
|
|
|
|
char m;
|
|
|
|
char n;
|
|
|
|
|
|
|
|
public:
|
|
|
|
Chunk() { };
|
|
|
|
void parse();
|
|
|
|
};
|
|
|
|
|
|
|
|
class Load3ds {
|
|
|
|
private:
|
|
|
|
std::string filename;
|
|
|
|
|
|
|
|
bool parsed;
|
|
|
|
bool error;
|
2008-04-13 03:17:27 +02:00
|
|
|
|
|
|
|
GLColor readColorChunk(std::ifstream *file);
|
2008-04-10 00:59:47 +02:00
|
|
|
public:
|
|
|
|
Load3ds(std::string _fname, bool parse=true);
|
|
|
|
|
2008-04-11 15:57:56 +02:00
|
|
|
bool parse(Model *m);
|
2008-04-10 00:59:47 +02:00
|
|
|
void unload();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|