diff options
Diffstat (limited to 'linden/indra/newview/llspatialpartition.cpp')
-rw-r--r-- | linden/indra/newview/llspatialpartition.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/linden/indra/newview/llspatialpartition.cpp b/linden/indra/newview/llspatialpartition.cpp index 6247686..d7baa58 100644 --- a/linden/indra/newview/llspatialpartition.cpp +++ b/linden/indra/newview/llspatialpartition.cpp | |||
@@ -118,10 +118,14 @@ void validate_drawable(LLDrawable* drawablep) | |||
118 | 118 | ||
119 | S32 AABBSphereIntersect(const LLVector3& min, const LLVector3& max, const LLVector3 &origin, const F32 &rad) | 119 | S32 AABBSphereIntersect(const LLVector3& min, const LLVector3& max, const LLVector3 &origin, const F32 &rad) |
120 | { | 120 | { |
121 | return AABBSphereIntersectR2(min, max, origin, rad*rad); | ||
122 | } | ||
123 | |||
124 | S32 AABBSphereIntersectR2(const LLVector3& min, const LLVector3& max, const LLVector3 &origin, const F32 &r) | ||
125 | { | ||
121 | F32 d = 0.f; | 126 | F32 d = 0.f; |
122 | F32 t; | 127 | F32 t; |
123 | F32 r = rad*rad; | 128 | |
124 | |||
125 | if ((min-origin).magVecSquared() < r && | 129 | if ((min-origin).magVecSquared() < r && |
126 | (max-origin).magVecSquared() < r) | 130 | (max-origin).magVecSquared() < r) |
127 | { | 131 | { |