summaryrefslogtreecommitdiff
path: root/indra/newview/llslurl.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2009-08-14 21:50:02 +0000
committerSteven Bennetts <steve@lindenlab.com>2009-08-14 21:50:02 +0000
commit73caee4208a4e05f66583de099502012fd8415ea (patch)
treeff9fa1b7b010e71fb62f26a32c912b5e266f3b23 /indra/newview/llslurl.cpp
parent1db494f58ad378b8028c1f071196be82af5fe964 (diff)
svn merge https://svn.aws.productengine.com/secondlife/export-from-ll/viewer-2-0@1331 https://svn.aws.productengine.com/secondlife/pe/stable-1@1340 -> viewer-2.0.0-3
EXT-269 EXT-274 EXT-276 EXT-277 EXT-282 EXT-296 EXT-342 EXT-370 EXT-379 EXT-394 EXT-398 EXT-405 EXT-407 EXT-410 EXT-413 EXT-414 EXT-450 EXT-456 EXT-477 EXT-482 EXT-496
Diffstat (limited to 'indra/newview/llslurl.cpp')
-rw-r--r--indra/newview/llslurl.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/indra/newview/llslurl.cpp b/indra/newview/llslurl.cpp
index ffadeeddf2..f6c4710d60 100644
--- a/indra/newview/llslurl.cpp
+++ b/indra/newview/llslurl.cpp
@@ -113,6 +113,19 @@ std::string LLSLURL::buildUnescapedSLURL(const std::string& regionname, S32 x, S
}
// static
+std::string LLSLURL::buildSLURLfromPosGlobal(const std::string& regionname,
+ const LLVector3d& global_pos)
+{
+ F32 region_x = (F32)fmod(global_pos.mdV[VX], (F64)REGION_WIDTH_METERS);
+ F32 region_y = (F32)fmod(global_pos.mdV[VY], (F64)REGION_WIDTH_METERS);
+
+ return buildSLURL(regionname,
+ llround(region_x),
+ llround(region_y),
+ llround((F32)global_pos.mdV[VZ]));
+}
+
+// static
bool LLSLURL::matchPrefix(const std::string& url, const std::string& prefix)
{
std::string test_prefix = url.substr(0, prefix.length());