AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
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
 

Detailed Description

Constructor & Destructor Documentation

◆ TriBoundFunc()

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

Member Function Documentation

◆ operator()()

void VMAP::TriBoundFunc::operator() ( const MeshTriangle tri,
G3D::AABox &  out 
) const
inline
92 {
93 G3D::Vector3 lo = vertices[tri.idx0];
94 G3D::Vector3 hi = lo;
95
96 lo = (lo.min(vertices[tri.idx1])).min(vertices[tri.idx2]);
97 hi = (hi.max(vertices[tri.idx1])).max(vertices[tri.idx2]);
98
99 out = G3D::AABox(lo, hi);
100 }

References VMAP::MeshTriangle::idx0, VMAP::MeshTriangle::idx1, VMAP::MeshTriangle::idx2, and vertices.

Member Data Documentation

◆ vertices

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

Referenced by operator()().