TrinityCore
G3D::PointKDTree< T, PositionFunc, HashFunc, EqualsFunc >::AxisComparator Class Reference

#include <PointKDTree.h>

Public Member Functions

AxisComparator (Vector3::Axis s)

int operator() (const Handle &A, const Handle &B) const

Private Attributes

Vector3::Axis sortAxis

Constructor & Destructor Documentation

template<class T , class PositionFunc = PositionTrait<T>, class HashFunc = HashTrait<T>, class EqualsFunc = EqualsTrait<T>>
 G3D::PointKDTree< T, PositionFunc, HashFunc, EqualsFunc >::AxisComparator::AxisComparator ( Vector3::Axis s )
inline
424 : sortAxis(s) {}
Vector3::Axis sortAxis
Definition: PointKDTree.h:420

Member Function Documentation

template<class T , class PositionFunc = PositionTrait<T>, class HashFunc = HashTrait<T>, class EqualsFunc = EqualsTrait<T>>
 int G3D::PointKDTree< T, PositionFunc, HashFunc, EqualsFunc >::AxisComparator::operator() ( const Handle & A, const Handle & B ) const
inline
426  {
427  if (A.position()[sortAxis] > B.position()[sortAxis]) {
428  return -1;
429  } else if (A.position()[sortAxis] < B.position()[sortAxis]) {
430  return 1;
431  } else {
432  return 0;
433  }
434  }
Vector3::Axis sortAxis
Definition: PointKDTree.h:420

Here is the call graph for this function:

Member Data Documentation

template<class T , class PositionFunc = PositionTrait<T>, class HashFunc = HashTrait<T>, class EqualsFunc = EqualsTrait<T>>
 Vector3::Axis G3D::PointKDTree< T, PositionFunc, HashFunc, EqualsFunc >::AxisComparator::sortAxis
private

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