Help needed to use isInside for btConvexHullShape

Post Reply
sarbartha88
Posts: 3
Joined: Mon Jun 15, 2015 5:24 pm

Help needed to use isInside for btConvexHullShape

Post by sarbartha88 »

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?
sarbartha88
Posts: 3
Joined: Mon Jun 15, 2015 5:24 pm

Re: Help needed to use isInside for btConvexHullShape

Post by sarbartha88 »

Anyone has any solution???? Still can't able to solve it. Here is my code:

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");
This should give True ... but giving false.
Post Reply