# HG changeset patch # User John Tsiombikas # Date 1452708037 -7200 # Node ID b4b8f736332b373caab70aec05d46adf3c1bbe79 # Parent dc15b741486c40a6179dd4710464bb8facc4427a switched Cloth::transform to match the new vector/matrix multiplication conventions in gmath diff -r dc15b741486c -r b4b8f736332b src/cloth.cc --- a/src/cloth.cc Mon Jan 11 20:24:13 2016 +0200 +++ b/src/cloth.cc Wed Jan 13 20:00:37 2016 +0200 @@ -16,8 +16,8 @@ void Cloth::create_rect(int x, int y, float width, float height) { int num = x * y; - float dx = width / (float)x; - float dy = height / (float)y; + float dx = width / (float)(x - 1); + float dy = height / (float)(y - 1); masses.resize(num); conn.resize(num); @@ -97,7 +97,7 @@ void Cloth::transform(const Matrix4x4 &xform) { for(size_t i=0; i