i'm using visual studio 2010
i have started with basicDemo.cpp changing the box in tetraedron, so i have putted this code:
Code: Select all
float a=1;
btScalar v[] = {
0.000000, 1.000000, -0.000000,
0.942809, -0.333333, 0.000000,
-0.471405, -0.333333, -0.816497,
-0.471405, -0.333333, 0.816497
};
//btCollisionShape* colShape = new btBoxShape(btVector3(SCALING*1,SCALING*1,SCALING*1));
btCollisionShape* colShape = new btConvexHullShape(v,4);
am i missing something?

/************** test *************/
i have found that adding point so:
Code: Select all
btConvexHullShape* colShapeTemp = new btConvexHullShape();
btConvexHullShape* colShape = new btConvexHullShape(v,4,12);
colShapeTemp->addPoint(btVector3(0.000000, 1.000000, -0.000000));
colShapeTemp->addPoint(btVector3(0.942809, -0.333333, 0.000000));
colShapeTemp->addPoint(btVector3(-0.471405, -0.333333, -0.816497));
colShapeTemp->addPoint(btVector3(-0.471405, -0.333333, 0.816497));
btCollisionShape* colShape =colShapeTemp;
i have tryied again with:
Code: Select all
float a=1;
btScalar v[] = {
0.000000, 1.000000, -0.000000,
0.942809, -0.333333, 0.000000,
-0.471405, -0.333333, -0.816497,
-0.471405, -0.333333, 0.816497
};
//btCollisionShape* colShape = new btBoxShape(btVector3(SCALING*1,SCALING*1,SCALING*1));
btCollisionShape* colShape = new btConvexHullShape(v,4,12);
perhaps sizeof(btVector3) as btVector3 is a class, doesn't give 12byte (4 byte *3 float) but something different?