]> Dogcows Code - chaz/yoink/blobdiff - src/Moof/Octree.hh
stream-based logging classes
[chaz/yoink] / src / Moof / Octree.hh
index ca464a575efa16ad44ade5269005ab9e6c3f4ae4..4657aecf3680d6db4a61b92d17921fe30080329e 100644 (file)
@@ -52,7 +52,7 @@ struct 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;
 
-               Node(const Aabb& aabb)
+               Node(const Aabb<3>& aabb)
                {
                        mAabb = aabb;
                        mSphere.point = mAabb.getCenter();
@@ -79,7 +79,7 @@ class Octree : public Entity
 
                void printSize()
                {
-                       logDebug("size of node %d", objects.size());
+                       logDebug << "size of node " << objects.size() << std::endl;
                }
 
                void getAll(std::list<InsertableP>& insertables) const
@@ -114,8 +114,8 @@ private:
                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] &&
@@ -162,7 +162,7 @@ private:
        {
                ASSERT(node.valid() && "invalid node passed");
 
-               Aabb octant;
+               Aabb<3> octant;
 
                for (int i = mTree.children(node); i <= index; ++i)
                {
@@ -272,8 +272,8 @@ public:
        void print(NodeP node)
        {
                logInfo("-----");
-               logInfo("depth to node: %d", mTree.depth(node));
-               logInfo("size of node: %d", mTree.size(node));
+               logInfo << "depth to node: " << mTree.depth(node) << std::endl;
+               logInfo << "size of node: " << mTree.size(node) << std::endl;
        }
 
        static Ptr alloc(const Node& rootNode)
This page took 0.02022 seconds and 4 git commands to generate.