aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewerregion.h
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llviewerregion.h')
-rw-r--r--linden/indra/newview/llviewerregion.h31
1 files changed, 28 insertions, 3 deletions
diff --git a/linden/indra/newview/llviewerregion.h b/linden/indra/newview/llviewerregion.h
index b8e19cc..d4032cf 100644
--- a/linden/indra/newview/llviewerregion.h
+++ b/linden/indra/newview/llviewerregion.h
@@ -44,7 +44,6 @@
44#include "llhost.h" 44#include "llhost.h"
45#include "llstring.h" 45#include "llstring.h"
46#include "llregionflags.h" 46#include "llregionflags.h"
47#include "llptrskipmap.h"
48#include "lluuid.h" 47#include "lluuid.h"
49#include "lldatapacker.h" 48#include "lldatapacker.h"
50#include "llvocache.h" 49#include "llvocache.h"
@@ -64,10 +63,27 @@ class LLViewerParcelOverlay;
64class LLSurface; 63class LLSurface;
65class LLVOCache; 64class LLVOCache;
66class LLVOCacheEntry; 65class LLVOCacheEntry;
66class LLSpatialPartition;
67 67
68class LLViewerRegion 68class LLViewerRegion
69{ 69{
70public: 70public:
71 //MUST MATCH THE ORDER OF DECLARATION IN CONSTRUCTOR
72 typedef enum
73 {
74 PARTITION_HUD=0,
75 PARTITION_TERRAIN,
76 PARTITION_WATER,
77 PARTITION_TREE,
78 PARTITION_PARTICLE,
79 PARTITION_CLOUD,
80 PARTITION_GRASS,
81 PARTITION_VOLUME,
82 PARTITION_BRIDGE,
83 PARTITION_NONE,
84 NUM_PARTITIONS
85 } eObjectPartitions;
86
71 LLViewerRegion(const U64 &handle, 87 LLViewerRegion(const U64 &handle,
72 const LLHost &host, 88 const LLHost &host,
73 const U32 surface_grid_width, 89 const U32 surface_grid_width,
@@ -84,7 +100,8 @@ public:
84 void sendReliableMessage(); // Send the current message to this region's simulator 100 void sendReliableMessage(); // Send the current message to this region's simulator
85 101
86 void setOriginGlobal(const LLVector3d &origin); 102 void setOriginGlobal(const LLVector3d &origin);
87 void setAgentOffset(const LLVector3d &offset); 103 //void setAgentOffset(const LLVector3d &offset);
104 void updateRenderMatrix();
88 105
89 void setAllowDamage(BOOL b) { setFlags(b, REGION_FLAGS_ALLOW_DAMAGE); } 106 void setAllowDamage(BOOL b) { setFlags(b, REGION_FLAGS_ALLOW_DAMAGE); }
90 void setAllowLandmark(BOOL b) { setFlags(b, REGION_FLAGS_ALLOW_LANDMARK); } 107 void setAllowLandmark(BOOL b) { setFlags(b, REGION_FLAGS_ALLOW_LANDMARK); }
@@ -245,6 +262,7 @@ public:
245 // used by LCD to get details for debug screen 262 // used by LCD to get details for debug screen
246 U32 getNetDetailsForLCD(); 263 U32 getNetDetailsForLCD();
247 264
265 LLSpatialPartition* getSpatialPartition(U32 type);
248public: 266public:
249 struct CompareDistance 267 struct CompareDistance
250 { 268 {
@@ -270,6 +288,8 @@ public:
270 LLStat mPacketsStat; 288 LLStat mPacketsStat;
271 LLStat mPacketsLostStat; 289 LLStat mPacketsLostStat;
272 290
291 LLMatrix4 mRenderMatrix;
292
273 // These arrays are maintained in parallel. Ideally they'd be combined into a 293 // These arrays are maintained in parallel. Ideally they'd be combined into a
274 // single array of an aggrigate data type but for compatibility with the old 294 // single array of an aggrigate data type but for compatibility with the old
275 // messaging system in which the previous message only sends and parses the 295 // messaging system in which the previous message only sends and parses the
@@ -331,7 +351,8 @@ protected:
331 // Regions can have order 10,000 objects, so assume 351 // Regions can have order 10,000 objects, so assume
332 // a structure of size 2^14 = 16,000 352 // a structure of size 2^14 = 16,000
333 BOOL mCacheLoaded; 353 BOOL mCacheLoaded;
334 LLPtrSkipMap<U32, LLVOCacheEntry *, 14> mCacheMap; 354 typedef std::map<U32, LLVOCacheEntry *> cache_map_t;
355 cache_map_t mCacheMap;
335 LLVOCacheEntry mCacheStart; 356 LLVOCacheEntry mCacheStart;
336 LLVOCacheEntry mCacheEnd; 357 LLVOCacheEntry mCacheEnd;
337 U32 mCacheEntriesCount; 358 U32 mCacheEntriesCount;
@@ -348,6 +369,10 @@ protected:
348 CapabilityMap mCapabilities; 369 CapabilityMap mCapabilities;
349 370
350 LLEventPoll* mEventPoll; 371 LLEventPoll* mEventPoll;
372
373private:
374 //spatial partitions for objects in this region
375 std::vector<LLSpatialPartition*> mObjectPartition;
351}; 376};
352 377
353inline BOOL LLViewerRegion::getAllowDamage() const 378inline BOOL LLViewerRegion::getAllowDamage() const