blob: a505da28335b2492bade687f76e97dada53fd196 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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
|