summaryrefslogtreecommitdiff
path: root/indra/newview/llworld.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llworld.h')
-rw-r--r--indra/newview/llworld.h206
1 files changed, 103 insertions, 103 deletions
diff --git a/indra/newview/llworld.h b/indra/newview/llworld.h
index 2878d10f5e..fae7f58b66 100644
--- a/indra/newview/llworld.h
+++ b/indra/newview/llworld.h
@@ -1,4 +1,4 @@
-/**
+/**
* @file llworld.h
* @brief Collection of viewer regions in the vacinity of the user.
*
@@ -10,21 +10,21 @@
* $LicenseInfo:firstyear=2001&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2010, Linden Research, Inc.
- *
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
- *
+ *
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ *
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
@@ -69,106 +69,106 @@ public:
// Prepares class to be reused or destroyed
void resetClass();
- LLViewerRegion* addRegion(const U64 &region_handle, const LLHost &host);
- // safe to call if already present, does the "right thing" if
- // hosts are same, or if hosts are different, etc...
- void removeRegion(const LLHost &host);
+ LLViewerRegion* addRegion(const U64 &region_handle, const LLHost &host);
+ // safe to call if already present, does the "right thing" if
+ // hosts are same, or if hosts are different, etc...
+ void removeRegion(const LLHost &host);
- void disconnectRegions(); // Send quit messages to all child regions
+ void disconnectRegions(); // Send quit messages to all child regions
- LLViewerRegion* getRegion(const LLHost &host);
- LLViewerRegion* getRegionFromPosGlobal(const LLVector3d &pos);
- LLViewerRegion* getRegionFromPosAgent(const LLVector3 &pos);
- LLViewerRegion* getRegionFromHandle(const U64 &handle);
- LLViewerRegion* getRegionFromID(const LLUUID& region_id);
- BOOL positionRegionValidGlobal(const LLVector3d& pos); // true if position is in valid region
- LLVector3d clipToVisibleRegions(const LLVector3d &start_pos, const LLVector3d &end_pos);
+ LLViewerRegion* getRegion(const LLHost &host);
+ LLViewerRegion* getRegionFromPosGlobal(const LLVector3d &pos);
+ LLViewerRegion* getRegionFromPosAgent(const LLVector3 &pos);
+ LLViewerRegion* getRegionFromHandle(const U64 &handle);
+ LLViewerRegion* getRegionFromID(const LLUUID& region_id);
+ BOOL positionRegionValidGlobal(const LLVector3d& pos); // true if position is in valid region
+ LLVector3d clipToVisibleRegions(const LLVector3d &start_pos, const LLVector3d &end_pos);
- void updateAgentOffset(const LLVector3d &offset);
+ void updateAgentOffset(const LLVector3d &offset);
- // All of these should be in the agent coordinate frame
- LLViewerRegion* resolveRegionGlobal(LLVector3 &localpos, const LLVector3d &position);
- LLViewerRegion* resolveRegionAgent(LLVector3 &localpos, const LLVector3 &position);
- F32 resolveLandHeightGlobal(const LLVector3d &position);
- F32 resolveLandHeightAgent(const LLVector3 &position);
+ // All of these should be in the agent coordinate frame
+ LLViewerRegion* resolveRegionGlobal(LLVector3 &localpos, const LLVector3d &position);
+ LLViewerRegion* resolveRegionAgent(LLVector3 &localpos, const LLVector3 &position);
+ F32 resolveLandHeightGlobal(const LLVector3d &position);
+ F32 resolveLandHeightAgent(const LLVector3 &position);
- // Return the lowest allowed Z point to prevent objects from being moved
- // underground.
- F32 getMinAllowedZ(LLViewerObject* object, const LLVector3d &global_pos);
+ // Return the lowest allowed Z point to prevent objects from being moved
+ // underground.
+ F32 getMinAllowedZ(LLViewerObject* object, const LLVector3d &global_pos);
- // takes a line segment defined by point_a and point_b, then
- // determines the closest (to point_a) point of intersection that is
- // on the land surface or on an object of the world.
- // Stores results in "intersection" and "intersection_normal" and
- // returns a scalar value that is the normalized (by length of line segment)
- // distance along the line from "point_a" to "intersection".
- //
- // Currently assumes point_a and point_b only differ in z-direction,
- // but it may eventually become more general.
- F32 resolveStepHeightGlobal(const LLVOAvatar* avatarp, const LLVector3d &point_a, const LLVector3d &point_b,
- LLVector3d &intersection, LLVector3 &intersection_normal,
- LLViewerObject** viewerObjectPtr=NULL);
+ // takes a line segment defined by point_a and point_b, then
+ // determines the closest (to point_a) point of intersection that is
+ // on the land surface or on an object of the world.
+ // Stores results in "intersection" and "intersection_normal" and
+ // returns a scalar value that is the normalized (by length of line segment)
+ // distance along the line from "point_a" to "intersection".
+ //
+ // Currently assumes point_a and point_b only differ in z-direction,
+ // but it may eventually become more general.
+ F32 resolveStepHeightGlobal(const LLVOAvatar* avatarp, const LLVector3d &point_a, const LLVector3d &point_b,
+ LLVector3d &intersection, LLVector3 &intersection_normal,
+ LLViewerObject** viewerObjectPtr=NULL);
- LLSurfacePatch * resolveLandPatchGlobal(const LLVector3d &position);
- LLVector3 resolveLandNormalGlobal(const LLVector3d &position); // absolute frame
+ LLSurfacePatch * resolveLandPatchGlobal(const LLVector3d &position);
+ LLVector3 resolveLandNormalGlobal(const LLVector3d &position); // absolute frame
- U32 getRegionWidthInPoints() const { return mWidth; }
- F32 getRegionScale() const { return mScale; }
+ U32 getRegionWidthInPoints() const { return mWidth; }
+ F32 getRegionScale() const { return mScale; }
- // region X and Y size in meters
- F32 getRegionWidthInMeters() const { return mWidthInMeters; }
- F32 getRegionMinHeight() const { return -mWidthInMeters; }
- F32 getRegionMaxHeight() const { return MAX_OBJECT_Z; }
+ // region X and Y size in meters
+ F32 getRegionWidthInMeters() const { return mWidthInMeters; }
+ F32 getRegionMinHeight() const { return -mWidthInMeters; }
+ F32 getRegionMaxHeight() const { return MAX_OBJECT_Z; }
- void updateRegions(F32 max_update_time);
- void updateVisibilities();
- void updateParticles();
+ void updateRegions(F32 max_update_time);
+ void updateVisibilities();
+ void updateParticles();
- void renderPropertyLines();
+ void renderPropertyLines();
- void updateNetStats(); // Update network statistics for all the regions...
+ void updateNetStats(); // Update network statistics for all the regions...
- void printPacketsLost();
- void requestCacheMisses();
+ void printPacketsLost();
+ void requestCacheMisses();
- // deal with map object updates in the world.
- static void processCoarseUpdate(LLMessageSystem* msg, void** user_data);
+ // deal with map object updates in the world.
+ static void processCoarseUpdate(LLMessageSystem* msg, void** user_data);
- F32 getLandFarClip() const;
- void setLandFarClip(const F32 far_clip);
+ F32 getLandFarClip() const;
+ void setLandFarClip(const F32 far_clip);
- LLViewerTexture *getDefaultWaterTexture();
+ LLViewerTexture *getDefaultWaterTexture();
void updateWaterObjects();
- void waterHeightRegionInfo(std::string const& sim_name, F32 water_height);
- void shiftRegions(const LLVector3& offset);
+ void waterHeightRegionInfo(std::string const& sim_name, F32 water_height);
+ void shiftRegions(const LLVector3& offset);
- void setSpaceTimeUSec(const U64MicrosecondsImplicit space_time_usec);
- U64MicrosecondsImplicit getSpaceTimeUSec() const;
+ void setSpaceTimeUSec(const U64MicrosecondsImplicit space_time_usec);
+ U64MicrosecondsImplicit getSpaceTimeUSec() const;
- void getInfo(LLSD& info);
- U32 getNumOfActiveCachedObjects() const {return mNumOfActiveCachedObjects;}
+ void getInfo(LLSD& info);
+ U32 getNumOfActiveCachedObjects() const {return mNumOfActiveCachedObjects;}
- void clearAllVisibleObjects();
+ void clearAllVisibleObjects();
public:
- typedef std::list<LLViewerRegion*> region_list_t;
- const region_list_t& getRegionList() const { return mActiveRegionList; }
+ typedef std::list<LLViewerRegion*> region_list_t;
+ const region_list_t& getRegionList() const { return mActiveRegionList; }
- typedef boost::signals2::signal<void(LLViewerRegion*)> region_remove_signal_t;
- boost::signals2::connection setRegionRemovedCallback(const region_remove_signal_t::slot_type& cb);
+ typedef boost::signals2::signal<void(LLViewerRegion*)> region_remove_signal_t;
+ boost::signals2::connection setRegionRemovedCallback(const region_remove_signal_t::slot_type& cb);
- // Returns lists of avatar IDs and their world-space positions within a given distance of a point.
- // All arguments are optional. Given containers will be emptied and then filled.
- // Not supplying origin or radius input returns data on all avatars in the known regions.
- void getAvatars(
- uuid_vec_t* avatar_ids = NULL,
- std::vector<LLVector3d>* positions = NULL,
- const LLVector3d& relative_to = LLVector3d(), F32 radius = FLT_MAX) const;
+ // Returns lists of avatar IDs and their world-space positions within a given distance of a point.
+ // All arguments are optional. Given containers will be emptied and then filled.
+ // Not supplying origin or radius input returns data on all avatars in the known regions.
+ void getAvatars(
+ uuid_vec_t* avatar_ids = NULL,
+ std::vector<LLVector3d>* positions = NULL,
+ const LLVector3d& relative_to = LLVector3d(), F32 radius = FLT_MAX) const;
- // Returns 'true' if the region is in mRegionList,
- // 'false' if the region has been removed due to region change
- // or if the circuit to this simulator had been lost.
- bool isRegionListed(const LLViewerRegion* region) const;
+ // Returns 'true' if the region is in mRegionList,
+ // 'false' if the region has been removed due to region change
+ // or if the circuit to this simulator had been lost.
+ bool isRegionListed(const LLViewerRegion* region) const;
// profile nearby avatars using gPipeline.profileAvatar and update their render times
// return max GPU time
@@ -178,39 +178,39 @@ private:
void clearHoleWaterObjects();
void clearEdgeWaterObjects();
- region_list_t mActiveRegionList;
- region_list_t mRegionList;
- region_list_t mVisibleRegionList;
- region_list_t mCulledRegionList;
+ region_list_t mActiveRegionList;
+ region_list_t mRegionList;
+ region_list_t mVisibleRegionList;
+ region_list_t mCulledRegionList;
- region_remove_signal_t mRegionRemovedSignal;
+ region_remove_signal_t mRegionRemovedSignal;
- // Number of points on edge
- static const U32 mWidth;
+ // Number of points on edge
+ static const U32 mWidth;
- // meters/point, therefore mWidth * mScale = meters per edge
- static const F32 mScale;
+ // meters/point, therefore mWidth * mScale = meters per edge
+ static const F32 mScale;
- static const F32 mWidthInMeters;
+ static const F32 mWidthInMeters;
- F32 mLandFarClip; // Far clip distance for land.
- LLPatchVertexArray mLandPatch;
- S32 mLastPacketsIn;
- S32 mLastPacketsOut;
- S32 mLastPacketsLost;
- U32 mNumOfActiveCachedObjects;
- U64MicrosecondsImplicit mSpaceTimeUSec;
+ F32 mLandFarClip; // Far clip distance for land.
+ LLPatchVertexArray mLandPatch;
+ S32 mLastPacketsIn;
+ S32 mLastPacketsOut;
+ S32 mLastPacketsLost;
+ U32 mNumOfActiveCachedObjects;
+ U64MicrosecondsImplicit mSpaceTimeUSec;
- ////////////////////////////
- //
- // Data for "Fake" objects
- //
+ ////////////////////////////
+ //
+ // Data for "Fake" objects
+ //
- std::list<LLPointer<LLVOWater> > mHoleWaterObjects;
+ std::list<LLPointer<LLVOWater> > mHoleWaterObjects;
static const S32 EDGE_WATER_OBJECTS_COUNT = 8;
LLPointer<LLVOWater> mEdgeWaterObjects[EDGE_WATER_OBJECTS_COUNT];
- LLPointer<LLViewerTexture> mDefaultWaterTexturep;
+ LLPointer<LLViewerTexture> mDefaultWaterTexturep;
};