Commit Graph

293 Commits

Author SHA1 Message Date
Bruno Dilly ced8d4f56d ephysics: fix debug msgs at some functions
Broken in r77467

SVN revision: 80098
2012-12-03 19:47:18 +00:00
Leandro Dorileo bf451a024a EPhysics: density field in material struct, int -> double
--This line, and those below, will be ignored--

SVN revision: 79851
2012-11-29 18:55:10 +00:00
Leandro Dorileo 40e3df1121 EPhysics: constraint removal
Delete the constraints a body belongs to on body removal and avoid
bullet to segfault.

--This line, and those below, will be ignored--

SVN revision: 79850
2012-11-29 18:54:36 +00:00
Leandro Dorileo 9e76f59766 EPhysics: add hinge test
Add a test to simulate a hinge constraint using the generic constraint

--This line, and those below, will be ignored--

SVN revision: 79849
2012-11-29 18:53:56 +00:00
Leandro Dorileo 0b558bc80c EPhysics: generic constraint
This patch changes how constraints are created and configured, now we
use a bullet generic implementation which let us operate on the 6
degrees of freedom(linear and angular ones).

We have used 6dof for slider constraint but now we assume 2 types of
constraints, single body - simply ephysics_constraint_add(body) - and a linked
one - ephysics_constraint_linked_add(body1, body2) used to constrain 2 bodies
linked together.

Having said that we introduce the following changes:

+ migrate p2p constraint to 6Dof

We want to have a constraint api generic enouth to allow many different
constraint behaviour, 6Dof was picked to do that, so p2p needs a migration.

+ move ephysics_constraint_slider_* functions

Since the whole constraint infra-sctructure is being migrated to 6Dof the
linear and angular limit functions - previously used only by slider constraint -
now looks more generic enough to be used by constraint in general.

+ add constraint anchor API

Instead of telling the anchoring positioning in the constraint creating we have
set it's default value to the the middle os the body and if the user wants to change
it call ephysics_constraint_anchor_set and reset it.

The ephysics_constraint_anchor_set() considers the canvas coordinate instead of using
the body orientation. So now one can tell a constraints anchor is set to 100, 10, 0
in the canvas coordinate system and not (body_center.x - 20, body_center.y - 5, body_center.z - 1).

+ constraint migrate the bt_constraint

Since we're working only with 6Dof constraints it is reasonable to change the constraints
bt_constraint field to btGeneric6DofConstraint.

+ add 3 axes to constraints

Now constraints API knows about x, y and z axes - linear and angular limiting, anchor
setting and the constraint creation functions are fully supported.

+ constraint calls are renamed

The constraint calls were renamed so ephysics_constraint_p2p_add() now is known as
ephysics_constraint_linked_add() and ephysics_constraint_slider_add() became
ephysics_constraint_add() where the first one is meant for constrain 2 bodies and
the second one for single body constraints.

--This line, and those below, will be ignored--

SVN revision: 79848
2012-11-29 18:51:51 +00:00
Bruno Dilly f3946716d8 ephysics: don't try to set bad body geometry when adding

If render geometry is not set yet, it will try to set a bad geometry
for the boundary boxes.
In this case, let these bodies with default size and only resize them
when render geometry is set.

SVN revision: 79791
2012-11-28 21:47:58 +00:00
Bruno Dilly 1a1890fabb ephysics: add improve dbg msgs
To help me debuging it while I'm working on Edje.

SVN revision: 79790
2012-11-28 21:47:47 +00:00
Bruno Dilly 704173e539 ephysics: don't allow a body to be scaled to 0 in any

In this case it will be considered inactive and things
won't work as expected.

SVN revision: 79789
2012-11-28 21:47:30 +00:00
Bruno Dilly 34fa1349ba ephysics: random doc fixes
SVN revision: 79781
2012-11-28 12:55:53 +00:00
Leandro Dorileo 14a4767f24 EPhysics: add a soft ellipsoid test
A test to rotate a soft ellipsoid to demonstrate the multi face implementation.

Patch by: Leandro Dorileo <>

SVN revision: 79609
2012-11-23 21:52:25 +00:00
Leandro Dorileo ffecc4ac0f EPhysics: soft button test
A new test with a soft button deforming while clicking on it.

Patch by: Leandro Dorileo <>

