Get triangle information from collision points

Post Reply
chung
Posts: 1
Joined: Sat Oct 22, 2016 2:47 am

Get triangle information from collision points

Post by chung »

Hi,

Our application needs complex dynamic collision objects made of Rhino models so we are using many btConvexHullShape and put them into one btCompoundShape for each model. Is there a way to get the triangle information around the collision points? In btManifoldPoint.h I see these 4 variables

//BP mod, store contact triangles.
int m_partId0;
int m_partId1;
int m_index0;
int m_index1;

How are these variables used to store contact triangles? After digging the source code I found out that for the collisions between btCompoundObjects, the partIds are always assigned to -1 and m_index0 and 1 are set to the indices of the collided child shapes. Then I tried to do manual collisions myself among the child shapes based on m_index0 and m_index1 by calling btCompoundCollisionAlgorithm->processCollision...that didn't work because m_index0 and 1 are not set in btManifoldResult after calling the process.

I'm not sure if I'm doing it correctly or if there's a better way to do it. Any help is greatly appreciated. Thanks.
Post Reply