added first draft of C-API, btConvexHullShape takes float* instead of btPoint*, added getGravity to btRigidBody

This commit is contained in:
ejcoumans
2006-10-11 06:07:14 +00:00
parent 919e8def68
commit a337372905
13 changed files with 350 additions and 12 deletions

View File

@@ -30,7 +30,10 @@ class btConvexHullShape : public btPolyhedralConvexShape
std::vector<btPoint3> m_points;
public:
btConvexHullShape(btPoint3* points,int numPoints, int stride=sizeof(btPoint3));
///this constructor optionally takes in a pointer to points. Each point is assumed to be 3 consecutive float (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.
btConvexHullShape(const float* points=0,int numPoints=0, int stride=sizeof(btPoint3));
void addPoint(const btPoint3& point)
{