AzeorthCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
VMAP::MapRayCallback Class Reference

Public Member Functions

 MapRayCallback (ModelInstance *val, ModelIgnoreFlags ignoreFlags)
 
bool operator() (const G3D::Ray &ray, uint32 entry, float &distance, bool StopAtFirstHit)
 
bool didHit ()
 

Protected Attributes

ModelInstanceprims
 
ModelIgnoreFlags flags
 
bool hit
 

Detailed Description

Constructor & Destructor Documentation

◆ MapRayCallback()

VMAP::MapRayCallback::MapRayCallback ( ModelInstance val,
ModelIgnoreFlags  ignoreFlags 
)
inline
37: prims(val), flags(ignoreFlags), hit(false) { }
ModelInstance * prims
Definition: MapTree.cpp:49
bool hit
Definition: MapTree.cpp:51
ModelIgnoreFlags flags
Definition: MapTree.cpp:50

Member Function Documentation

◆ didHit()

bool VMAP::MapRayCallback::didHit ( )
inline
47{ return hit; }

References hit.

Referenced by VMAP::StaticMapTree::GetIntersectionTime().

◆ operator()()

bool VMAP::MapRayCallback::operator() ( const G3D::Ray &  ray,
uint32  entry,
float &  distance,
bool  StopAtFirstHit 
)
inline
39 {
40 bool result = prims[entry].intersectRay(ray, distance, StopAtFirstHit, flags);
41 if (result)
42 {
43 hit = true;
44 }
45 return result;
46 }
bool intersectRay(const G3D::Ray &pRay, float &pMaxDist, bool StopAtFirstHit, ModelIgnoreFlags ignoreFlags) const
Definition: ModelInstance.cpp:33

References flags, hit, VMAP::ModelInstance::intersectRay(), and prims.

Member Data Documentation

◆ flags

ModelIgnoreFlags VMAP::MapRayCallback::flags
protected

Referenced by operator()().

◆ hit

bool VMAP::MapRayCallback::hit
protected

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

◆ prims

ModelInstance* VMAP::MapRayCallback::prims
protected

Referenced by operator()().