diff options
| author | Rémi Verschelde <remi@verschelde.fr> | 2016-03-09 00:14:08 +0100 |
|---|---|---|
| committer | Rémi Verschelde <remi@verschelde.fr> | 2016-03-09 00:14:08 +0100 |
| commit | e46e43d2aaa6339a1675eb989f41885e745bf5c3 (patch) | |
| tree | cf91f2869ff8f058c6682569fb31e22e5ee736ad /core/math/aabb.h | |
| parent | 1dad6eca812e5c2e313b54265114de8a1d73d999 (diff) | |
| parent | 4a4f2479146aa33e235ed57cde311efda68d3c8f (diff) | |
Merge pull request #3928 from Marqin/whitespace
remove trailing whitespace - sorry for the broken PRs, please rebase :)
Diffstat (limited to 'core/math/aabb.h')
| -rw-r--r-- | core/math/aabb.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/core/math/aabb.h b/core/math/aabb.h index 0fada859c0..57fe1b32f5 100644 --- a/core/math/aabb.h +++ b/core/math/aabb.h @@ -47,21 +47,21 @@ public: float get_area() const; /// get area _FORCE_INLINE_ bool has_no_area() const { - + return (size.x<=CMP_EPSILON || size.y<=CMP_EPSILON || size.z<=CMP_EPSILON); } _FORCE_INLINE_ bool has_no_surface() const { - + return (size.x<=CMP_EPSILON && size.y<=CMP_EPSILON && size.z<=CMP_EPSILON); } - + const Vector3& get_pos() const { return pos; } void set_pos(const Vector3& p_pos) { pos=p_pos; } const Vector3& get_size() const { return size; } void set_size(const Vector3& p_size) { size=p_size; } - + bool operator==(const AABB& p_rval) const; bool operator!=(const AABB& p_rval) const; @@ -265,7 +265,7 @@ bool AABB::has_point(const Vector3& p_point) const { return false; if (p_point.z>pos.z+size.z) return false; - + return true; } @@ -297,11 +297,11 @@ void AABB::project_range_in_plane(const Plane& p_plane,float &r_min,float& r_max Vector3 half_extents( size.x * 0.5, size.y * 0.5, size.z * 0.5 ); Vector3 center( pos.x + half_extents.x, pos.y + half_extents.y, pos.z + half_extents.z ); - + float length = p_plane.normal.abs().dot(half_extents); float distance = p_plane.distance_to( center ); r_min = distance - length; - r_max = distance + length; + r_max = distance + length; } inline real_t AABB::get_longest_axis_size() const { |