Allocate large arrays of btVector3s on the heap instead of the stack. Fixes Issue #193

This commit is contained in:
john.mccutchan
2009-02-10 16:24:12 +00:00
parent 2a10a61f50
commit 225772b12a
4 changed files with 31 additions and 5 deletions

View File

@@ -12,7 +12,7 @@ class btHfFluidBuoyantConvexShape : public btCollisionShape
{
public:
btHfFluidBuoyantConvexShape (btConvexShape* convexShape);
~btHfFluidBuoyantConvexShape ();
void generateShape (btScalar radius, btScalar gap);
btConvexShape* getConvexShape () { return m_convexShape; }
@@ -39,7 +39,7 @@ protected:
btScalar m_totalVolume;
btScalar m_volumePerVoxel;
int m_numVoxels;
btVector3 m_voxelPositions[MAX_VOXEL_DIMENSION*MAX_VOXEL_DIMENSION*MAX_VOXEL_DIMENSION];
btVector3* m_voxelPositions;
btConvexShape* m_convexShape;
};