
#ifndef PHYOBJ_H
#define PHYOBJ_H

#include "refptr/refptr.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(const unsigned char *data, unsigned int size);
        size_t getNumGeoms() { return m_geoms.size(); }
        refptr<Geom> getGeom(int i) { return m_geoms[i]; }

    protected:
        std::vector< refptr<Geom> > m_geoms;
};

#endif
