aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llmath/llcamera.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/llmath/llcamera.cpp')
-rw-r--r--linden/indra/llmath/llcamera.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/linden/indra/llmath/llcamera.cpp b/linden/indra/llmath/llcamera.cpp
index e6b6797..9c37fcf 100644
--- a/linden/indra/llmath/llcamera.cpp
+++ b/linden/indra/llmath/llcamera.cpp
@@ -246,6 +246,10 @@ S32 LLCamera::AABBInFrustum(const LLVector3 &center, const LLVector3& radius)
246 for (U32 i = 0; i < mPlaneCount; i++) 246 for (U32 i = 0; i < mPlaneCount; i++)
247 { 247 {
248 mask = mAgentPlanes[i].mask; 248 mask = mAgentPlanes[i].mask;
249 if (mask == 0xff)
250 {
251 continue;
252 }
249 LLPlane p = mAgentPlanes[i].p; 253 LLPlane p = mAgentPlanes[i].p;
250 LLVector3 n = LLVector3(p); 254 LLVector3 n = LLVector3(p);
251 float d = p.mV[3]; 255 float d = p.mV[3];
@@ -294,6 +298,10 @@ S32 LLCamera::AABBInFrustumNoFarClip(const LLVector3 &center, const LLVector3& r
294 } 298 }
295 299
296 mask = mAgentPlanes[i].mask; 300 mask = mAgentPlanes[i].mask;
301 if (mask == 0xff)
302 {
303 continue;
304 }
297 LLPlane p = mAgentPlanes[i].p; 305 LLPlane p = mAgentPlanes[i].p;
298 LLVector3 n = LLVector3(p); 306 LLVector3 n = LLVector3(p);
299 float d = p.mV[3]; 307 float d = p.mV[3];
@@ -437,6 +445,11 @@ int LLCamera::sphereInFrustum(const LLVector3 &sphere_center, const F32 radius)
437 int res = 2; 445 int res = 2;
438 for (int i = 0; i < 6; i++) 446 for (int i = 0; i < 6; i++)
439 { 447 {
448 if (mAgentPlanes[i].mask == 0xff)
449 {
450 continue;
451 }
452
440 float d = mAgentPlanes[i].p.dist(sphere_center); 453 float d = mAgentPlanes[i].p.dist(sphere_center);
441 454
442 if (d > radius) 455 if (d > radius)
@@ -622,6 +635,17 @@ U8 LLCamera::calcPlaneMask(const LLPlane& plane)
622 return mask; 635 return mask;
623} 636}
624 637
638void LLCamera::ignoreAgentFrustumPlane(S32 idx)
639{
640 if (idx < 0 || idx > (S32) mPlaneCount)
641 {
642 return;
643 }
644
645 mAgentPlanes[idx].mask = 0xff;
646 mAgentPlanes[idx].p.clearVec();
647}
648
625void LLCamera::calcAgentFrustumPlanes(LLVector3* frust) 649void LLCamera::calcAgentFrustumPlanes(LLVector3* frust)
626{ 650{
627 651