summaryrefslogtreecommitdiff
path: root/indra/llwindow/llwindow.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2012-05-08 10:18:03 -0700
committerMerov Linden <merov@lindenlab.com>2012-05-08 10:18:03 -0700
commit60f602d5e12a50623b51b13e097992f79006823f (patch)
tree386e3cf5b25f3292e3ba7c8a9b0524c5bfbb9589 /indra/llwindow/llwindow.cpp
parent29da931051202a10ea71db56e47acecae1603a5d (diff)
parentccb86a2a6675b21dda6267d4a850e5a09acbafa4 (diff)
Pull from VirLinden/drano
Diffstat (limited to 'indra/llwindow/llwindow.cpp')
-rw-r--r--indra/llwindow/llwindow.cpp39
1 files changed, 39 insertions, 0 deletions
diff --git a/indra/llwindow/llwindow.cpp b/indra/llwindow/llwindow.cpp
index 2e9e31bfea..6834b34387 100644
--- a/indra/llwindow/llwindow.cpp
+++ b/indra/llwindow/llwindow.cpp
@@ -436,3 +436,42 @@ BOOL LLWindowManager::isWindowValid(LLWindow *window)
{
return sWindowList.find(window) != sWindowList.end();
}
+
+//coordinate conversion utility funcs that forward to llwindow
+LLCoordCommon LL_COORD_TYPE_WINDOW::convertToCommon() const
+{
+ const LLCoordWindow& self = static_cast<const LLCoordWindow&>(*this);
+
+ LLWindow* windowp = &(*LLWindow::beginInstances());
+ LLCoordGL out;
+ windowp->convertCoords(self, &out);
+ return out.convert();
+}
+
+void LL_COORD_TYPE_WINDOW::convertFromCommon(const LLCoordCommon& from)
+{
+ LLCoordWindow& self = static_cast<LLCoordWindow&>(*this);
+
+ LLWindow* windowp = &(*LLWindow::beginInstances());
+ LLCoordGL from_gl(from);
+ windowp->convertCoords(from_gl, &self);
+}
+
+LLCoordCommon LL_COORD_TYPE_SCREEN::convertToCommon() const
+{
+ const LLCoordScreen& self = static_cast<const LLCoordScreen&>(*this);
+
+ LLWindow* windowp = &(*LLWindow::beginInstances());
+ LLCoordGL out;
+ windowp->convertCoords(self, &out);
+ return out.convert();
+}
+
+void LL_COORD_TYPE_SCREEN::convertFromCommon(const LLCoordCommon& from)
+{
+ LLCoordScreen& self = static_cast<LLCoordScreen&>(*this);
+
+ LLWindow* windowp = &(*LLWindow::beginInstances());
+ LLCoordGL from_gl(from);
+ windowp->convertCoords(from_gl, &self);
+}