Verified Commit 69212ab8 authored by Justin Carpentier's avatar Justin Carpentier
Browse files

core: fix variable naming

parent a17be7ee
...@@ -230,16 +230,16 @@ static inline AABB translate(const AABB& aabb, const Vec3f& t) ...@@ -230,16 +230,16 @@ static inline AABB translate(const AABB& aabb, const Vec3f& t)
return res; return res;
} }
static inline AABB rotate(const AABB& aabb, const Matrix3f& t) static inline AABB rotate(const AABB& aabb, const Matrix3f& R)
{ {
AABB res (t * aabb.min_); AABB res (R * aabb.min_);
Vec3f corner (aabb.min_); Vec3f corner (aabb.min_);
const std::size_t bit[3] = { 1, 2, 4 }; const std::size_t bit[3] = { 1, 2, 4 };
for (std::size_t ic = 1; ic < 8; ++ic) { // ic = 0 corresponds to aabb.min_. Skip it. for (std::size_t ic = 1; ic < 8; ++ic) { // ic = 0 corresponds to aabb.min_. Skip it.
for (std::size_t i = 0; i < 3; ++i) { for (std::size_t i = 0; i < 3; ++i) {
corner[i] = (ic && bit[i]) ? aabb.max_[i] : aabb.min_[i]; corner[i] = (ic && bit[i]) ? aabb.max_[i] : aabb.min_[i];
} }
res += t * corner; res += R * corner;
} }
return res; return res;
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment