diff options
author | James Cook <james@lindenlab.com> | 2007-01-02 08:33:20 +0000 |
---|---|---|
committer | James Cook <james@lindenlab.com> | 2007-01-02 08:33:20 +0000 |
commit | 420b91db29485df39fd6e724e782c449158811cb (patch) | |
tree | b471a94563af914d3ed3edd3e856d21cb1b69945 /indra/newview/llregionposition.h |
Print done when done.
Diffstat (limited to 'indra/newview/llregionposition.h')
-rw-r--r-- | indra/newview/llregionposition.h | 43 |
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 |