I have creates a btConvexHullShape
But when I am trying to use isInside function it always sending false even if the point is inside thu hull.
I have used addPoints to create the hull.
Can anyone help?
Help needed to use isInside for btConvexHullShape
-
- Posts: 3
- Joined: Mon Jun 15, 2015 5:24 pm
-
- Posts: 3
- Joined: Mon Jun 15, 2015 5:24 pm
Re: Help needed to use isInside for btConvexHullShape
Anyone has any solution???? Still can't able to solve it. Here is my code:
This should give True ... but giving false.
Code: Select all
human = new btConvexHullShape();
for (int i = 0; i < av->vertI; i++)
{
human->addPoint(btVector3(btScalar(av->vertices[i][0]), btScalar(av->vertices[i][1]), btScalar(av->vertices[i][2])));
}
CString s;
btVector3 cx(btScalar(0.0), btScalar(-2.0), btScalar(0.0));
if (human->isInside(cx, 0))
{
OutputDebugString(L"True\n");
}
else
OutputDebugString(L"False\n");