diff options
author | Machiavelli <machiavelli.trinity@gmail.com> | 2012-06-22 05:31:04 -0700 |
---|---|---|
committer | Machiavelli <machiavelli.trinity@gmail.com> | 2012-06-22 05:31:04 -0700 |
commit | cfb53dbf42bd5e1274be07f022f786a1451e515c (patch) | |
tree | ef19545a1b8e60855305e5eec211e860240f6662 /src/server/collision/BoundingIntervalHierarchy.h | |
parent | acee199e7882b4c82b2ded20b7cf429263f687d1 (diff) | |
parent | 716e2db0e10673401ba7d6579899a8151ae64208 (diff) |
Merge pull request #6885 from Chaplain/clean
Core/Misc: Code-style + some const methods.
Diffstat (limited to 'src/server/collision/BoundingIntervalHierarchy.h')
-rwxr-xr-x | src/server/collision/BoundingIntervalHierarchy.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/server/collision/BoundingIntervalHierarchy.h b/src/server/collision/BoundingIntervalHierarchy.h index ea70fc3e322..a4bbe21006a 100755 --- a/src/server/collision/BoundingIntervalHierarchy.h +++ b/src/server/collision/BoundingIntervalHierarchy.h @@ -128,7 +128,7 @@ class BIH delete[] dat.primBound; delete[] dat.indices; } - uint32 primCount() { return objects.size(); } + uint32 primCount() const { return objects.size(); } template<typename RayCallback> void intersectRay(const Ray &r, RayCallback& intersectCallback, float &maxDist, bool stopAtFirst=false) const @@ -400,7 +400,8 @@ class BIH void buildHierarchy(std::vector<uint32> &tempTree, buildData &dat, BuildStats &stats); - void createNode(std::vector<uint32> &tempTree, int nodeIndex, uint32 left, uint32 right) { + void createNode(std::vector<uint32> &tempTree, int nodeIndex, uint32 left, uint32 right) const + { // write leaf node tempTree[nodeIndex + 0] = (3 << 30) | left; tempTree[nodeIndex + 1] = right - left + 1; |