code-google-com / bullet

Automatically exported from code.google.com/p/bullet
0 stars 0 forks source link

btAdjustInternalEdgeContacts on btScaledBvhTriangleMeshShape crashes #358

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When btAdjustInternalEdgeContacts is called on a
btScaledBvhTriangleMeshShape it crashes because it's only implemented for
btBvhTriangleMeshShape.

Original issue reported on code.google.com by jazz...@gmail.com on 8 Mar 2010 at 1:29

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago

btAdjustInternalEdgeContacts only accepts a btBvhTriangleMeshShape, so how can 
you pass 
in a btScaledBvhTriangleMeshShape without compile errors?

Thanks,
Erwin

Original comment by erwin.coumans on 11 Mar 2010 at 6:09

GoogleCodeExporter commented 9 years ago
That's not the case because 
void btAdjustInternalEdgeContacts(btManifoldPoint& cp, const btCollisionObject*
colObj0,const btCollisionObject* colObj1, int partId0, int index0, int 
normalAdjustFlags)
accepts a btCollisionObject and the check inside the function only checks if the
temporary mesh object that bullet seems to create is of 
TRIANGLE_SHAPE_PROXYTYPE on
the collisioObject->getCollisionShape, whereas 
collisionObject->getRootCollisionShape
is of the correct type. 

The code I've attached checks for the type of the root collision shape and 
extracts
the correct mesh object.
I don't know if this is the intended use but this seems to work great. :)

Best regards,
Ales

Original comment by jazz...@gmail.com on 12 Mar 2010 at 7:49

GoogleCodeExporter commented 9 years ago

Ah ok.

The issue seems similar to the sparkprimes forum posting here:
http://bulletphysics.org/Bullet/phpBB3/viewtopic.php?f=9&t=4603&start=44

We should fix this indeed (and make it work for btScaledBvhTriangleMeshShape). 
Thanks 
for the feedback!
Erwin

Original comment by erwin.coumans on 12 Mar 2010 at 7:01

GoogleCodeExporter commented 9 years ago
Yes we should, although I don't know if the code I've posted handles scaling
properly, didn't really check that out, will do on mondey though.

Erwin, thanks for a great and open physics engine! :)

Ales Mlakar
Zootfly

Original comment by jazz...@gmail.com on 13 Mar 2010 at 7:38

GoogleCodeExporter commented 9 years ago
see https://github.com/bulletphysics/bullet3/issues/153

Original comment by erwin.coumans on 30 Mar 2014 at 7:53