Main Page   Class Hierarchy   Compound List   File List   Compound Members  

objloader Class Reference

Parse in .obj's. More...

#include <objloader.hpp>

Inheritance diagram for objloader:

movable List of all members.

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< vector3fvertices
std::vector< vector3fnormals
std::vector< material * > mtls
int listNum
 Which opengl call list.

std::vector< vector3fiStack
std::vector< vector3fsurface
 the parts of iStack that are on the surface.

vector3f centerOfMass
bool translucent
std::vector< vector3fupperI
 Used for finding MoI.

std::vector< vector3flowerI

Detailed Description

Parse in .obj's.

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.


The documentation for this class was generated from the following files:
Generated on Sat May 10 10:09:37 2003 for volume-src-limited by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002