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

#include <GridNotifiers.h>

Public Member Functions

 NearestGameObjectCheck (WorldObject const &obj)
 
bool operator() (GameObject *go)
 
float GetLastRange () const
 

Private Member Functions

 NearestGameObjectCheck (NearestGameObjectCheck const &)
 

Private Attributes

WorldObject consti_obj
 
float i_range
 

Constructor & Destructor Documentation

Trinity::NearestGameObjectCheck::NearestGameObjectCheck ( WorldObject const obj)
inline
672 : i_obj(obj), i_range(999) { }
WorldObject const & i_obj
Definition: GridNotifiers.h:684
float i_range
Definition: GridNotifiers.h:685
Trinity::NearestGameObjectCheck::NearestGameObjectCheck ( NearestGameObjectCheck const )
private

Member Function Documentation

float Trinity::NearestGameObjectCheck::GetLastRange ( ) const
inline
682 { return i_range; }
float i_range
Definition: GridNotifiers.h:685
bool Trinity::NearestGameObjectCheck::operator() ( GameObject go)
inline
674  {
676  {
677  i_range = i_obj.GetDistance(go); // use found GO range as new range limit for next check
678  return true;
679  }
680  return false;
681  }
WorldObject const & i_obj
Definition: GridNotifiers.h:684
float i_range
Definition: GridNotifiers.h:685
bool IsWithinDistInMap(WorldObject const *obj, float dist2compare, bool is3D=true) const
Definition: Object.cpp:1663
float GetDistance(WorldObject const *obj) const
Definition: Object.cpp:1594

+ Here is the call graph for this function:

Member Data Documentation

WorldObject const& Trinity::NearestGameObjectCheck::i_obj
private
float Trinity::NearestGameObjectCheck::i_range
private

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