TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
DynamicTreeIntersectionCallback_WithLogger Struct Reference

Public Member Functions

 DynamicTreeIntersectionCallback_WithLogger (uint32 phasemask)
 
bool operator() (const G3D::Ray &r, const GameObjectModel &obj, float &distance)
 
bool didHit () const
 

Public Attributes

bool did_hit
 
uint32 phase_mask
 

Constructor & Destructor Documentation

DynamicTreeIntersectionCallback_WithLogger::DynamicTreeIntersectionCallback_WithLogger ( uint32  phasemask)
inline
164  : did_hit(false), phase_mask(phasemask)
165  {
166  TC_LOG_DEBUG("maps", "Dynamic Intersection log");
167  }
bool did_hit
Definition: DynamicTree.cpp:162
#define TC_LOG_DEBUG(filterType__,...)
Definition: Log.h:198
uint32 phase_mask
Definition: DynamicTree.cpp:163

Member Function Documentation

bool DynamicTreeIntersectionCallback_WithLogger::didHit ( ) const
inline
179 { return did_hit;}
bool did_hit
Definition: DynamicTree.cpp:162
bool DynamicTreeIntersectionCallback_WithLogger::operator() ( const G3D::Ray r,
const GameObjectModel obj,
float &  distance 
)
inline
169  {
170  TC_LOG_DEBUG("maps", "testing intersection with %s", obj.name.c_str());
171  bool hit = obj.intersectRay(r, distance, true, phase_mask);
172  if (hit)
173  {
174  did_hit = true;
175  TC_LOG_DEBUG("maps", "result: intersects");
176  }
177  return hit;
178  }
bool did_hit
Definition: DynamicTree.cpp:162
#define TC_LOG_DEBUG(filterType__,...)
Definition: Log.h:198
double distance(double x, double y)
Definition: g3dmath.h:731
bool intersectRay(const G3D::Ray &Ray, float &MaxDist, bool StopAtFirstHit, uint32 ph_mask) const
Definition: GameObjectModel.cpp:156
uint32 phase_mask
Definition: DynamicTree.cpp:163
std::string name
Definition: GameObjectModel.h:54

+ Here is the call graph for this function:

Member Data Documentation

bool DynamicTreeIntersectionCallback_WithLogger::did_hit
uint32 DynamicTreeIntersectionCallback_WithLogger::phase_mask

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