summaryrefslogtreecommitdiff
path: root/indra/llmath/llcamera.h
diff options
context:
space:
mode:
authorRichard Linden <none@none>2013-01-11 10:27:03 -0800
committerRichard Linden <none@none>2013-01-11 10:27:03 -0800
commit17c051f965e05a8a91d4a93b641084869897fe71 (patch)
tree1227bfab5e2039b2d78061adbd549e8481ce4fdc /indra/llmath/llcamera.h
parent62a9f557d2e91beb685843775e8f9fe73dab4b94 (diff)
parentefa6be575c184a885d2b7e6f2142db6777668343 (diff)
Automated merge with file:///c:%5Ccode%5Cviewer-interesting-metrics
Diffstat (limited to 'indra/llmath/llcamera.h')
-rw-r--r--indra/llmath/llcamera.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/indra/llmath/llcamera.h b/indra/llmath/llcamera.h
index 0b591be622..898d73ed7e 100644
--- a/indra/llmath/llcamera.h
+++ b/indra/llmath/llcamera.h
@@ -109,6 +109,7 @@ public:
private:
LL_ALIGN_16(LLPlane mAgentPlanes[7]); //frustum planes in agent space a la gluUnproject (I'm a bastard, I know) - DaveP
+ LL_ALIGN_16(LLPlane mRegionPlanes[7]); //frustum planes in a local region space, derived from mAgentPlanes
U8 mPlaneMask[8]; // 8 for alignment
F32 mView; // angle between top and bottom frustum planes in radians.
@@ -178,6 +179,7 @@ public:
// Return number of bytes copied.
size_t readFrustumFromBuffer(const char *buffer);
void calcAgentFrustumPlanes(LLVector3* frust);
+ void calcRegionFrustumPlanes(const LLVector3& shift); //calculate regional planes from mAgentPlanes.
void ignoreAgentFrustumPlane(S32 idx);
// Returns 1 if partly in, 2 if fully in.
@@ -186,8 +188,10 @@ public:
S32 sphereInFrustum(const LLVector3 &center, const F32 radius) const;
S32 pointInFrustum(const LLVector3 &point) const { return sphereInFrustum(point, 0.0f); }
S32 sphereInFrustumFull(const LLVector3 &center, const F32 radius) const { return sphereInFrustum(center, radius); }
- S32 AABBInFrustum(const LLVector4a& center, const LLVector4a& radius);
- S32 AABBInFrustumNoFarClip(const LLVector4a& center, const LLVector4a& radius);
+ S32 AABBInFrustum(const LLVector4a& center, const LLVector4a& radius, const LLPlane* planes = NULL);
+ S32 AABBInRegionFrustum(const LLVector4a& center, const LLVector4a& radius);
+ S32 AABBInFrustumNoFarClip(const LLVector4a& center, const LLVector4a& radius, const LLPlane* planes = NULL);
+ S32 AABBInRegionFrustumNoFarClip(const LLVector4a& center, const LLVector4a& radius);
//does a quick 'n dirty sphere-sphere check
S32 sphereInFrustumQuick(const LLVector3 &sphere_center, const F32 radius);