AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
AreaBoundary::DoublePosition Struct Reference

#include "AreaBoundary.h"

Inheritance diagram for AreaBoundary::DoublePosition:
Position

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 (Position const &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)
 
 Position (Position &&)=default
 
Positionoperator= (const Position &)=default
 
Positionoperator= (Position &&)=default
 
bool operator== (Position const &a) const
 
bool operator!= (Position const &a)
 
 operator G3D::Vector3 () const
 
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 (const Position &pos)
 
void Relocate (const Position *pos)
 
void RelocatePolarOffset (float angle, float dist, float z=0.0f)
 
void RelocateOffset (const Position &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::PositionXYZStreamer PositionXYZStream ()
 
Position::PositionXYZOStreamer PositionXYZOStream ()
 
bool IsPositionValid () const
 
float GetExactDist2dSq (const float x, const float y) const
 
float GetExactDist2dSq (Position const &pos) const
 
float GetExactDist2dSq (Position const *pos) const
 
float GetExactDist2d (const float x, const float y) const
 
float GetExactDist2d (Position const &pos) const
 
float GetExactDist2d (Position const *pos) const
 
float GetExactDistSq (float x, float y, float z) const
 
float GetExactDistSq (Position const &pos) const
 
float GetExactDistSq (Position const *pos) const
 
float GetExactDist (float x, float y, float z) const
 
float GetExactDist (Position const &pos) const
 
float GetExactDist (Position const *pos) const
 
void GetPositionOffsetTo (const Position &endPos, Position &retOffset) const
 
Position GetPositionWithOffset (Position const &offset) const
 
float GetAngle (const Position *pos) const
 
float GetAngle (float x, float y) const
 
float GetAbsoluteAngle (float x, float y) const
 
float GetAbsoluteAngle (Position const &pos) const
 
float GetAbsoluteAngle (Position const *pos) const
 
float GetRelativeAngle (const Position *pos) const
 
float GetRelativeAngle (float x, float y) const
 
float ToAbsoluteAngle (float relAngle) const
 
void GetSinCos (float x, float y, float &vsin, float &vcos) const
 
bool IsInDist2d (float x, float y, float dist) const
 
bool IsInDist2d (const Position *pos, float dist) const
 
bool IsInDist (float x, float y, float z, float dist) const
 
bool IsInDist (const Position *pos, float dist) const
 
bool IsWithinBox (const Position &center, float xradius, float yradius, float zradius) const
 
bool HasInArc (float arcangle, const Position *pos, float targetRadius=0.0f) const
 
bool HasInLine (Position const *pos, float width) const
 
std::string ToString () const
 

Public Attributes

double DoublePosX
 
double DoublePosY
 
double DoublePosZ
 
- Public Attributes inherited from Position
float m_positionX = 0
 
float m_positionY = 0
 
float m_positionZ = 0
 
float m_orientation = 0
 

Additional Inherited Members

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

Detailed Description

Constructor & Destructor Documentation

◆ DoublePosition() [1/3]

AreaBoundary::DoublePosition::DoublePosition ( double  x = 0.0,
double  y = 0.0,
double  z = 0.0,
float  o = 0.0f 
)
inline
37 : Position(float(x), float(y), float(z), o), DoublePosX(x), DoublePosY(y), DoublePosZ(z) { }
Definition: Position.h:27
double DoublePosZ
Definition: AreaBoundary.h:66
double DoublePosX
Definition: AreaBoundary.h:64
double DoublePosY
Definition: AreaBoundary.h:65

◆ DoublePosition() [2/3]

AreaBoundary::DoublePosition::DoublePosition ( float  x,
float  y = 0.0f,
float  z = 0.0f,
float  o = 0.0f 
)
inline
40 : Position(x, y, z, o), DoublePosX(x), DoublePosY(y), DoublePosZ(z) { }

◆ DoublePosition() [3/3]

AreaBoundary::DoublePosition::DoublePosition ( Position const &  pos)
inline
43 : Position(pos), DoublePosX(pos.m_positionX), DoublePosY(pos.m_positionY), DoublePosZ(pos.m_positionZ) { }

Member Function Documentation

◆ GetDoubleExactDist2dSq()

double AreaBoundary::DoublePosition::GetDoubleExactDist2dSq ( DoublePosition const &  pos) const
inline
50 {
51 double const offX = GetDoublePositionX() - pos.GetDoublePositionX();
52 double const offY = GetDoublePositionY() - pos.GetDoublePositionY();
53 return (offX * offX) + (offY * offY);
54 }
double GetDoublePositionY() const
Definition: AreaBoundary.h:46
double GetDoublePositionX() const
Definition: AreaBoundary.h:45

References GetDoublePositionX(), and GetDoublePositionY().

◆ GetDoublePositionX()

◆ GetDoublePositionY()

◆ GetDoublePositionZ()

double AreaBoundary::DoublePosition::GetDoublePositionZ ( ) const
inline
47{ return DoublePosZ; }

◆ sync()

Position * AreaBoundary::DoublePosition::sync ( )
inline
57 {
58 m_positionX = float(DoublePosX);
59 m_positionY = float(DoublePosY);
60 m_positionZ = float(DoublePosZ);
61 return this;
62 }
float m_positionZ
Definition: Position.h:57
float m_positionX
Definition: Position.h:55
float m_positionY
Definition: Position.h:56

Member Data Documentation

◆ DoublePosX

double AreaBoundary::DoublePosition::DoublePosX

◆ DoublePosY

double AreaBoundary::DoublePosition::DoublePosY

◆ DoublePosZ

double AreaBoundary::DoublePosition::DoublePosZ