summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerregion.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewerregion.h')
-rw-r--r--indra/newview/llviewerregion.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h
index 1dc1b3af20..05c37fe08f 100644
--- a/indra/newview/llviewerregion.h
+++ b/indra/newview/llviewerregion.h
@@ -208,9 +208,19 @@ public:
void unpackRegionHandshake();
void calculateCenterGlobal();
+ void calculateCameraDistance();
friend std::ostream& operator<<(std::ostream &s, const LLViewerRegion &region);
+public:
+ struct CompareDistance
+ {
+ bool operator()(const LLViewerRegion* const& lhs, const LLViewerRegion* const& rhs)
+ {
+ return lhs->mCameraDistanceSquared < rhs->mCameraDistanceSquared;
+ }
+ };
+
protected:
void disconnectAllNeighbors();
void initStats();
@@ -265,13 +275,15 @@ protected:
U32 mPingDelay;
F32 mDeltaTime; // Time since last measurement of lastPackets, Bits, etc
+ // Misc
LLVLComposition *mCompositionp; // Composition layer for the surface
U32 mRegionFlags; // includes damage flags
U8 mSimAccess;
F32 mBillableFactor;
U32 mMaxTasks; // max prim count
-
+ F32 mCameraDistanceSquared; // updated once per frame
+
// Maps local ids to cache entries.
// Regions can have order 10,000 objects, so assume
// a structure of size 2^14 = 16,000