TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
WorldLocation Class Reference

#include <Position.h>

Public Member Functions

 WorldLocation (uint32 mapId=MAPID_INVALID, float x=0.f, float y=0.f, float z=0.f, float o=0.f)
 
 WorldLocation (WorldLocation const &loc)
 
void WorldRelocate (WorldLocation const &loc)
 
void WorldRelocate (uint32 mapId=MAPID_INVALID, float x=0.f, float y=0.f, float z=0.f, float o=0.f)
 
WorldLocation GetWorldLocation () const
 
uint32 GetMapId () const
 
- 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

uint32 m_mapId
 
- 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

WorldLocation::WorldLocation ( uint32  mapId = MAPID_INVALID,
float  x = 0.f,
float  y = 0.f,
float  z = 0.f,
float  o = 0.f 
)
inlineexplicit
232  : Position(x, y, z, o), m_mapId(mapId) { }
uint32 m_mapId
Definition: Position.h:256
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
WorldLocation::WorldLocation ( WorldLocation const loc)
inline
235  : Position(loc), m_mapId(loc.GetMapId()) { }
uint32 m_mapId
Definition: Position.h:256
Position(float x=0, float y=0, float z=0, float o=0)
Definition: Position.h:29

Member Function Documentation

uint32 WorldLocation::GetMapId ( ) const
inline
254 { return m_mapId; }
uint32 m_mapId
Definition: Position.h:256

+ Here is the caller graph for this function:

WorldLocation WorldLocation::GetWorldLocation ( ) const
inline
250  {
251  return *this;
252  }

+ Here is the caller graph for this function:

void WorldLocation::WorldRelocate ( WorldLocation const loc)
inline
238  {
239  m_mapId = loc.GetMapId();
240  Relocate(loc);
241  }
uint32 m_mapId
Definition: Position.h:256
void Relocate(float x, float y)
Definition: Position.h:67

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void WorldLocation::WorldRelocate ( uint32  mapId = MAPID_INVALID,
float  x = 0.f,
float  y = 0.f,
float  z = 0.f,
float  o = 0.f 
)
inline
244  {
245  m_mapId = mapId;
246  Relocate(x, y, z, o);
247  }
uint32 m_mapId
Definition: Position.h:256
void Relocate(float x, float y)
Definition: Position.h:67
G3D::int16 z
Definition: Vector3int16.h:46
G3D::int16 y
Definition: Vector2int16.h:38
G3D::int16 x
Definition: Vector2int16.h:37

+ Here is the call graph for this function:

Member Data Documentation

uint32 WorldLocation::m_mapId

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