summaryrefslogtreecommitdiff
path: root/indra/newview/llregionposition.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llregionposition.h')
-rw-r--r--indra/newview/llregionposition.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/indra/newview/llregionposition.h b/indra/newview/llregionposition.h
new file mode 100644
index 0000000000..a505da2833
--- /dev/null
+++ b/indra/newview/llregionposition.h
@@ -0,0 +1,43 @@
+/**
+ * @file llregionposition.h
+ * @brief Region position storing class definition
+ *
+ * Copyright (c) 2001-$CurrentYear$, Linden Research, Inc.
+ * $License$
+ */
+
+#ifndef LL_LLREGIONPOSITION_H
+#define LL_LLREGIONPOSITION_H
+
+/**
+ * This class maintains a region, offset pair to store position, so when our "global"
+ * coordinate frame shifts, all calculations are still correct.
+ */
+
+#include "v3math.h"
+#include "v3dmath.h"
+
+class LLViewerRegion;
+
+class LLRegionPosition
+{
+private:
+ LLViewerRegion *mRegionp;
+public:
+ LLVector3 mPositionRegion;
+ LLRegionPosition();
+ LLRegionPosition(LLViewerRegion *regionp, const LLVector3 &position_local);
+ LLRegionPosition(const LLVector3d &global_position); // From global coords ONLY!
+
+ LLViewerRegion* getRegion() const;
+ void setPositionGlobal(const LLVector3d& global_pos);
+ LLVector3d getPositionGlobal() const;
+ const LLVector3& getPositionRegion() const;
+ const LLVector3 getPositionAgent() const;
+
+
+ void clear() { mRegionp = NULL; mPositionRegion.clearVec(); }
+// LLRegionPosition operator+(const LLRegionPosition &pos) const;
+};
+
+#endif // LL_REGION_POSITION_H