#include <objloader.hpp>
Inheritance diagram for objloader:
Public Types | |
enum | coordSystem { CARTESIAN, CYLINDRICAL, SPHERICAL } |
Public Methods | |
objloader () | |
objloader (string objFile, float STEP=0.0, coordSystem COORD_SYSTEM=CARTESIAN) | |
~objloader () | |
bool | load (string objFile) |
Load .obj file. | |
void | process (string line) |
Parse each line of .obj file. | |
void | loadMtl (string mtlFile) |
Parse .mtl file specified in .obj file. | |
void | processMtl (string line, material *mtl) |
Parse each line of .mtl file into material objects. | |
bool | matchMtl (unsigned &index, string name) |
Match specified material to loaded materials. | |
void | setMass (float newMass) |
Change or initialize total mass. | |
void | draw (void) |
void | update (void) |
Does nothing currently, put scripted movements here. | |
objloader & | operator= (const objloader &obj1) |
void | getBoundingBox (void) |
Public Attributes | |
bool | success |
int | counter |
For scripted movements, unused currently. | |
std::vector< vector3f > | vertices |
std::vector< vector3f > | normals |
std::vector< material * > | mtls |
int | listNum |
Which opengl call list. | |
std::vector< vector3f > | iStack |
std::vector< vector3f > | surface |
the parts of iStack that are on the surface. | |
vector3f | centerOfMass |
bool | translucent |
std::vector< vector3f > | upperI |
Used for finding MoI. | |
std::vector< vector3f > | lowerI |
I could do more parsers for other formats but .objs fit all my needs for now (I'll need my own format most likely).
Perhaps I should further separate obj loading from the physics operations for finding the interior points and so forth.
Probably this shouldn't be a movable subclass anymore.