PhyObj/PhyObj.h
josh 11ba2db083 added PhyObj class files
git-svn-id: svn://anubis/misc/PhyObj@232 bd8a9e45-a331-0410-811e-c64571078777
2010-02-10 15:32:02 +00:00

41 lines
975 B
C++

#ifndef PHYOBJ_H
#define PHYOBJ_H
#include "refptr/refptr.h"
#include "FileLoader/FileLoader.h"
#include <vector>
class PhyObj
{
public:
/* Types */
enum GeomType { NONE, BOX, SPHERE, PLANE, CAPSULE };
class Geom
{
public:
/* Constructors */
Geom();
Geom(GeomType type, refptr< std::vector<float> > args);
/* Methods */
GeomType getType() { return m_type; }
refptr< std::vector<float> > getArgs() { return m_args; }
protected:
GeomType m_type;
refptr< std::vector<float> > m_args;
};
/* Methods */
void load(FileLoader * fileLoader, const FileLoader::Path & path);
size_t getNumGeoms() { return m_geoms.size(); }
refptr<Geom> getGeom(int i) { return m_geoms[i]; }
protected:
std::vector< refptr<Geom> > m_geoms;
};
#endif