From 23f2c98834e6c45e893ee12f42c32e9bc4ee39fd Mon Sep 17 00:00:00 2001 From: samcake Date: Thu, 28 Jan 2016 09:23:45 -0800 Subject: [PATCH] fixing the addressing issue --- libraries/render/src/render/Octree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/render/src/render/Octree.h b/libraries/render/src/render/Octree.h index e78a876bcd..6b55e38d8f 100644 --- a/libraries/render/src/render/Octree.h +++ b/libraries/render/src/render/Octree.h @@ -107,7 +107,7 @@ namespace render { bool operator== (const Location& right) const { return pos == right.pos && depth == right.depth; } // Eval the octant of this cell relative to its parent - Octant octant() const { return Octant((pos.x & 1) | (pos.y & 1) | (pos.z & 1)); } + Octant octant() const { return Octant((pos.x & 1) | ((pos.y & 1) << 1) | ((pos.z & 1) << 2)); } Coord3 octantAxes(Link octant) const { return Coord3((Coord)bool(octant & XAxis), (Coord)bool(octant & YAxis), (Coord)bool(octant & ZAxis)); } // Get the Parent cell Location of this cell