TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
VMAP::TriBoundFunc Class Reference

Public Member Functions

 TriBoundFunc (std::vector< Vector3 > &vert)
 
void operator() (const MeshTriangle &tri, G3D::AABox &out) const
 

Protected Attributes

const std::vector< Vector3 >
::const_iterator 
vertices
 

Constructor & Destructor Documentation

VMAP::TriBoundFunc::TriBoundFunc ( std::vector< Vector3 > &  vert)
inline
87 : vertices(vert.begin()) { }
const std::vector< Vector3 >::const_iterator vertices
Definition: WorldModel.cpp:99

Member Function Documentation

void VMAP::TriBoundFunc::operator() ( const MeshTriangle tri,
G3D::AABox out 
) const
inline
89  {
90  G3D::Vector3 lo = vertices[tri.idx0];
91  G3D::Vector3 hi = lo;
92 
93  lo = (lo.min(vertices[tri.idx1])).min(vertices[tri.idx2]);
94  hi = (hi.max(vertices[tri.idx1])).max(vertices[tri.idx2]);
95 
96  out = G3D::AABox(lo, hi);
97  }
Vector3 __fastcall max(const Vector3 &v) const
Definition: Vector3.h:794
Vector3 __fastcall min(const Vector3 &v) const
Definition: Vector3.h:789
T max(const T &x, const T &y)
Definition: g3dmath.h:320
Definition: Vector3.h:58
T min(const T &x, const T &y)
Definition: g3dmath.h:305
Definition: AABox.h:32
const std::vector< Vector3 >::const_iterator vertices
Definition: WorldModel.cpp:99

+ Here is the call graph for this function:

Member Data Documentation

const std::vector<Vector3>::const_iterator VMAP::TriBoundFunc::vertices
protected

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