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

@@ -207,8 +207,8 @@ protected:
btHfFluidBuoyantConvexShape* m_buoyantShape;
btIDebugDraw* m_debugDraw;
int m_numVoxels;
btVector3 m_voxelPositionsXformed[32*32*32];
bool m_voxelSubmerged[32*32*32];
btVector3* m_voxelPositionsXformed;
bool* m_voxelSubmerged;
btVector3 m_aabbMin;
btVector3 m_aabbMax;
btScalar m_volume;
@@ -216,6 +216,7 @@ protected:
btScalar m_floatyness;
public:
btHfFluidColumnRigidBodyCallback (btRigidBody* rigidBody, btIDebugDraw* debugDraw, btScalar density, btScalar floatyness);
~btHfFluidColumnRigidBodyCallback ();
bool processColumn (btHfFluid* fluid, int w, int l);
btScalar getVolume () const { return m_volume; }
};