AzerothCore 3.3.5a OpenSource WoW Emulator
Searching...
No Matches
VMAP::GModelRayCallback Struct Reference

## Public Member Functions

GModelRayCallback (const std::vector< MeshTriangle > &tris, const std::vector< Vector3 > &vert)

bool operator() (const G3D::Ray &ray, uint32 entry, float &distance, bool)

## Public Attributes

std::vector< Vector3 >::const_iterator vertices

std::vector< MeshTriangle >::const_iterator triangles

bool hit

## ◆ GModelRayCallback()

 VMAP::GModelRayCallback::GModelRayCallback ( const std::vector< MeshTriangle > & tris, const std::vector< Vector3 > & vert )
inline
429 :
430 vertices(vert.begin()), triangles(tris.begin()), hit(false) { }
std::vector< MeshTriangle >::const_iterator triangles
Definition: WorldModel.cpp:438
bool hit
Definition: WorldModel.cpp:439
std::vector< Vector3 >::const_iterator vertices
Definition: WorldModel.cpp:437

## ◆ operator()()

 bool VMAP::GModelRayCallback::operator() ( const G3D::Ray & ray, uint32 entry, float & distance, bool )
inline
432 {
433 bool result = IntersectTriangle(triangles[entry], vertices, ray, distance);
434 if (result) { hit = true; }
435 return hit;
436 }
bool IntersectTriangle(const MeshTriangle &tri, std::vector< Vector3 >::const_iterator points, const G3D::Ray &ray, float &distance)
Definition: WorldModel.cpp:34

References hit, VMAP::IntersectTriangle(), triangles, and vertices.

## ◆ hit

 bool VMAP::GModelRayCallback::hit

## ◆ triangles

 std::vector::const_iterator VMAP::GModelRayCallback::triangles

Referenced by operator()().

## ◆ vertices

 std::vector::const_iterator VMAP::GModelRayCallback::vertices

Referenced by operator()().