strange, I thought I had fixed this
parent
2e46c7a8d0
commit
2bd533f647
|
@ -100,11 +100,10 @@ template <typename T> struct TAABB {
|
||||||
|
|
||||||
/// Calculate the n-dimensional volume of the bounding box
|
/// Calculate the n-dimensional volume of the bounding box
|
||||||
inline value_type getVolume() const {
|
inline value_type getVolume() const {
|
||||||
value_type result = 0;
|
vector_type diff = max-min;
|
||||||
for (int i=0; i<point_type::dim; ++i) {
|
value_type result = diff[1];
|
||||||
value_type tmp = max[i] - min[i];
|
for (int i=1; i<point_type::dim; ++i)
|
||||||
result += tmp*tmp;
|
result *= diff[i];
|
||||||
}
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue