Reuse triangle area since we use the triangle plane as the (u, v) plane
This commit is contained in:
parent
b5e4b33980
commit
0e4b1c4d1e
@ -190,10 +190,8 @@ b3Cloth::b3Cloth(const b3ClothDef& def) :
|
|||||||
B3_ASSERT(det != 0.0f);
|
B3_ASSERT(det != 0.0f);
|
||||||
triangle->m_inv_det = 1.0f / det;
|
triangle->m_inv_det = 1.0f / det;
|
||||||
|
|
||||||
// Triangle area
|
// Area
|
||||||
b3Vec3 v1(du1, dv1, 0.0f);
|
triangle->m_alpha = 0.5f * A2;
|
||||||
b3Vec3 v2(du2, dv2, 0.0f);
|
|
||||||
triangle->m_alpha = 0.5f * b3Length(b3Cross(v1, v2));
|
|
||||||
|
|
||||||
// Create strech force
|
// Create strech force
|
||||||
b3StrechForceDef sfdef;
|
b3StrechForceDef sfdef;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user