summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerregion.h
diff options
context:
space:
mode:
authorJosh Bell <josh@lindenlab.com>2007-03-31 01:41:19 +0000
committerJosh Bell <josh@lindenlab.com>2007-03-31 01:41:19 +0000
commitea8fb7238e6f12383ee4bc081475fa6235637581 (patch)
treef384da93c884353bef55cf887f6c86f2081db271 /indra/newview/llviewerregion.h
parentffc6680d956069625fc1fe5da133bdf7922cea83 (diff)
svn merge -r 59364:59813 svn+ssh://svn.lindenlab.com/svn/linden/branches/maintenance --> release
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