18 #ifndef TRINITY_AREA_BOUNDARY_H
19 #define TRINITY_AREA_BOUNDARY_H
43 :
Position(float(
x), float(
y), float(
z), o), d_positionX(
x), d_positionY(
y), d_positionZ(
z) { }
45 :
Position(x,
y,
z, o), d_positionX(x), d_positionY(
y), d_positionZ(
z) { }
47 :
DoublePosition(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation()) { }
56 return (offX*offX) + (offY*offY);
59 Position*
sync() { m_positionX = (float)d_positionX; m_positionY = (float)d_positionY; m_positionZ = (float)d_positionZ;
return this; }
64 virtual bool IsWithinBoundaryArea(
const Position* pos)
const = 0;
73 RectangleBoundary(
float southX,
float northX,
float eastY,
float westY,
bool isInverted =
false);
79 const float _minX, _maxX,
_minY, _maxY;
86 CircleBoundary(DoublePosition
const& center,
double radius,
bool isInverted =
false);
88 CircleBoundary(DoublePosition
const& center, DoublePosition
const& pointOnCircle,
bool isInverted =
false);
102 EllipseBoundary(DoublePosition
const& center,
double radiusX,
double radiusY,
bool isInverted =
false);
116 TriangleBoundary(DoublePosition
const& pointA, DoublePosition
const& pointB, DoublePosition
const& pointC,
bool isInverted =
false);
122 const DoublePosition _a, _b,
_c;
123 const double _abx, _bcx, _cax, _aby, _bcy,
_cay;
138 const double _abx, _dax, _aby,
_day;
153 #endif //TRINITY_AREA_BOUNDARY_H
double GetDoublePositionX() const
Definition: AreaBoundary.h:49
Definition: AreaBoundary.h:28
Definition: AreaBoundary.h:33
const DoublePosition _center
Definition: AreaBoundary.h:108
Definition: AreaBoundary.h:112
Definition: AreaBoundary.h:82
bool m_isInvertedBoundary
Definition: AreaBoundary.h:66
const double _radiusSq
Definition: AreaBoundary.h:95
DoublePosition(double x=0.0, double y=0.0, double z=0.0, float o=0.0f)
Definition: AreaBoundary.h:42
Position * sync()
Definition: AreaBoundary.h:59
Definition: AreaBoundary.h:126
Definition: AreaBoundary.h:98
Definition: AreaBoundary.h:32
double GetDoubleExactDist2dSq(DoublePosition const &pos) const
Definition: AreaBoundary.h:53
const DoublePosition _d
Definition: AreaBoundary.h:137
DoublePosition(float x, float y=0.0f, float z=0.0f, float o=0.0f)
Definition: AreaBoundary.h:44
const DoublePosition _center
Definition: AreaBoundary.h:94
virtual ~AreaBoundary()
Definition: AreaBoundary.h:35
Definition: AreaBoundary.h:30
double GetDoublePositionZ() const
Definition: AreaBoundary.h:51
G3D::int16 z
Definition: Vector3int16.h:46
BoundaryType GetBoundaryType() const
Definition: AreaBoundary.h:36
const DoublePosition _c
Definition: AreaBoundary.h:122
virtual bool IsWithinBoundaryArea(const Position *pos) const =0
Definition: AreaBoundary.h:31
G3D::int16 y
Definition: Vector2int16.h:38
double GetDoublePositionY() const
Definition: AreaBoundary.h:50
const BoundaryType m_boundaryType
Definition: AreaBoundary.h:65
Definition: AreaBoundary.h:23
Definition: AreaBoundary.h:39
const double _scaleXSq
Definition: AreaBoundary.h:109
#define TC_GAME_API
Definition: Define.h:134
const double _day
Definition: AreaBoundary.h:138
Definition: AreaBoundary.h:141
Definition: Position.h:27
G3D::int16 x
Definition: Vector2int16.h:37
DoublePosition(const Position &pos)
Definition: AreaBoundary.h:46
bool IsWithinBoundary(const Position *pos) const
Definition: AreaBoundary.h:37
const float _minY
Definition: AreaBoundary.h:79
BoundaryType
Definition: AreaBoundary.h:26
const float _minZ
Definition: AreaBoundary.h:150
const double _cay
Definition: AreaBoundary.h:123
Definition: AreaBoundary.h:29
Definition: AreaBoundary.h:69
double d_positionZ
Definition: AreaBoundary.h:41
AreaBoundary(BoundaryType bType, bool isInverted)
Definition: AreaBoundary.h:63