Commit Graph

134 Commits

Author SHA1 Message Date
Bruno Dilly bb1ef80447 ephysics: don't change body properties if custom
material is set

It shouldn't imply in specific properties



SVN revision: 78134
2012-10-17 21:37:10 +00:00
Bruno Dilly e25a9d45e8 ephysics: don't try to unset dragging if it's not set
Otherwise weird behaviors could happens
<evil laughs>



SVN revision: 78095
2012-10-16 23:18:48 +00:00
Leandro Dorileo a376a5ceeb EPhysics: random fixes
This patch fixes:
+ the scale_get function(the soft body shape scale was not been set),
+ the soft body evas object deletion callback, it wasn't properly freeing
the slices evas objects;
+ puts the soft body base evas object back to canvas;


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



SVN revision: 78093
2012-10-16 23:18:35 +00:00
Leandro Dorileo 56bdc31570 EPhysics: soft body dragging support
This patch introduces an API to freeze(dragging_set) an specific
soft body trimesh face untill it gets called to unfreeze(dragging_unset) it.


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



SVN revision: 78091
2012-10-16 23:18:21 +00:00
Leandro Dorileo f4fa980cce EPhysics: get rid of soft body smart object
Since we want to restack all the bodies evas objects against each other,
being it a soft body or not, we can't have the soft body slices member
of something else.


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



SVN revision: 78090
2012-10-16 23:12:59 +00:00
Leandro Dorileo 4f73c6d46e EPhysics: triangle API
This patch introduces soft body's mesh triangle manipulation, for picking
the triangle of a body in X and Y and moving it as well.


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



SVN revision: 78088
2012-10-16 23:12:47 +00:00
Bruno Dilly bb90530f7b ephysics: add autodel functions for front and back of
the scene




SVN revision: 78016
2012-10-15 21:54:35 +00:00
Bruno Dilly c2b0c76b74 ephysics: add front and back boundaries
Use it on test "Bouncing 3D"



SVN revision: 78015
2012-10-15 21:54:29 +00:00
Bruno Dilly 9447db42d8 ephysics: fix boundaries position
SVN revision: 78014
2012-10-15 21:54:22 +00:00
Bruno Dilly f6e0e9a3f5 ephysics: revert add depth parameter to boundary api
reverts r77785, since it will be properly handled before adding
front and back boundaries



SVN revision: 78013
2012-10-15 21:54:14 +00:00
Bruno Dilly 66b8ca8afc ephysics: implement rotation quartenion getter
So it's possible to create a custom body update callback using
it with evas_map_util_quat_rotate().



SVN revision: 78010
2012-10-15 21:53:56 +00:00
Bruno Dilly 05dab66b0b ephysics: render 3d rotation
SVN revision: 78009
2012-10-15 21:53:51 +00:00
Bruno Dilly c970090254 ephysics: lights, camera, action!
Add light support.

It uses evas_map_util_3d_lighting() internally and is only applied
over selected bodies.



SVN revision: 77803
2012-10-10 20:32:08 +00:00
Leandro Dorileo 17fa1d7756 EPhysics: add depth parameter to boundary api
Patch by: Leandro Dorileo <dorileo@profusion.mobi>



SVN revision: 77785
2012-10-10 19:18:15 +00:00
Bruno Dilly 21e6264deb ephysics: fix z position on geometry set using cm
SVN revision: 77784
2012-10-10 19:18:02 +00:00
Bruno Dilly f75457d4b9 ephysics: add new 3d shapes
Instead of creating it from 2d shapes.
Bad news is that for some cases basically points will need to
be kind of duplicated.



SVN revision: 77783
2012-10-10 19:17:54 +00:00
Bruno Dilly 59cc6c6f2f ephysics: support forces (and torques) on 3 axes
SVN revision: 77782
2012-10-10 19:17:49 +00:00
Bruno Dilly bdd5ba2115 ephysics: expose z-axis gravity
SVN revision: 77781
2012-10-10 19:17:44 +00:00
Bruno Dilly a1897ddf57 ephysics: impulses support the 3 planes
SVN revision: 77780
2012-10-10 19:17:36 +00:00
Bruno Dilly 71583d30e3 ephysics: support angular and linear velocity on 3
axes




SVN revision: 77779
2012-10-10 19:17:29 +00:00
Bruno Dilly f7c2009910 ephysics: collision detection inform z coordinate
SVN revision: 77778
2012-10-10 19:17:13 +00:00
Bruno Dilly 8b9c28f003 ephysics: support 3 axes on body geometry related
functions