SVN revision: 79608
2012-11-23 21:52:18 +00:00
Leandro Dorileo 1a1adc1a5f EPhysics: soft body operations on triangles list
This patch introduces API to get a list of triangles inside an
area and another to apply impulse - also - in a list of triangles.

Patch by: Leandro Dorileo <>

SVN revision: 79607
2012-11-23 21:52:08 +00:00
Leandro Dorileo 889ba8d307 EPhysics: fix soft body resize
When resizing a soft body move the anchored rigid body to the
center of it.

Patch by: Leandro Dorileo <>

SVN revision: 79606
2012-11-23 21:52:02 +00:00
Leandro Dorileo f4ce94ee18 EPhysics: avoid slices double deletion
This patch avoids slices double deletion case ecore evas deletes the
slices evas objects before ephysics has actually shutdown and/or simulation
thread hasn't been canceled.

Patch by: Leandro Dorileo <>

SVN revision: 79605
2012-11-23 21:51:53 +00:00
Leandro Dorileo ecd61b29af EPhysics: add api to get the slice index based on its
evas object

Patch by: Leandro Dorileo <>

SVN revision: 79604
2012-11-23 21:51:44 +00:00
Leandro Dorileo 0e3e700e52 EPhysics: add soft ellipsoid and multi face

This patch introduces the ellipsoid soft body and its multi face

Patch by: Leandro Dorileo <>

SVN revision: 79603
2012-11-23 21:51:38 +00:00
Leandro Dorileo 1a82b27622 EPhysics: flag test fixes
Add one more bending constraint and sets gravity to ephysics default

Patch by: Leandro Dorileo <>

SVN revision: 79601
2012-11-23 21:51:24 +00:00
Leandro Dorileo a231ae47dc EPhysics: test flag fix Evas_Mouse_Event_* usage
Now using the proper event attributes.

Patch by: Leandro Dorileo <>

SVN revision: 79600
2012-11-23 21:51:18 +00:00
Leandro Dorileo 3e10c1bdb6 EPhysics: fix random memory leaks
Patch by: Leandro Dorileo <>

SVN revision: 79599
2012-11-23 21:51:03 +00:00
Leandro Dorileo 0951154f9c EPhysics: slice_init doesn't know about
body->evas_object anymore

So we can use the same functions to initialize the slices in case of
face slicing.

Patch by: Leandro Dorileo <>

SVN revision: 79598
2012-11-23 21:50:02 +00:00
Leandro Dorileo 6f743c6978 EPhysics: soft body slice per face
This changes how initial points of deformations are mapped, now we
must support multiple faces so different points of deformation for

Patch by: Leandro Dorileo <>

SVN revision: 79597
2012-11-23 21:49:57 +00:00
Leandro Dorileo f962999612 EPhysics: soft body slicing refactory
Prepare to use the same infra structure of slicing for soft body multi-face
deformation implementation.

Patch by: Leandro Dorileo <>

SVN revision: 79596
2012-11-23 21:49:51 +00:00
Leandro Dorileo 96388823a7 EPhysics: reset soft body's slices layer
If a evas object has its layer reset so we must apply the change its
slices evas objects.

Patch by: Leandro Dorileo <>

SVN revision: 79595
2012-11-23 21:49:44 +00:00
Leandro Dorileo cf2d140f8c EPhysics: add soft body triangle impulse API
Patch by: Leandro Dorileo <>

SVN revision: 79594
2012-11-23 21:43:49 +00:00
Leandro Dorileo 5d49f5912a EPhysics: flip page test
This patch adds a test to simulate page flipping.

Patch by: Leandro Dorileo <>

SVN revision: 79593
2012-11-23 21:43:44 +00:00
Leandro Dorileo 900580095c EPhysics: add soft body bending constraints API
This patch introduces the API ephysics_body_soft_body_bending_constraints_add
used define how deformeable a soft body is supposed to be.

Patch by: Leandro Dorileo <>

SVN revision: 79592
2012-11-23 21:43:32 +00:00
Leandro Dorileo fa05bab343 EPhysics: generate bending constraints just once
Unlikely the cluster generate bullet will not rebuild the bending
constraints every call, so we must prevent creating duplicated

Patch by: Leandro Dorileo <>

SVN revision: 79591
2012-11-23 21:43:25 +00:00
Leandro Dorileo a7e90dc5a7 EPhysics: move just a single node of a triangle
Patch by: Leandro Dorileo <>

