more changes in btGjkEpa2, thanks to Nathanael
This commit is contained in:
@@ -287,9 +287,9 @@ bool EncloseOrigin()
|
|||||||
{
|
{
|
||||||
btVector3 axis=btVector3(0,0,0);
|
btVector3 axis=btVector3(0,0,0);
|
||||||
axis[i]=1;
|
axis[i]=1;
|
||||||
if(btFabs(dot(axis,d))<1)
|
|
||||||
{
|
|
||||||
const btVector3 p=cross(d,axis);
|
const btVector3 p=cross(d,axis);
|
||||||
|
if(p.length2()>0)
|
||||||
|
{
|
||||||
appendvertice(*m_simplex, p);
|
appendvertice(*m_simplex, p);
|
||||||
if(EncloseOrigin()) return(true);
|
if(EncloseOrigin()) return(true);
|
||||||
removevertice(*m_simplex);
|
removevertice(*m_simplex);
|
||||||
@@ -304,8 +304,7 @@ bool EncloseOrigin()
|
|||||||
{
|
{
|
||||||
const btVector3 n=cross(m_simplex->c[1]->w-m_simplex->c[0]->w,
|
const btVector3 n=cross(m_simplex->c[1]->w-m_simplex->c[0]->w,
|
||||||
m_simplex->c[2]->w-m_simplex->c[0]->w);
|
m_simplex->c[2]->w-m_simplex->c[0]->w);
|
||||||
const btScalar l=n.length();
|
if(n.length2()>0)
|
||||||
if(l>0)
|
|
||||||
{
|
{
|
||||||
appendvertice(*m_simplex,n);
|
appendvertice(*m_simplex,n);
|
||||||
if(EncloseOrigin()) return(true);
|
if(EncloseOrigin()) return(true);
|
||||||
|
|||||||
Reference in New Issue
Block a user