but I can't find paper
btGjkEpa2.cpp:
EPA::Evaluate()
Code: Select all
m_status = eStatus::Valid;
for (; iterations < EPA_MAX_ITERATIONS; ++iterations)
{
if (m_nextsv < EPA_MAX_VERTICES)
{
sHorizon horizon;
sSV* w = &m_sv_store[m_nextsv++];
bool valid = true;
best->pass = (U1)(++pass);
gjk.getsupport(best->n, *w);
const tbScalar wdist = dot(best->n, w->w) - best->d;
if (wdist>EPA_ACCURACY)
{
for (U j = 0; (j < 3) && valid; ++j)
{
valid &= expand(pass, w,
best->f[j], best->e[j],
horizon);
}
if (valid && (horizon.nf >= 3))
{
bind(horizon.cf, 1, horizon.ff, 2);
remove(m_hull, best);
append(m_stock, best);
best = findbest();
if (best->p >= outer.p) outer = *best;
}
else { m_status = eStatus::InvalidHull; break; }
}
else { m_status = eStatus::AccuraryReached; break; }
}
else { m_status = eStatus::OutOfVertices; break; }
}