snapshot5.png
snapshot6.png
this patch and ball is a ogre format mesh, create in blender
snapshot10.png
and I'm trying convert this ball to a convexhull, testing...Code: Select all
btConvexHullShape::btConvexHullShape( const btScalar * points = 0, int numPoints = 0, int stride = sizeof(btVector3) )
this constructor optionally takes in a pointer to points.
Each point is assumed to be 3 consecutive btScalar (x,y,z), the striding defines the number of bytes between each point, in memory. It is easier to not pass any points in the constructor, and just add one point at a time, using addPoint. btConvexHullShape make an internal copy of the points.
Code: Select all
{ x0, y0, z0, x1, y1, z1, x2, y2, z2 ........ }
Code: Select all
bshape->setLocalScaling(btVector3)
Code: Select all
btScalar s = 2.0;
bshape->setLocalScaling(btVector3(s,s,s));