AzeorthCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
DynamicTreeIntersectionCallback Struct Reference

Public Member Functions

 DynamicTreeIntersectionCallback (uint32 phasemask, VMAP::ModelIgnoreFlags ignoreFlags)
 
bool operator() (const G3D::Ray &r, const GameObjectModel &obj, float &distance, bool stopAtFirstHit)
 
bool didHit () const
 

Private Attributes

bool _didHit
 
uint32 _phaseMask
 
VMAP::ModelIgnoreFlags _ignoreFlags
 

Detailed Description

Constructor & Destructor Documentation

◆ DynamicTreeIntersectionCallback()

DynamicTreeIntersectionCallback::DynamicTreeIntersectionCallback ( uint32  phasemask,
VMAP::ModelIgnoreFlags  ignoreFlags 
)
inline
149 :
150 _didHit(false), _phaseMask(phasemask), _ignoreFlags(ignoreFlags) { }
bool _didHit
Definition: DynamicTree.cpp:168
uint32 _phaseMask
Definition: DynamicTree.cpp:169
VMAP::ModelIgnoreFlags _ignoreFlags
Definition: DynamicTree.cpp:170

Member Function Documentation

◆ didHit()

bool DynamicTreeIntersectionCallback::didHit ( ) const
inline

◆ operator()()

bool DynamicTreeIntersectionCallback::operator() ( const G3D::Ray &  r,
const GameObjectModel obj,
float &  distance,
bool  stopAtFirstHit 
)
inline
153 {
154 bool result = obj.intersectRay(r, distance, stopAtFirstHit, _phaseMask, _ignoreFlags);
155 if (result)
156 {
157 _didHit = result;
158 }
159 return result;
160 }
bool intersectRay(const G3D::Ray &Ray, float &MaxDist, bool StopAtFirstHit, uint32 ph_mask, VMAP::ModelIgnoreFlags ignoreFlags) const
Definition: GameObjectModel.cpp:180

References _didHit, _ignoreFlags, _phaseMask, and GameObjectModel::intersectRay().

Member Data Documentation

◆ _didHit

bool DynamicTreeIntersectionCallback::_didHit
private

Referenced by didHit(), and operator()().

◆ _ignoreFlags

VMAP::ModelIgnoreFlags DynamicTreeIntersectionCallback::_ignoreFlags
private

Referenced by operator()().

◆ _phaseMask

uint32 DynamicTreeIntersectionCallback::_phaseMask
private

Referenced by operator()().