AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
Acore::ObjectDistanceOrderPred Class Reference

#include "Object.h"

Public Member Functions

 ObjectDistanceOrderPred (WorldObject const *pRefObj, bool ascending=true)
 
bool operator() (WorldObject const *pLeft, WorldObject const *pRight) const
 

Private Attributes

WorldObject const * m_refObj
 
const bool m_ascending
 

Detailed Description

Constructor & Destructor Documentation

◆ ObjectDistanceOrderPred()

Acore::ObjectDistanceOrderPred::ObjectDistanceOrderPred ( WorldObject const *  pRefObj,
bool  ascending = true 
)
inline
684: m_refObj(pRefObj), m_ascending(ascending) {}
const bool m_ascending
Definition: Object.h:691
WorldObject const * m_refObj
Definition: Object.h:690

Member Function Documentation

◆ operator()()

bool Acore::ObjectDistanceOrderPred::operator() ( WorldObject const *  pLeft,
WorldObject const *  pRight 
) const
inline
686 {
687 return m_ascending ? m_refObj->GetDistanceOrder(pLeft, pRight) : !m_refObj->GetDistanceOrder(pLeft, pRight);
688 }
bool GetDistanceOrder(WorldObject const *obj1, WorldObject const *obj2, bool is3D=true) const
Definition: Object.cpp:1381

References WorldObject::GetDistanceOrder(), m_ascending, and m_refObj.

Member Data Documentation

◆ m_ascending

const bool Acore::ObjectDistanceOrderPred::m_ascending
private

Referenced by operator()().

◆ m_refObj

WorldObject const* Acore::ObjectDistanceOrderPred::m_refObj
private

Referenced by operator()().