diff options
author | David Parks <davep@lindenlab.com> | 2009-09-22 11:11:45 +0000 |
---|---|---|
committer | David Parks <davep@lindenlab.com> | 2009-09-22 11:11:45 +0000 |
commit | 536e38ad51b89808f26d8e3cd107fe093862d22a (patch) | |
tree | 230159ae9e319f5c419f1a643177b2bbb17d52c5 /indra/llmath/llcamera.cpp | |
parent | 760adead96e62cab8f9cdacc6469773a87dfbc1a (diff) |
Merging render-pipeline-6-qa-2 into viewer-2
Self reviewed.
Diffstat (limited to 'indra/llmath/llcamera.cpp')
-rw-r--r-- | indra/llmath/llcamera.cpp | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/indra/llmath/llcamera.cpp b/indra/llmath/llcamera.cpp index 0f343bcefe..21ea4b2e7c 100644 --- a/indra/llmath/llcamera.cpp +++ b/indra/llmath/llcamera.cpp @@ -178,7 +178,7 @@ S32 LLCamera::AABBInFrustum(const LLVector3 ¢er, const LLVector3& radius) U8 mask = 0; S32 result = 2; - if (radius.magVecSquared() > mFrustumCornerDist * mFrustumCornerDist) + /*if (mFrustumCornerDist > 0.f && radius.magVecSquared() > mFrustumCornerDist * mFrustumCornerDist) { //box is larger than frustum, check frustum quads against box planes static const LLVector3 dir[] = @@ -241,11 +241,15 @@ S32 LLCamera::AABBInFrustum(const LLVector3 ¢er, const LLVector3& radius) result = 1; } } - else + else*/ { for (U32 i = 0; i < mPlaneCount; i++) { mask = mAgentPlanes[i].mask; + if (mask == 0xff) + { + continue; + } LLPlane p = mAgentPlanes[i].p; LLVector3 n = LLVector3(p); float d = p.mV[3]; @@ -294,6 +298,10 @@ S32 LLCamera::AABBInFrustumNoFarClip(const LLVector3 ¢er, const LLVector3& r } mask = mAgentPlanes[i].mask; + if (mask == 0xff) + { + continue; + } LLPlane p = mAgentPlanes[i].p; LLVector3 n = LLVector3(p); float d = p.mV[3]; @@ -437,6 +445,11 @@ int LLCamera::sphereInFrustum(const LLVector3 &sphere_center, const F32 radius) int res = 2; for (int i = 0; i < 6; i++) { + if (mAgentPlanes[i].mask == 0xff) + { + continue; + } + float d = mAgentPlanes[i].p.dist(sphere_center); if (d > radius) @@ -622,6 +635,17 @@ U8 LLCamera::calcPlaneMask(const LLPlane& plane) return mask; } +void LLCamera::ignoreAgentFrustumPlane(S32 idx) +{ + if (idx < 0 || idx > (S32) mPlaneCount) + { + return; + } + + mAgentPlanes[idx].mask = 0xff; + mAgentPlanes[idx].p.clearVec(); +} + void LLCamera::calcAgentFrustumPlanes(LLVector3* frust) { |