adjust velocity after solving PBD springs/links

This commit is contained in:
erwincoumans
2013-09-06 23:18:14 -07:00
parent 40acf922e3
commit 01d62b12bb
2 changed files with 25 additions and 10 deletions

View File

@@ -23,8 +23,8 @@ extern bool gReset;
float clothWidth = 4;
float clothHeight= 4;
int width = 32;//64;
int height = 32;//64;
int width = 64;
int height = 64;
int numPoints = width*height;
float clothMass = 100.f;
@@ -153,7 +153,7 @@ void CpuSoftClothDemo::clientMoveAndDisplay()
if (m_data->m_clothShapeIndex>=0 && m_data->m_clothVertices)
{
float deltaTime = 1./1000.;//1./60.f;
float deltaTime = 1./100.;//1./60.f;
//float deltaTime = 1./60.f;
//write positions
@@ -266,9 +266,6 @@ void CpuSoftClothDemo::setupScene(const ConstructionInfo& ci)
{
for(int x = 0; x < width; x++)
{
double coord = b3Sin(x/5.0)*0.01+1;
//coord = sin(y/);
float posX = (x/((float)(width-1)))*(clothWidth);
float posZ = ((y-height/2.f)/((float)(height-1)))*(clothHeight);