41 lines
975 B
C++
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
|