Back to index

supertuxkart  0.5+dfsg1
Classes | Static Public Member Functions
btGjkEpaSolver Struct Reference

btGjkEpaSolver contributed under zlib by Nathanael Presson More...

#include <btGjkEpa.h>

List of all members.


struct  sResults

Static Public Member Functions

static bool Collide (const btConvexShape *shape0, const btTransform &wtrs0, const btConvexShape *shape1, const btTransform &wtrs1, btScalar radialmargin, btStackAlloc *stackAlloc, sResults &results)

Detailed Description

btGjkEpaSolver contributed under zlib by Nathanael Presson

Definition at line 29 of file btGjkEpa.h.

Member Function Documentation

bool btGjkEpaSolver::Collide ( const btConvexShape *  shape0,
const btTransform wtrs0,
const btConvexShape *  shape1,
const btTransform wtrs1,
btScalar  radialmargin,
btStackAlloc stackAlloc,
sResults results 
) [static]

Definition at line 583 of file btGjkEpa.cpp.


/* Initialize                             */
results.witnesses[0] =
results.witnesses[1] =
results.normal                     =      Vector3(0,0,0);
results.depth               =      0;
results.status                     =      sResults::Separated;
results.epa_iterations      =      0;
results.gjk_iterations      =      0;
/* Use GJK to locate origin        */
GJK                  gjk(stackAlloc,
const Z              collide(gjk.SearchOrigin());
results.gjk_iterations      =      gjk.iterations+1;
       /* Then EPA for penetration depth  */
       EPA                  epa(&gjk);
       const F              pd(epa.EvaluatePD());
       results.epa_iterations      =      epa.iterations+1;
              results.status                     =      sResults::Penetrating;
              results.normal                     =      epa.normal;
              results.depth               =      pd;
              results.witnesses[0] =      epa.nearest[0];
              results.witnesses[1] =      epa.nearest[1];
              } else { if(epa.failed) results.status=sResults::EPA_Failed; }
       } else { if(gjk.failed) results.status=sResults::GJK_Failed; }

Here is the call graph for this function:

Here is the caller graph for this function:

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