Esempio n. 1
0
int main(int argc,char** argv)
{
	clientResetScene();

	btMatrix3x3 basisA;
	basisA.setIdentity();

	btMatrix3x3 basisB;
	basisB.setIdentity();

	tr[0].setBasis(basisA);
	tr[1].setBasis(basisB);

	btVector3	points0[3]={btVector3(1,0,0),btVector3(0,1,0),btVector3(0,0,1)};
	//btVector3	points1[5]={btVector3(1,0,0),btVector3(0,1,0),btVector3(0,0,1),btVector3(0,0,-1),btVector3(-1,-1,0)};
	
	btConvexHullShape	hullA(&points0[0].getX(),3);
	btConvexHullShape	hullB(TaruVtx,TaruVtxCount,3*sizeof(btScalar));
	
	shapePtr[0] = &hullA;
	shapePtr[1] = &hullB;
	

	btTransform tr;
	tr.setIdentity();


	return myglutmain(argc, argv,screenWidth,screenHeight,"Convex Hull Distance Demo");
}
Esempio n. 2
0
void ConvexHullDistanceDemo::initPhysics()
{
#endif

	clientResetScene();

	btMatrix3x3 basisA;
	basisA.setIdentity();

	btMatrix3x3 basisB;
	basisB.setIdentity();

	tr[0].setBasis(basisA);
	tr[1].setBasis(basisB);

	btVector3	points0[3]={btVector3(1,0,0),btVector3(0,1,0),btVector3(0,0,1)};
	//btVector3	points1[5]={btVector3(1,0,0),btVector3(0,1,0),btVector3(0,0,1),btVector3(0,0,-1),btVector3(-1,-1,0)};
	
#ifdef __QNX__
    shapePtr[0] = new btConvexHullShape(&points0[0].getX(),3);
    shapePtr[1] = new btConvexHullShape(TaruVtx,TaruVtxCount,3*sizeof(btScalar));
#else
	btConvexHullShape	hullA(&points0[0].getX(),3);
	btConvexHullShape	hullB(TaruVtx,TaruVtxCount,3*sizeof(btScalar));
	
	shapePtr[0] = &hullA;
	shapePtr[1] = &hullB;
#endif
	

	btTransform tr;
	tr.setIdentity();

#ifdef __QNX__
}