Commit Graph

54 Commits

Author SHA1 Message Date
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 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 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 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 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
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 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
each.


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



SVN revision: 79597
2012-11-23 21:49:57 +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 <dorileo@profusion.mobi>



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


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



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



SVN revision: 79590
2012-11-23 21:43:19 +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 <dorileo@profusion.mobi>



SVN revision: 79057
2012-11-09 18:58:51 +00:00
Leandro Dorileo 8fa96610bb EPhysics: get rid of soft_data
Patch by: Leandro Dorileo <dorileo@profusion.mobi>



SVN revision: 79055
2012-11-09 18:58:38 +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 61d7e5e30e ephysics: support multiple evas objects associated to
body




SVN revision: 79041
2012-11-09 18:52:42 +00:00
Bruno Dilly 560c3e6fa8 ephysics: improve body struct readability a bit
Actually ephysics body deserves a redesign, since it differs
a lot between types. It wasn't previewed.



SVN revision: 79038
2012-11-09 18:52:22 +00:00
Bruno Dilly 9f04fdf723 ephysics: use evas_object_image_source API
Remove workaround on soft body slicing



SVN revision: 78726
2012-10-31 21:02:50 +00:00
Bruno Dilly 67f36ff048 ephysics: avoid many unecessary allocs / free on
collision detection

Only allocates data when it has a callback registered.



SVN revision: 78725
2012-10-31 21:02:43 +00:00
Bruno Dilly 8d4e7bdd62 ephysics: fix soft body slicing
Also, fix evas_object_set on cases when it shouldn't use
evas object geometry.



SVN revision: 78483
2012-10-25 21:54:14 +00:00
Leandro Dorileo 5d3d4978ad EPhysics: soft body geometry get fix
Since every shape has its own implementation for local scaling it`s
better to trust just our selves and hold it for further calculations.


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



SVN revision: 78482
2012-10-25 21:54:06 +00:00
Leandro Dorileo 906fff0011 EPhysics: no need to anchor props
Actually for cloth anchors its hardness must always be 0.8.


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



SVN revision: 78479
2012-10-25 21:53:44 +00:00
Bruno Dilly 22cc05a9fe ephysics: support back-face culling
SVN revision: 78265
2012-10-19 18:50:46 +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 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 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
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 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
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 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 a3eda42485 ephysics: add a log domain usage counter
This way we assure eina log will be working until the last
thread ends.



SVN revision: 77456
2012-10-04 22:38:11 +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 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
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 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 3fe6e1dc40 EPhysics: constraint recalc
Just making it possible to fix world rate set.
This code will be modified when all constraints are added as generic
and modified later.



SVN revision: 75333
2012-08-16 21:35:09 +00:00
Bruno Dilly 44aeda07ae EPhysics: implement body recalc
SVN revision: 75332
2012-08-16 21:35:04 +00:00
Bruno Dilly ebf3a282fb EPhysics: delete constraints if world is deleted
SVN revision: 75328
2012-08-16 21:34:44 +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 1de398ce60 EPhysics: add camera move event
SVN revision: 75228
2012-08-13 22:24:28 +00:00
Bruno Dilly 6c53875522 EPhysics: add EPhysics Shape
It will be used to create bodies with collision shapes other
than boxes or circles.

For now, only convex shapes.



SVN revision: 75151
2012-08-10 21:05:13 +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 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 0520b61219 EPhysics: implement body tracking by camera
It's flicking, code needs to be reviewed.
Theme needs love as well.



SVN revision: 74505
2012-07-27 14:50:36 +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