#include <Moof/Entity.hh>
#include <Moof/Exception.hh>
#include <Moof/Library.hh>
+#include <Moof/Line.hh>
#include <Moof/Log.hh>
#include <Moof/Math.hh>
//#include <Moof/Octree.hh>
std::string mTexture;
//Mf::Octree<Quad>::Ptr mOctree;
- std::list< boost::shared_ptr<Impl::Quad> > mObjects;
+ std::list< boost::shared_ptr<Impl::Quad> > mObjects;
+ std::list< Mf::Line<2> > mLines;
- Mf::Aabb mBounds;
+ Mf::Aabb<3> mBounds;
enum AXIS
}
- static int loadBox(Mf::Script& script, Mf::Aabb& aabb)
+ static int loadBox(Mf::Script& script, Mf::Aabb<3>& aabb)
{
Mf::Script::Value table[] =
{
Quad* quad = new Quad(demotedVertices, mTexture, indices[h][w]);
quad->setSurface(surface);
+ if (surface != Quad::NONE)
+ {
+ // need a 2d line for collisions
+ // assuming the camera always looks directly to -z when the
+ // scene is built, simply demoting the vector again should
+ // project the points to the xy-plane
+ }
+
boost::shared_ptr<Quad> quadPtr(quad);
//mOctree->insert(quadPtr);
mObjects.push_back(quadPtr);
std::list< boost::shared_ptr<Impl::Quad> >::const_iterator it;
int collisions = 0;
- Mf::Sphere sphere = character.getSphere();
+ Mf::Sphere<3> sphere = character.getSphere();
for (it = objects.begin(); it != objects.end(); ++it)
{