forked from enlightenment/efl
ephysics: invert clothes mesh
So objects won't be back-facing the camera. SVN revision: 78477
This commit is contained in:
parent
3804a911e1
commit
98d327c3b6
|
@ -1449,14 +1449,14 @@ ephysics_body_cloth_anchor_full_add(EPhysics_Body *body1, EPhysics_Body *body2,
|
||||||
rows = body1->cloth_rows;
|
rows = body1->cloth_rows;
|
||||||
columns = body1->cloth_columns;
|
columns = body1->cloth_columns;
|
||||||
|
|
||||||
if (side == EPHYSICS_BODY_CLOTH_ANCHOR_SIDE_LEFT)
|
if (side == EPHYSICS_BODY_CLOTH_ANCHOR_SIDE_RIGHT)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < rows; i++)
|
for (int i = 0; i < rows; i++)
|
||||||
body1->soft_body->appendAnchor(i, body2->rigid_body);
|
body1->soft_body->appendAnchor(i, body2->rigid_body);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (side == EPHYSICS_BODY_CLOTH_ANCHOR_SIDE_RIGHT)
|
if (side == EPHYSICS_BODY_CLOTH_ANCHOR_SIDE_LEFT)
|
||||||
{
|
{
|
||||||
for (int i = 1; i <= rows; i++)
|
for (int i = 1; i <= rows; i++)
|
||||||
body1->soft_body->appendAnchor((rows * columns) - i,
|
body1->soft_body->appendAnchor((rows * columns) - i,
|
||||||
|
@ -1464,14 +1464,14 @@ ephysics_body_cloth_anchor_full_add(EPhysics_Body *body1, EPhysics_Body *body2,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (side == EPHYSICS_BODY_CLOTH_ANCHOR_SIDE_TOP)
|
if (side == EPHYSICS_BODY_CLOTH_ANCHOR_SIDE_BOTTOM)
|
||||||
{
|
{
|
||||||
for (int i = 0; i <= rows; i++)
|
for (int i = 0; i <= rows; i++)
|
||||||
body1->soft_body->appendAnchor(i * rows, body2->rigid_body);
|
body1->soft_body->appendAnchor(i * rows, body2->rigid_body);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (side == EPHYSICS_BODY_CLOTH_ANCHOR_SIDE_BOTTOM)
|
if (side == EPHYSICS_BODY_CLOTH_ANCHOR_SIDE_TOP)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < columns; i++)
|
for (int i = 0; i < columns; i++)
|
||||||
body1->soft_body->appendAnchor((rows - 1) + rows * i,
|
body1->soft_body->appendAnchor((rows - 1) + rows * i,
|
||||||
|
@ -1533,10 +1533,10 @@ ephysics_body_cloth_add(EPhysics_World *world, unsigned short granularity)
|
||||||
|
|
||||||
world_info = ephysics_world_info_get(world);
|
world_info = ephysics_world_info_get(world);
|
||||||
soft_body = btSoftBodyHelpers::CreatePatch(*world_info,
|
soft_body = btSoftBodyHelpers::CreatePatch(*world_info,
|
||||||
btVector3(1, 2, 0),
|
|
||||||
btVector3(1, 1, 0),
|
|
||||||
btVector3(2, 2, 0),
|
btVector3(2, 2, 0),
|
||||||
btVector3(2, 1, 0),
|
btVector3(2, 1, 0),
|
||||||
|
btVector3(1, 2, 0),
|
||||||
|
btVector3(1, 1, 0),
|
||||||
rows, columns, 0, false);
|
rows, columns, 0, false);
|
||||||
if (!soft_body)
|
if (!soft_body)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue