TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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
 

Constructor & Destructor Documentation

VMAP::GModelRayCallback::GModelRayCallback ( const std::vector< MeshTriangle > &  tris,
const std::vector< Vector3 > &  vert 
)
inline
369  :
370  vertices(vert.begin()), triangles(tris.begin()), hit(false) { }
bool hit
Definition: WorldModel.cpp:379
std::vector< Vector3 >::const_iterator vertices
Definition: WorldModel.cpp:377
std::vector< MeshTriangle >::const_iterator triangles
Definition: WorldModel.cpp:378

Member Function Documentation

bool VMAP::GModelRayCallback::operator() ( const G3D::Ray ray,
uint32  entry,
float &  distance,
bool   
)
inline
372  {
373  bool result = IntersectTriangle(triangles[entry], vertices, ray, distance);
374  if (result) hit=true;
375  return hit;
376  }
bool hit
Definition: WorldModel.cpp:379
std::vector< Vector3 >::const_iterator vertices
Definition: WorldModel.cpp:377
double distance(double x, double y)
Definition: g3dmath.h:731
std::vector< MeshTriangle >::const_iterator triangles
Definition: WorldModel.cpp:378
bool IntersectTriangle(const MeshTriangle &tri, std::vector< Vector3 >::const_iterator points, const G3D::Ray &ray, float &distance)
Definition: WorldModel.cpp:34

+ Here is the call graph for this function:

Member Data Documentation

bool VMAP::GModelRayCallback::hit
std::vector<MeshTriangle>::const_iterator VMAP::GModelRayCallback::triangles
std::vector<Vector3>::const_iterator VMAP::GModelRayCallback::vertices

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