]> Dogcows Code - chaz/yoink/blobdiff - src/Moof/Octree.hh
experimental shapes hierarchy and raycasting
[chaz/yoink] / src / Moof / Octree.hh
index ca464a575efa16ad44ade5269005ab9e6c3f4ae4..13ece5bb4ecd9ac0fe75f7d3b838e9bacd0bc123 100644 (file)
@@ -52,7 +52,7 @@ struct OctreeInsertable
 {
        virtual ~OctreeInsertable() {}
 
 {
        virtual ~OctreeInsertable() {}
 
-       virtual int getOctant(const Aabb& aabb) const = 0;
+       virtual int getOctant(const Aabb<3>& aabb) const = 0;
 };
 
 
 };
 
 
@@ -65,7 +65,7 @@ class Octree : public Entity
        {
                std::list<InsertableP> objects;
 
        {
                std::list<InsertableP> objects;
 
-               Node(const Aabb& aabb)
+               Node(const Aabb<3>& aabb)
                {
                        mAabb = aabb;
                        mSphere.point = mAabb.getCenter();
                {
                        mAabb = aabb;
                        mSphere.point = mAabb.getCenter();
@@ -114,8 +114,8 @@ private:
                ASSERT(node.valid() && "invalid node passed");
                ASSERT(entity && "null entity passed");
 
                ASSERT(node.valid() && "invalid node passed");
                ASSERT(entity && "null entity passed");
 
-               Aabb entityAabb = entity->getAabb();
-               Aabb nodeAabb = node->getAabb();
+               Aabb<3> entityAabb = entity->getAabb();
+               Aabb<3> nodeAabb = node->getAabb();
 
                if (!(entityAabb.max[0] < nodeAabb.max[0] &&
                          entityAabb.min[0] > nodeAabb.min[0] &&
 
                if (!(entityAabb.max[0] < nodeAabb.max[0] &&
                          entityAabb.min[0] > nodeAabb.min[0] &&
@@ -162,7 +162,7 @@ private:
        {
                ASSERT(node.valid() && "invalid node passed");
 
        {
                ASSERT(node.valid() && "invalid node passed");
 
-               Aabb octant;
+               Aabb<3> octant;
 
                for (int i = mTree.children(node); i <= index; ++i)
                {
 
                for (int i = mTree.children(node); i <= index; ++i)
                {
This page took 0.021412 seconds and 4 git commands to generate.