geometry set / get, move, resize



SVN revision: 77777
2012-10-10 19:17:01 +00:00
Bruno Dilly 32f03f55a4 ephysics: body rotation getter / setter changed to
support 3 axes




SVN revision: 77776
2012-10-10 19:16:55 +00:00
Bruno Dilly 290a7d8821 ephysics: allow to enable angular movement on all the
planes




SVN revision: 77775
2012-10-10 19:16:48 +00:00
Bruno Dilly 4ef1a74d4c ephysics: support enabling moves on z axis
SVN revision: 77774
2012-10-10 19:16:43 +00:00
Leandro Dorileo 179efa1d66 EPhysics: soft body members stacking
Using evas stacking for soft body slices members.


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



SVN revision: 77677
2012-10-09 20:00:03 +00:00
Leandro Dorileo 6f9e9a67f7 EPhysics: body evas object unset return the base
object

In the unset operation return the base object, not the smart one.


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



SVN revision: 77676
2012-10-09 19:59:53 +00:00
Bruno Dilly 3db5bdd771 ephysics: re-activate body when velocity is set
SVN revision: 77584
2012-10-08 18:00:55 +00:00
Leandro Dorileo 252643a33b EPhysics: add cloth support
This patch introduces the cloth support. Auxiliary API's for setting
full anchors, cloth nodes anchors and so on is also introduced. Few
other issues concerning soft body and cloth transform, has been worked
to fit the cloth support needs.


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



SVN revision: 77467
2012-10-04 22:40:16 +00:00
Leandro Dorileo 1cb8f6fc0c EPhysics: multi point deformation
This patch introduces support for multi point deformation mapping,
it's wrapped with an evas smart object to handle multiple slices.


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



SVN revision: 77466
2012-10-04 22:40:07 +00:00
Bruno Dilly 7d994cc8e6 ephysics: don't try to lock on internal delete
SVN revision: 77464
2012-10-04 22:39:53 +00:00
Bruno Dilly 0bdec67255 ephysics: support body material
Using material_set it will be easier to set density, friction
and restitution to a body, simulating properties of the selected
material.



SVN revision: 77462
2012-10-04 22:39:42 +00:00
Bruno Dilly 748cfbe2f4 ephysics: support density
SVN revision: 77460
2012-10-04 22:39:29 +00:00
Bruno Dilly b52d2ed85e ephysics: add define to infinite mass
Also check for invalid values on mass set.



SVN revision: 77459
2012-10-04 22:39:10 +00:00
Bruno Dilly 9668304291 ephysics: use multiple threads
Use a mainloop thread and one thread per world dedicated to simulation.

It's using ecore threads, out of the pool.

For now there are still some locks when trying to change physics
elements properties while a simulation is going on, but soon it will
have a queue of properties to be applied after a simulation step, so
it won't lock.



SVN revision: 77455
2012-10-04 22:38:06 +00:00
Bruno Dilly 3f27034dc7 ephysics: shrink convex shapes to avoid margin gap
SVN revision: 76563
2012-09-12 21:50:01 +00:00
Leandro Dorileo 3ecddb724a ephysics: softbody
** linear/angular joints:
We don't need the linear and angular joints for soft bodies.

Actually these joint's are pulling the soft body towards (0, 0, 0).
The soft body is anchored with the rigid one, so limiting the rigid body
angular and linear movements seems to be enough.

** soft body configs:
Some soft body configurations were tweaked to fix issues of instability
of soft bodies.

** soft body hardness API:
Soft body hardness API was introduced as well.

** points of deformation:
The points of deformation were inverted;

** soft body mass:
Fixed issues with soft body mass changing, now it doesn't "explode" after
changing its mass.


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



SVN revision: 76560
2012-09-12 21:49:14 +00:00
Bruno Dilly d42b1c51c2 ephysics: fix unused vars and parameters
SVN revision: 76154
2012-09-04 22:42:28 +00:00
Bruno Dilly 06d88ea834 ephysics: pass evas object associated to body on del
event




SVN revision: 76153
2012-09-04 22:42:20 +00:00
Bruno Dilly 9b56c8b27a EPhysics: expose bodies center of mass.
SVN revision: 75574
2012-08-22 20:05:35 +00:00
Bruno Dilly eae54a26ee EPhysics: improve convex shapes
Center of these shapes were wrong, now it's much better.
But collision still seems a bit inaccurate.



SVN revision: 75572
2012-08-22 20:05:25 +00:00
Bruno Dilly 3627234fb8 EPhysics: use vertex reduction utility
Convex meshes often have too many vertices.
This slows down collision detection a lot, and there is no benefit in the
unnecessary details.



SVN revision: 75571
2012-08-22 20:05:19 +00:00
Bruno Dilly f5891500b0 EPhysics: fix indenting and remove useless lines
No need to set to 0 zeroed memory.



SVN revision: 75569
2012-08-22 20:05:07 +00:00
Leandro Dorileo 18743b72ad EPhysics: soft body implementation
Introduces soft body dynamics and calls to create soft circles and boxes.


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



SVN revision: 75564
2012-08-22 20:04:39 +00:00
Bruno Dilly a10277b529 EPhysics: don't activate body if not going to apply
forces

Otherwise it won't stop, sleeping thresholds won't work...



SVN revision: 75508
2012-08-21 17:47:18 +00:00
Bruno Dilly 335912df94 EPhysics: fix y component convertion on forces and
impulses




SVN revision: 75480
2012-08-20 22:18:14 +00:00
Bruno Dilly 80f7e6307c EPhysics: consider gravity on forces getter
SVN revision: 75479
2012-08-20 22:17:34 +00:00
Bruno Dilly 218004c9e3 EPhysics: add forces API
Implement functions to make it possible to control forces acting
over a body.



SVN revision: 75476
2012-08-20 22:15:52 +00:00
Bruno Dilly 4bccde902a EPhysics: rotation set implemented
SVN revision: 75475
2012-08-20 22:14:43 +00:00
Bruno Dilly d3e74fce50 EPhysics: implement generic apply impulse for bodies
It results in central and torque impulses.



SVN revision: 75474
2012-08-20 22:14:25 +00:00
Bruno Dilly 1ef5ae1a2d EPhysics: fix torque impulse
SVN revision: 75473
2012-08-20 22:13:38 +00:00
Bruno Dilly 5c32157f04 EPhysics: fix ephysics central impulse unit and
improve docs

It should use a unit based on pixels, not meters.
This way is more compatible with the rest of API and easier
to see the result.



SVN revision: 75472
2012-08-20 22:12:14 +00:00
Bruno Dilly df457b4645 EPhysics: implement body move(), resize()
It was already possible to move and resize using geometry get / set,
but if just one of the actions is wanted, this new API is easier for the user
and save a few operations.



SVN revision: 75471
2012-08-20 22:10:52 +00:00
Bruno Dilly b5221d0705 EPhysics: fix old bug on velocity setter
It should invert y component since evas y coords increase
going down.



SVN revision: 75337
2012-08-16 21:35:31 +00:00
Bruno Dilly 44aeda07ae EPhysics: implement body recalc
SVN revision: 75332
2012-08-16 21:35:04 +00:00
Bruno Dilly ae28b7a504 EPhysics: listen for associated evas object resize event
So physics body will resize together.



SVN revision: 75230
2012-08-13 22:24:47 +00:00
Bruno Dilly 3c27a0288d EPhysics: fix updating bodies with evas object without
geometry

If a evas object associated to a body don't have w or h, don't
try to apply map / rotation on it.



SVN revision: 75229
2012-08-13 22:24:36 +00:00
Bruno Dilly 031d47d1a9 EPhysics: support bodies with generic shapes
Using EPhysics Shape.



SVN revision: 75152
2012-08-10 21:05:19 +00:00
Bruno Dilly 2497491440 EPhysics: move code duplication to _ephysics_body_add
Also, add missing checks.



SVN revision: 75150
2012-08-10 21:05:05 +00:00
Bruno Dilly 33613b8f09 EPhysics: Avoid garbagge in cb objects.
SVN revision: 75148
2012-08-10 21:04:42 +00:00
Bruno Dilly cf6678bbd4 EPhysics: improving body's event callbacks management
SVN revision: 75144
2012-08-10 21:04:08 +00:00
Bruno Dilly 73e77dff26 EPhysics: fix sleeping threshold getter
SVN revision: 75143
2012-08-10 21:03:57 +00:00
Bruno Dilly 2d2844d05e EPhysics: properly handle body delete
SVN revision: 75141
2012-08-10 21:03:39 +00:00
Bruno Dilly 4d800075e7 EPhysics: use inlist for world's bodies list
SVN revision: 75139
2012-08-10 21:03:06 +00:00
Leandro Dorileo 701ed6b8fd EPhysics: slider constraint
This patch introduces the slider constraint, adds an slider constraint
test, move p2p constraint from ephysics_constraint_add to
ephysics_constraint_p2p_add migrates its usage.

Further work will migrate the btConstraint of p2p for Generic6Dof constraint
since it's flexible enough to implement most of constraints.


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



SVN revision: 74699
2012-07-31 22:24:20 +00:00
Bruno Dilly 24c2279813 EPhysics: fix collision detection point
Also improve docs and test.



SVN revision: 74504
2012-07-27 14:50:25 +00:00
Bruno Dilly 30a6d07376 EPhysics: implement camera position handling
Now it's possibly to keep default updates of evas objects
and has scenes larger than render areas.



SVN revision: 74502
2012-07-27 14:50:03 +00:00
Leandro Dorileo 7b6a83144f EPhysics: collision filter
This patch introduces a collision filter API. Once a rigid body
has been added to some group it must just collide against rigid
bodies in the same group, if no group has been attribute it's
going to collide against any other body.


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



SVN revision: 74501
2012-07-27 14:49:53 +00:00
Leandro Dorileo 6a2d290fce EPhysics: body collision data
This patch introduces a wrapper(EPhysics_Body_Collision) to hold
the collision data(the contact body and collision position).

This data type is used by EPHYSICS_CALLBACK_BODY_COLLISION callback. The
collision detection test is migrated to the new API as well.


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



SVN revision: 74500
2012-07-27 14:49:37 +00:00
Leandro Dorileo ba55257c64 EPhysics: sleeping threshold and max sleep time
This patch introduces calls for setting the body's linear and angular
sleeping thresholds and to set the world's max sleeping time.


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



SVN revision: 74498
2012-07-27 14:48:59 +00:00
Bruno Dilly 564c23a80f EPhysics: add data setter / getter for bodies
Useful when you need structures per bodies to be updated on
collision callbacks.



SVN revision: 74495
2012-07-27 14:47:46 +00:00
Bruno Dilly 7dc1e7b4b7 EPhysics: fix mass getter
SVN revision: 74494
2012-07-27 14:47:23 +00:00
Bruno Dilly 564d1c412c EPhysics: fix missing const on some getters
spotted by k-s



SVN revision: 73419
2012-07-06 14:36:40 +00:00
Bruno Dilly ed473fb3ca EPhysics: add missing damping getter
SVN revision: 73386
2012-07-05 22:53:56 +00:00
Leandro Dorileo 2afffbd809 EPhysics: body damping set
This patch introduces a function for rigid body damping.


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



SVN revision: 73382
2012-07-05 22:52:53 +00:00
Bruno Dilly 9258827a93 EPhysics: expose linear factor
Makes it possible to restrict movement on specific axises.



SVN revision: 73313
2012-07-04 22:05:52 +00:00
Bruno Dilly c45cfc3be1 EPhysics: velocity setters and stop
SVN revision: 73312
2012-07-04 22:04:37 +00:00
Bruno Dilly 4fe7f69cd4 EPhysics: improve log msgs a bit and remove annoying one
Print world and bodies pointers so it's possible to track them.
And remove annoying "step" debug msg.



SVN revision: 73246
2012-07-03 23:21:11 +00:00
Bruno Dilly 9d0b63143b EPhysics: support autodel of bodies outside render area
Now it's possible to request a world to delete bodies outside
render area, so we can save some resources and avoid issues
with world stopped event.



SVN revision: 73245
2012-07-03 23:20:49 +00:00
Bruno Dilly ec5414e7bd EPhysics: fix velocity getters
SVN revision: 73185
2012-07-03 02:18:14 +00:00
Bruno Dilly dfd91827ee EPhysics: implement body velocity get
Implementation of functions for retrieving both the linear and angular
velocity on x, y and z axis.

Patch by Leandro Dorileo <dorileo@profusion.mobi>



SVN revision: 73182
2012-07-03 02:15:28 +00:00
Bruno Dilly eb857cbfe1 EPhysics: split the callback enum for body and world
Should avoid a mess in the future.



SVN revision: 73179
2012-07-03 02:09:34 +00:00
Bruno Dilly 068e1711b0 EPhysics: implement event callback del full for body
SVN revision: 73178
2012-07-03 02:09:21 +00:00
Bruno Dilly 28d9f92ef2 EPhysics: a new library comes to E world
It’s a wrapper between Bullet Physics and EFL to add physics effects
in a simple way.

More details on README, TODO, and edevelop mail list =)



SVN revision: 72896
2012-06-26 22:36:12 +00:00