Physics Simulation Forum

 

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Fri May 04, 2012 9:43 pm 
Offline

Joined: Thu Feb 02, 2012 3:58 pm
Posts: 2
I haven't found much documentation for this, I am wanting to create a custom class (much like btBvhTriangleMeshShape) and will be using convex polygons stored as edges. I've looked at how it was done but I am having some trouble understanding what Bullet is doing:

How are collisions between two different objects determined? I know there is a "m_shapetype" defined in btCollisionShape which I believe is than being used to determine what collision to use. Does that mean the m_shapetype is used to hardcode the upcast from btCollisionShape to btTriangleMeshShape, which than calls ProcessAllTriangles() ?

So all this would mean I'd need to write collision code for each native type, assuming only primitive types as this will be a static mesh for motion only. The way I see the btBvhTriangleMeshShape working is a "box" is created around the start point and end point, which is called to ProcessAllTriangle. Any triangles within this box are sent to the callback function where they are processed further based on the type of primitive.

I'd appreciate any insight or any documentation on how this is implemented.


Top
 Profile  
 
PostPosted: Sat May 05, 2012 9:56 am 
Offline

Joined: Sun Jan 29, 2012 10:01 pm
Posts: 49
You do not have to make your own collision algorithm for static triangle shapes. If you inherit btConcaveShape like in the heightfield class does, the engine will call processAllTriangles with an AABB for the section that it is interested in and use it for collisions.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot], Google [Bot], YaCy [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group