diff options
author | Josh Bell <josh@lindenlab.com> | 2007-03-31 01:41:19 +0000 |
---|---|---|
committer | Josh Bell <josh@lindenlab.com> | 2007-03-31 01:41:19 +0000 |
commit | ea8fb7238e6f12383ee4bc081475fa6235637581 (patch) | |
tree | f384da93c884353bef55cf887f6c86f2081db271 /indra/newview/llviewerregion.cpp | |
parent | ffc6680d956069625fc1fe5da133bdf7922cea83 (diff) |
svn merge -r 59364:59813 svn+ssh://svn.lindenlab.com/svn/linden/branches/maintenance --> release
Diffstat (limited to 'indra/newview/llviewerregion.cpp')
-rw-r--r-- | indra/newview/llviewerregion.cpp | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 262c7d8ed7..3bc529a9e3 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -422,7 +422,6 @@ LLVector3 LLViewerRegion::getCenterAgent() const return gAgent.getPosAgentFromGlobal(mCenterGlobal); } - void LLViewerRegion::setRegionNameAndZone(const char* name_and_zone) { LLString name_zone(name_and_zone); @@ -705,21 +704,6 @@ F32 LLViewerRegion::getCompositionXY(const S32 x, const S32 y) const return getComposition()->getValueScaled((F32)x, (F32)y); } - -// ---------------- Friends ---------------- - -std::ostream& operator<<(std::ostream &s, const LLViewerRegion ®ion) -{ - s << "{ "; - s << region.mHost; - s << " mOriginGlobal = " << region.getOriginGlobal()<< "\n"; - s << "}"; - return s; -} - - -// ---------------- Protected Member Functions ---------------- - void LLViewerRegion::calculateCenterGlobal() { mCenterGlobal = mOriginGlobal; @@ -735,7 +719,24 @@ void LLViewerRegion::calculateCenterGlobal() } } +void LLViewerRegion::calculateCameraDistance() +{ + mCameraDistanceSquared = (F32)(gAgent.getCameraPositionGlobal() - getCenterGlobal()).magVecSquared(); +} + +// ---------------- Friends ---------------- +std::ostream& operator<<(std::ostream &s, const LLViewerRegion ®ion) +{ + s << "{ "; + s << region.mHost; + s << " mOriginGlobal = " << region.getOriginGlobal()<< "\n"; + s << "}"; + return s; +} + + +// ---------------- Protected Member Functions ---------------- void LLViewerRegion::updateNetStats() { |