by Julio Jerez » Mon Aug 12, 2013 1:31 pm
yes, there is a while familty of those functions, in fact thsoe are teh exact same funtion the engine uses internally for collision
int NewtonCollisionPointDistance (const NewtonWorld* const newtonWorld, const dFloat* const point,
const NewtonCollision* const collision, const dFloat* const matrix, dFloat* const contact, dFloat* const normal, int threadIndex);
int NewtonCollisionClosestPoint (const NewtonWorld* const newtonWorld,
const NewtonCollision* const collisionA, const dFloat* const matrixA,
const NewtonCollision* const collisionB, const dFloat* const matrixB,
dFloat* const contactA, dFloat* const contactB, dFloat* const normalAB, int threadIndex);
int NewtonCollisionCollide (const NewtonWorld* const newtonWorld, int maxSize,
const NewtonCollision* const collisionA, const dFloat* const matrixA,
const NewtonCollision* const collisionB, const dFloat* const matrixB,
dFloat* const contacts, dFloat* const normals, dFloat* const penetration,
dLong* const attributeA, dLong* const attributeB, int threadIndex);
int NewtonCollisionCollideContinue (const NewtonWorld* const newtonWorld, int maxSize, dFloat timestep,
const NewtonCollision* const collisionA, const dFloat* const matrixA, const dFloat* const velocA, const dFloat* omegaA,
const NewtonCollision* const collisionB, const dFloat* const matrixB, const dFloat* const velocB, const dFloat* const omegaB,
dFloat* const timeOfImpact, dFloat* const contacts, dFloat* const normals, dFloat* const penetration,
dLong* const attributeA, dLong* const attributeB, int threadIndex);
void NewtonCollisionSupportVertex (const NewtonCollision* const collision, const dFloat* const dir, dFloat* const vertex);
dFloat NewtonCollisionRayCast (const NewtonCollision* const collision, const dFloat* const p0, const dFloat* const p1, dFloat* const normal, dLong* const attribute);
NEWTON_API void NewtonCollisionCalculateAABB (const NewtonCollision* const collision, const dFloat* const matrix, dFloat* const p0, dFloat* const p1);
NEWTON_API void NewtonCollisionForEachPolygonDo (const NewtonCollision* const collision, const dFloat* const matrix, NewtonCollisionIterator callback, void* const userData);
...
...
one function that is very handy, and perhap better fo wha to want supportVertex and closet distance.
there are some more new in newton list collisiontest, thsi oen I added fo rth ep[layer colntroller
you do not have to run the engine update to use any of them. they can be called from any where, and from any thread even in parallel.