TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
AreaBoundary::DoublePosition Struct Reference

#include <AreaBoundary.h>

Public Member Functions

 DoublePosition (double x=0.0, double y=0.0, double z=0.0, float o=0.0f)
 
 DoublePosition (float x, float y=0.0f, float z=0.0f, float o=0.0f)
 
 DoublePosition (const Position &pos)
 
double GetDoublePositionX () const
 
double GetDoublePositionY () const
 
double GetDoublePositionZ () const
 
double GetDoubleExactDist2dSq (DoublePosition const &pos) const
 
Positionsync ()
 
- Public Member Functions inherited from Position
 Position (float x=0, float y=0, float z=0, float o=0)
 
 Position (Position const &loc)
 
bool operator== (Position const &a)
 
bool operator!= (Position const &a)
 
void Relocate (float x, float y)
 
void Relocate (float x, float y, float z)
 
void Relocate (float x, float y, float z, float orientation)
 
void Relocate (Position const &pos)
 
void Relocate (Position const *pos)
 
void Relocate (G3D::Vector3 const &pos)
 
void RelocateOffset (Position const &offset)
 
void SetOrientation (float orientation)
 
float GetPositionX () const
 
float GetPositionY () const
 
float GetPositionZ () const
 
float GetOrientation () const
 
void GetPosition (float &x, float &y) const
 
void GetPosition (float &x, float &y, float &z) const
 
void GetPosition (float &x, float &y, float &z, float &o) const
 
Position GetPosition () const
 
Position::PositionXYStreamer PositionXYStream ()
 
Position::PositionXYZStreamer PositionXYZStream ()
 
Position::PositionXYZOStreamer PositionXYZOStream ()
 
bool IsPositionValid () const
 
float GetExactDist2dSq (float x, float y) const
 
float GetExactDist2d (const float x, const float y) const
 
float GetExactDist2dSq (Position const *pos) const
 
float GetExactDist2d (Position const *pos) const
 
float GetExactDistSq (float x, float y, float z) const
 
float GetExactDist (float x, float y, float z) const
 
float GetExactDistSq (Position const *pos) const
 
float GetExactDist (Position const *pos) const
 
void GetPositionOffsetTo (Position const &endPos, Position &retOffset) const
 
Position GetPositionWithOffset (Position const &offset) const
 
float GetAngle (Position const *pos) const
 
float GetAngle (float x, float y) const
 
float GetRelativeAngle (Position const *pos) const
 
float GetRelativeAngle (float x, float y) const
 
void GetSinCos (float x, float y, float &vsin, float &vcos) const
 
bool IsInDist2d (float x, float y, float dist) const
 
bool IsInDist2d (Position const *pos, float dist) const
 
bool IsInDist (float x, float y, float z, float dist) const
 
bool IsInDist (Position const *pos, float dist) const
 
bool IsWithinBox (const Position &center, float xradius, float yradius, float zradius) const
 
bool HasInArc (float arcangle, Position const *pos, float border=2.0f) const
 
bool HasInLine (Position const *pos, float width) const
 
std::string ToString () const
 

Public Attributes

double d_positionX
 
double d_positionY
 
double d_positionZ
 
- Public Attributes inherited from Position
float m_positionX
 
float m_positionY
 
float m_positionZ
 

Additional Inherited Members

- Static Public Member Functions inherited from Position
static float NormalizeOrientation (float o)
 

Constructor & Destructor Documentation

AreaBoundary::DoublePosition::DoublePosition ( double  x = 0.0,
double  y = 0.0,
double  z = 0.0,
float  o = 0.0f 
)
inline
43  : Position(float(x), float(y), float(z), o), d_positionX(x), d_positionY(y), d_positionZ(z) { }
double d_positionX
Definition: AreaBoundary.h:41
G3D::int16 z
Definition: Vector3int16.h:46
Position(float x=0, float y=0, float z=0, float o=0)
Definition: Position.h:29
G3D::int16 y
Definition: Vector2int16.h:38
G3D::int16 x
Definition: Vector2int16.h:37
double d_positionY
Definition: AreaBoundary.h:41
double d_positionZ
Definition: AreaBoundary.h:41
AreaBoundary::DoublePosition::DoublePosition ( float  x,
float  y = 0.0f,
float  z = 0.0f,
float  o = 0.0f 
)
inline
45  : Position(x, y, z, o), d_positionX(x), d_positionY(y), d_positionZ(z) { }
double d_positionX
Definition: AreaBoundary.h:41
G3D::int16 z
Definition: Vector3int16.h:46
Position(float x=0, float y=0, float z=0, float o=0)
Definition: Position.h:29
G3D::int16 y
Definition: Vector2int16.h:38
G3D::int16 x
Definition: Vector2int16.h:37
double d_positionY
Definition: AreaBoundary.h:41
double d_positionZ
Definition: AreaBoundary.h:41
AreaBoundary::DoublePosition::DoublePosition ( const Position pos)
inline
47  : DoublePosition(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), pos.GetOrientation()) { }
DoublePosition(double x=0.0, double y=0.0, double z=0.0, float o=0.0f)
Definition: AreaBoundary.h:42
float GetOrientation() const
Definition: Position.h:107
float GetPositionY() const
Definition: Position.h:105
float GetPositionZ() const
Definition: Position.h:106
float GetPositionX() const
Definition: Position.h:104

Member Function Documentation

double AreaBoundary::DoublePosition::GetDoubleExactDist2dSq ( DoublePosition const pos) const
inline
53  {
54  double offX = GetDoublePositionX() - pos.GetDoublePositionX();
55  double offY = GetDoublePositionY() - pos.GetDoublePositionY();
56  return (offX*offX) + (offY*offY);
57  }
double GetDoublePositionX() const
Definition: AreaBoundary.h:49
double GetDoublePositionY() const
Definition: AreaBoundary.h:50

+ Here is the call graph for this function:

double AreaBoundary::DoublePosition::GetDoublePositionX ( ) const
inline
49 { return d_positionX; }
double d_positionX
Definition: AreaBoundary.h:41

+ Here is the caller graph for this function:

double AreaBoundary::DoublePosition::GetDoublePositionY ( ) const
inline
50 { return d_positionY; }
double d_positionY
Definition: AreaBoundary.h:41

+ Here is the caller graph for this function:

double AreaBoundary::DoublePosition::GetDoublePositionZ ( ) const
inline
51 { return d_positionZ; }
double d_positionZ
Definition: AreaBoundary.h:41
Position* AreaBoundary::DoublePosition::sync ( )
inline
59 { m_positionX = (float)d_positionX; m_positionY = (float)d_positionY; m_positionZ = (float)d_positionZ; return this; }
double d_positionX
Definition: AreaBoundary.h:41
float m_positionY
Definition: Position.h:53
float m_positionX
Definition: Position.h:52
float m_positionZ
Definition: Position.h:54
double d_positionY
Definition: AreaBoundary.h:41
double d_positionZ
Definition: AreaBoundary.h:41

Member Data Documentation

double AreaBoundary::DoublePosition::d_positionX
double AreaBoundary::DoublePosition::d_positionY
double AreaBoundary::DoublePosition::d_positionZ

The documentation for this struct was generated from the following file: