Commit Graph

326 Commits

Author SHA1 Message Date
Leandro Dorileo 1bcae8fdd4 EPhysics: on velocity example unregister callback on restart
Unregister callback on restart and avoid trying to use an to be deleted
body.


SVN revision: 81401
2012-12-19 20:07:43 +00:00
Leandro Dorileo 1329aad821 EPhysics: add soft body light implementation
Do not use the evas map 3d light util function for every slice and
avoid the unexpected "mosaic" effect.


SVN revision: 81306
2012-12-18 21:15:25 +00:00
Leandro Dorileo 979116ddff EPhysics: simplify the restacking data free routine
SVN revision: 80986
2012-12-14 20:04:31 +00:00
Leandro Dorileo 67a601e44c EPhysics: free body and constraint list on test
SVN revision: 80985
2012-12-14 20:04:24 +00:00
Bruno Dilly 9a22dfe79c ephysics: move src/bin to examples
And update doxyfile
It's a more reasonable name for this directory,
since now it won't build a dir, just a few files
used to exemplify ephysics usage on docs.


SVN revision: 80897
2012-12-13 21:25:20 +00:00
Bruno Dilly bc319eb9bb ephysics: get back example header
Used on ephysics docs
Now make doc should works fine


SVN revision: 80896
2012-12-13 21:17:20 +00:00
Bruno Dilly f1088d5631 ephysics_tests: copy forgotten stuff and svnignore
SVN revision: 80895
2012-12-13 21:13:47 +00:00
Bruno Dilly 9584915d91 ephysics: cleanup after tests split
SVN revision: 80894
2012-12-13 21:07:06 +00:00
Bruno Dilly 7a504551b2 Create trunk/ephysics_tests
And mv / cp test stuff from ephysics to ephysics_tests


SVN revision: 80893
2012-12-13 21:03:41 +00:00
Bruno Dilly ceae5649b6 ephysics: prepare to split tests
SVN revision: 80891
2012-12-13 20:42:24 +00:00
Leandro Dorileo d516515d47 EPhysics: test_soft_ellipsoid.c becomes test_soft_sphere.c
Following the renaming wave test_soft_ellipsoid.c is renamed to its
sphere counter part.


SVN revision: 80721
2012-12-11 21:11:25 +00:00
Leandro Dorileo 547ade5f6c EPhysics: soft_circle and soft_ellipsoid renaming
For sake of consistency moving soft_circle to soft_cylinder and
soft_ellipsoid becomes soft_sphere. Their face identification were
moved as well. The faces identifications were also unified.


SVN revision: 80720
2012-12-11 21:11:19 +00:00
Leandro Dorileo 2ccf6d2a11 EPhysics: fix issues with force application
This patch fixes the forces apply, the current implementation will
never apply it. We're also applying rate twice, get rid of rate on
forces_apply function.


SVN revision: 80719
2012-12-11 21:11:12 +00:00
Leandro Dorileo 2e8fcf0a23 EPhysics: fix issues with rotation
We must convert degrees to radians wherever operating with angles.


SVN revision: 80718
2012-12-11 21:11:07 +00:00
Leandro Dorileo 44a9b9a350 EPhysics: add ephysics_body_sphere_add() API
SVN revision: 80717
2012-12-11 21:11:00 +00:00
Leandro Dorileo c90d6c5842 EPhysics: ephysics_body_circle_add() becomes ephysics_body_cylinder_add()
SVN revision: 80716
2012-12-11 21:10:53 +00:00
Bruno Dilly 2903b1f122 ephysics: scan-build cleanup
SVN revision: 80714
2012-12-11 20:48:31 +00:00
Bruno Dilly 6891e9a0e8 ephysics: warn if try to use functions not implemented
by clothes




SVN revision: 80713
2012-12-11 20:48:24 +00:00
Bruno Dilly 8758e77f79 ephysics: handle evas object visibitily on default update
SVN revision: 80624
2012-12-10 21:58:06 +00:00
Leandro Dorileo 8f8cf756ee EPHysics: introduce a generic resize_cb for soft body faces
Introduce a generic resize_cb for soft body faces and fix the
"not pre-resized evas object issue" for multi faces implementation as well.

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


SVN revision: 80615
2012-12-10 17:15:27 +00:00
Leandro Dorileo 0941fad05f EPhysics: fix issues with resizing cloth
--This line, and those below, will be ignored--


SVN revision: 80614
2012-12-10 17:15:18 +00:00
Leandro Dorileo d56bd9c189 EPHysics: change the location of _ephysics_body_geometry_set
--This line, and those below, will be ignored--


SVN revision: 80613
2012-12-10 17:15:11 +00:00
Leandro Dorileo 8fed4fff45 EPhysics: fix issues identified by edje support
Add slices as member of obj smart parent - when it's the case -
so we can restack it when the received evas object is member of a
smart object.

Resize the evas object on ephysics_body_evas_object_set to w=1,
h=1 when its initial/original size is 0, this prevents errors on
evas_object_image_source_set().

Reset the soft body transform on resize - put it back to its
prior position - the one before scaling.

On body_move do not consider the moving of anchored rigid body
enough, move the soft body vertices as well.

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


SVN revision: 80612
2012-12-10 17:15:05 +00:00
Bruno Dilly f9293909d9 ephysics: add event WORLD_UPDATE
SVN revision: 80274
2012-12-05 19:27:53 +00:00
Leandro Dorileo 3604cc2f4f EPhysics: avoid unused parameter warnings
Avoid *unused parameter* warnings on bullet API due to virtual functions.

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


SVN revision: 80251
2012-12-05 13:50:39 +00:00
Leandro Dorileo 2975811327 EPhysics: flip page test improvements
--This line, and those below, will be ignored--


SVN revision: 80250
2012-12-05 13:50:30 +00:00
Leandro Dorileo 4640e5cdca EPhysics: soft body drag coefficient
Add API for handling with soft body drag coefficient.

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


SVN revision: 80249
2012-12-05 13:50:20 +00:00
Leandro Dorileo d435db2931 EPhysics: fix soft body velocity and stop implementation
+ velocity
Handle cloth cases on velocity functions and consider both rigid
and soft body whenever touching velocities + stoping a body.

+ activation
Activate the body when setting angular velocity.

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


SVN revision: 80248
2012-12-05 13:50:08 +00:00
Leandro Dorileo 7df4546acf EPhysics: soft button improvements
Use a bigger image to soft button tests, add light on/off button,
use of anchor hardness API.

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


SVN revision: 80108
2012-12-03 21:29:42 +00:00
Leandro Dorileo d449396bed EPhysics: anchor hardness api and small fixes
This patch introduces a separeted API for handling with anchor hardness,
and fixes small problems with pose and soft body impulses.

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


SVN revision: 80107
2012-12-03 21:29:30 +00:00
Leandro Dorileo ff57aea853 EPhysics: fix y orientation issues
Fix a small issue on y orientation on triangles_inside_get and soft body
impulse.

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


SVN revision: 80106
2012-12-03 21:29:21 +00:00
Leandro Dorileo 4a1a773d27 EPhysics: force body update on light/perspective changes
If light configuration has been changed or perspective changed or simply
enabled/disabled force inactive bodies to update.

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


SVN revision: 80105
2012-12-03 21:29:03 +00:00
Leandro Dorileo f481315a26 EPhysics: fix soft body rotation_set
--This line, and those below, will be ignored--


SVN revision: 80104
2012-12-03 21:28:52 +00:00
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
API's.

--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
boundaries

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
axis

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 <dorileo@profusion.mobi>



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 <dorileo@profusion.mobi>



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 <dorileo@profusion.mobi>



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 <dorileo@profusion.mobi>



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 <dorileo@profusion.mobi>



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 <dorileo@profusion.mobi>



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

This patch introduces the ellipsoid soft body and its multi face
implementation.


Patch by: Leandro Dorileo <dorileo@profusion.mobi>



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
value.


Patch by: Leandro Dorileo <dorileo@profusion.mobi>



SVN revision: 79601
2012-11-23 21:51:24 +00:00