From cd17687f01420952712a500107e0f93e7ab8d5f8 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Fri, 15 Aug 2008 23:45:34 -0500 Subject: Second Life viewer sources 1.19.1.0 --- linden/indra/newview/llviewerregion.h | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) (limited to 'linden/indra/newview/llviewerregion.h') 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 @@ #include "llhost.h" #include "llstring.h" #include "llregionflags.h" -#include "llptrskipmap.h" #include "lluuid.h" #include "lldatapacker.h" #include "llvocache.h" @@ -64,10 +63,27 @@ class LLViewerParcelOverlay; class LLSurface; class LLVOCache; class LLVOCacheEntry; +class LLSpatialPartition; class LLViewerRegion { public: + //MUST MATCH THE ORDER OF DECLARATION IN CONSTRUCTOR + typedef enum + { + PARTITION_HUD=0, + PARTITION_TERRAIN, + PARTITION_WATER, + PARTITION_TREE, + PARTITION_PARTICLE, + PARTITION_CLOUD, + PARTITION_GRASS, + PARTITION_VOLUME, + PARTITION_BRIDGE, + PARTITION_NONE, + NUM_PARTITIONS + } eObjectPartitions; + LLViewerRegion(const U64 &handle, const LLHost &host, const U32 surface_grid_width, @@ -84,7 +100,8 @@ public: void sendReliableMessage(); // Send the current message to this region's simulator void setOriginGlobal(const LLVector3d &origin); - void setAgentOffset(const LLVector3d &offset); + //void setAgentOffset(const LLVector3d &offset); + void updateRenderMatrix(); void setAllowDamage(BOOL b) { setFlags(b, REGION_FLAGS_ALLOW_DAMAGE); } void setAllowLandmark(BOOL b) { setFlags(b, REGION_FLAGS_ALLOW_LANDMARK); } @@ -245,6 +262,7 @@ public: // used by LCD to get details for debug screen U32 getNetDetailsForLCD(); + LLSpatialPartition* getSpatialPartition(U32 type); public: struct CompareDistance { @@ -270,6 +288,8 @@ public: LLStat mPacketsStat; LLStat mPacketsLostStat; + LLMatrix4 mRenderMatrix; + // These arrays are maintained in parallel. Ideally they'd be combined into a // single array of an aggrigate data type but for compatibility with the old // messaging system in which the previous message only sends and parses the @@ -331,7 +351,8 @@ protected: // Regions can have order 10,000 objects, so assume // a structure of size 2^14 = 16,000 BOOL mCacheLoaded; - LLPtrSkipMap mCacheMap; + typedef std::map cache_map_t; + cache_map_t mCacheMap; LLVOCacheEntry mCacheStart; LLVOCacheEntry mCacheEnd; U32 mCacheEntriesCount; @@ -348,6 +369,10 @@ protected: CapabilityMap mCapabilities; LLEventPoll* mEventPoll; + +private: + //spatial partitions for objects in this region + std::vector mObjectPartition; }; inline BOOL LLViewerRegion::getAllowDamage() const -- cgit v1.1