btConvexHullShape ::btConvexHullShape
-
- Posts: 508
- Joined: Fri May 30, 2008 2:51 am
- Location: Ossining, New York
btConvexHullShape ::btConvexHullShape
Why does btConvexHullShape ::btConvexHullShape take a btScalar* when internally it casts the data to btPoint3 objects? I just ran into a problem where btPoint3 is actually 16 bytes wide but i was feeding in an array of btScalars with a stride of 12.
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: btConvexHullShape ::btConvexHullShape
The btConvexHullShape uses a default stride of 16 bytes between vertices. If your stride is different, like 12 bytes, please pass the actual stride as 3rd argument. From btConvexHullShape.h:
Alternatively you can use the btConvexTriangleMeshShape, and pass in a btStridingMeshInterface.
Hope this helps,
Erwin
Code: Select all
///btConvexHullShape make an internal copy of the points.
btConvexHullShape(const btScalar* points=0,int numPoints=0, int stride=sizeof(btPoint3));
Hope this helps,
Erwin