SVN revision: 79590
2012-11-23 21:43:19 +00:00
Bruno Dilly 52e0d54174 ephysics: change quaternion API to avoid many free calls
It was really annoying and error prone (easy to leak).

SVN revision: 79299
2012-11-14 20:01:20 +00:00
Bruno Dilly 621a670813 ephysics: add quaternion group to main doc page
I forgot that.

SVN revision: 79297
2012-11-14 20:01:01 +00:00
Bruno Dilly eab0f81290 ephysics: wrap bullet's quaternion
Useful for 3d rotations.
Avoid issues found when using euler angles, like gimbal locks.

SVN revision: 79252
2012-11-13 22:18:16 +00:00
Bruno Dilly cbf0049a64 ephysics: add cube 3d test
spot issues on rotation based on euler angles

SVN revision: 79251
2012-11-13 22:18:09 +00:00
Bruno Dilly c1e3f6a574 ephysics: fix body rotation set / get
There was a inversion on setter and getter wasn't calculating
euler angles correctly.

SVN revision: 79250
2012-11-13 22:18:03 +00:00
Bruno Dilly 3803a8d502 ephysics: fix docs regarding torque axis.
SVN revision: 79249
2012-11-13 22:17:54 +00:00
Leandro Dorileo 31069a97ce EPhysics: sandbox reduce time resolution
Reduce simulation time resolution to avoid soft body penetration.

Patch by: Leandro Dorileo <>

SVN revision: 79058
2012-11-09 18:58:57 +00:00
Leandro Dorileo d0f93b0aaa EPhysics: do not wait to disassociate a boundary
If a user has asked for a boundary deletion do not wait until body_del
callback to clean it up to avoid returning a body marked for deletion
case the user decided to add it again.

Patch by: Leandro Dorileo <>

SVN revision: 79057
2012-11-09 18:58:51 +00:00
Leandro Dorileo be9c5adb45 EPhysics: fix soft body geometry set
Issue found on ephysics_sandbox. The scale was been applied considering
the rigid body behaviour. This patch applies a reverse scale then scale

Patch by: Leandro Dorileo <>

SVN revision: 79056
2012-11-09 18:58:43 +00:00
Leandro Dorileo 8fa96610bb EPhysics: get rid of soft_data
Patch by: Leandro Dorileo <>

SVN revision: 79055
2012-11-09 18:58:38 +00:00
Bruno Dilly 620a0a1ac7 ephysics: toggle theme
SVN revision: 79054
2012-11-09 18:58:32 +00:00
Bruno Dilly b25a7d2816 ephysics: small fixes on grab test
Remove unneeded field of drag structure and vars, rename vars,
add checks, fix indenting.

SVN revision: 79053
2012-11-09 18:58:23 +00:00
Bruno Dilly 554a41089e ephysics: add toggle on tests with light
So users can see impacts caused by using light.

SVN revision: 79051
2012-11-09 18:58:12 +00:00
Bruno Dilly ac4f92f547 ephysics: add coins test requested by Raster
Just giving his 2 cents.

 joke: acidx
 images: marina

SVN revision: 79050
2012-11-09 18:57:58 +00:00
Bruno Dilly 53b29208ee ephysics: implement update of cylinder faces
SVN revision: 79049
2012-11-09 18:57:51 +00:00
Bruno Dilly 77f193677b ephysics: fix evas object rotation based on body
Inverts y component.

SVN revision: 79048
2012-11-09 18:53:38 +00:00
Bruno Dilly 06bf7b0761 ephysics: add dices test
SVN revision: 79047
2012-11-09 18:53:26 +00:00
Bruno Dilly d2ed5cbb47 ephysics: implement update of box faces objects
SVN revision: 79045
2012-11-09 18:53:11 +00:00
Bruno Dilly 02d3fdb54b ephysics: use integer on body struct to store shape
Instead of comparing strings to return of bullet collision shapes

SVN revision: 79044
2012-11-09 18:53:04 +00:00
Bruno Dilly 3d9cf4bd2b ephysics: fix outdates docs regarding light
SVN revision: 79043
2012-11-09 18:52:55 +00:00
Bruno Dilly 530c8b4310 ephysics: use a common API to add faces for all types
of body

SVN revision: 79042
2012-11-09 18:52:49 +00:00
Bruno Dilly 61d7e5e30e ephysics: support multiple evas objects associated to

SVN revision: 79041
2012-11-09 18:52:42 +00:00