I think that btMinkowskiSumShape::localGetSupportingVertexWithoutMargin is
not evaluated correctly.
// Current:
btVector3 btMinkowskiSumShape::localGetSupportingVertexWithoutMargin(const
btVector3& vec)const
{
btVector3 supVertexA =
m_transA(m_shapeA->localGetSupportingVertexWithoutMargin(-vec*m_transA.getBasis(
)));
btVector3 supVertexB =
m_transB(m_shapeB->localGetSupportingVertexWithoutMargin(vec*m_transB.getBasis()
));
return supVertexA - supVertexB;
}
// Should be:
btVector3 btMinkowskiSumShape::localGetSupportingVertexWithoutMargin(const
btVector3& vec)const
{
btVector3 supVertexA =
m_transA(m_shapeA->localGetSupportingVertexWithoutMargin(vec*m_transA.getBasis()
));
btVector3 supVertexB =
m_transB(m_shapeB->localGetSupportingVertexWithoutMargin(-vec*m_transB.getBasis(
)));
return supVertexA - supVertexB;
}
What is the expected output? What do you see instead?
Using the example of:
btSphereShape mysphere(1);
btBoxShape mybox(btVector3(1,1,1));
btMinkowskiSumShape* shape = new btMinkowskiSumShape(&mybox,&mysphere);
Should give a box with rounded corners.
What version of the product are you using? On what operating system?
Bullet 2.74-sp1 on Win32/Wii/PS3/Xbox360
Please provide any additional information below.
I've attached a modified copy of the Raytracer example that creates a
Minkowski sum shape and renders it.
Original issue reported on code.google.com by kester.m...@gmail.com on 10 Feb 2009 at 9:55
Original issue reported on code.google.com by
kester.m...@gmail.com
on 10 Feb 2009 at 9:55Attachments: