From: Michael B. <mic...@gm...> - 2012-06-30 08:40:53
|
On Fri, 29 Jun 2012 15:24:33 -0700 "Enlightenment SVN" <no-...@en...> wrote: > Log: > EPhysics: add linear slop setter / getter for world > > Constraint solver can be configured using some advanced settings, like > the solver slop factor. > > Linear slop on sequencial impulse constraint solver is used as a factor > for penetration. The penetration will the manifold distance + linear slop. > > > > Author: bdilly > Date: 2012-06-29 15:24:33 -0700 (Fri, 29 Jun 2012) > New Revision: 73066 > Trac: http://trac.enlightenment.org/e/changeset/73066 > > Modified: > trunk/ephysics/src/lib/EPhysics.h trunk/ephysics/src/lib/ephysics_world.cpp so uhh...what does this actually do? |
From: Gustavo S. B. <bar...@pr...> - 2012-07-06 02:20:51
|
Some getters miss "const" keyword On Thursday, July 5, 2012, Enlightenment SVN wrote: > Log: > EPhysics: worlds solver mode > > Add a function to enable/disable the world constraint solver mode. > Also add wrappers for bullets solver modes enumerations, and a function > to query the current status. > > > Patch by: Leandro Dorileo <do...@pr... <javascript:;>> > > > > Author: bdilly > Date: 2012-07-05 15:53:14 -0700 (Thu, 05 Jul 2012) > New Revision: 73383 > Trac: http://trac.enlightenment.org/e/changeset/73383 > > Modified: > trunk/ephysics/src/lib/EPhysics.h > trunk/ephysics/src/lib/ephysics_world.cpp > > Modified: trunk/ephysics/src/lib/EPhysics.h > =================================================================== > --- trunk/ephysics/src/lib/EPhysics.h 2012-07-05 22:52:53 UTC (rev 73382) > +++ trunk/ephysics/src/lib/EPhysics.h 2012-07-05 22:53:14 UTC (rev 73383) > @@ -271,6 +271,26 @@ > } EPhysics_Callback_World_Type; > > /** > + * @enum _EPhysics_World_Constraint_Solver_Mode > + * typedef EPhysics_World_Constraint_Solver_Mode > + * > + * Identifies the worlds contact and joint constraint solver mode. By > default > + * EPHYSICS_WORLD_SOLVER_USE_WARMSTARTING is the only enabled solver mode. > + * > + * @see ephysics_world_constraint_solver_mode_enable_set() > + * @see ephysics_world_constraint_solver_mode_enable_get() > + * > + * @ingroup EPhysics_World > + */ > +typedef enum _EPhysics_World_Constraint_Solver_Mode > +{ > + EPHYSICS_WORLD_SOLVER_RANDMIZE_ORDER = 1, /**< Randomize the order of > solving the constraint rows*/ > + EPHYSICS_WORLD_SOLVER_USE_WARMSTARTING = 4, /**< The PGS is an > iterative algorithm where each iteration is based on the solution of > previous iteration, if no warmstarting is used, the initial solution for > PGS is set to zero each frame (by default this mode is enabled, disabling > this mode the user can face a better performance depending on the amount of > objects in the simulation)*/ > + EPHYSICS_WORLD_SOLVER_USE_2_FRICTION_DIRECTIONS = 16, /**< While > calculating a friction impulse consider this should be applied on both > bodies (this mode cause a better stacking stabilization)*/ > + EPHYSICS_WORLD_SOLVER_SIMD = 256, /**< Use a SSE optimized innerloop, > using assembly intrinsics, this is implemented and can be enabled/disabled > for Windows and Mac OSX versions, single-precision floating point, > 32bit(disabled by default)*/ > +} EPhysics_World_Solver_Mode; > + > +/** > * @typedef EPhysics_World_Event_Cb > * > * EPhysics world event callback function signature. > @@ -480,6 +500,33 @@ > > /** > * @brief > + * Enable or disable a constraint solver mode to @p world. A world can > operate > + * on several constraint solver modes. > + * > + * @param world The world to be set. > + * @param solver_mode The solver mode to set. > + * > + * @see EPhysics_World_Solver_Mode for supported solver modes. > + * @see ephysics_world_constraint_solver_mode_enable_get() > + * @ingroup EPhysics_World > + */ > +EAPI void ephysics_world_constraint_solver_mode_enable_set(EPhysics_World > *world, EPhysics_World_Solver_Mode solver_mode, Eina_Bool enable); > + > +/** > + * @brief > + * Get the @p solver_mode status on @p world. > + * > + * @param world The world to be queried. > + * @param solver_mode The solver mode of interest. > + * @return EINA_TRUE if @p solver_mode is enabled, EINA_FALSE otherwise > + * > + * @see ephysics_world_constraint_solver_mode_enable_set() > + * @ingroup EPhysics_World > + */ > +EAPI Eina_Bool > ephysics_world_constraint_solver_mode_enable_get(EPhysics_World *world, > EPhysics_World_Solver_Mode solver_mode); > + > +/** > + * @brief > * Get world gravity values for axis x and y. > * > * @param world The world object. > > Modified: trunk/ephysics/src/lib/ephysics_world.cpp > =================================================================== > --- trunk/ephysics/src/lib/ephysics_world.cpp 2012-07-05 22:52:53 UTC > (rev 73382) > +++ trunk/ephysics/src/lib/ephysics_world.cpp 2012-07-05 22:53:14 UTC > (rev 73383) > @@ -290,6 +290,8 @@ > goto no_list; > } > > + world->dynamics_world->getSolverInfo().m_solverMode ^= > + EPHYSICS_WORLD_SOLVER_SIMD; > world->dynamics_world->setGravity(btVector3(0, -9.8, 0)); > world->rate = 30; > world->dynamics_world->setInternalTickCallback(_ephysics_world_tick_cb, > @@ -496,6 +498,34 @@ > } > > EAPI void > +ephysics_world_constraint_solver_mode_enable_set(EPhysics_World *world, > EPhysics_World_Solver_Mode solver_mode, Eina_Bool enable) > +{ > + int current_solver_mode; > + if (!world) > + { > + ERR("Can't enable/disable constraint solver mode, world is > null."); > + return; > + } > + > + current_solver_mode = > world->dynamics_world->getSolverInfo().m_solverMode; > + if ((enable && !(current_solver_mode & solver_mode)) || > + (!enable && (current_solver_mode & solver_mode))) > + world->dynamics_world->getSolverInfo().m_solverMode ^= solver_mode; > +} > + > +EAPI Eina_Bool > +ephysics_world_constraint_solver_mode_enable_get(EPhysics_World *world, > EPhysics_World_Solver_Mode solver_mode) > +{ > + if (!world) > + { > + ERR("Can't get constraint solver mode status, world is null."); > + return EINA_FALSE; > + } > + > + return world->dynamics_world->getSolverInfo().m_solverMode & > solver_mode; > +} > + > +EAPI void > ephysics_world_gravity_get(const EPhysics_World *world, double *gx, > double *gy) > { > btVector3 vector; > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > enlightenment-svn mailing list > enl...@li... <javascript:;> > https://lists.sourceforge.net/lists/listinfo/enlightenment-svn > -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -------------------------------------- MSN: bar...@gm... Skype: gsbarbieri Mobile: +55 (19) 9225-2202 |
From: Bruno D. <bd...@pr...> - 2012-07-06 14:38:01
|
On Thu, Jul 5, 2012 at 11:20 PM, Gustavo Sverzut Barbieri <bar...@pr...> wrote: > Some getters miss "const" keyword True, fixed on 73419. Thanks > > On Thursday, July 5, 2012, Enlightenment SVN wrote: > >> Log: >> EPhysics: worlds solver mode >> >> Add a function to enable/disable the world constraint solver mode. >> Also add wrappers for bullets solver modes enumerations, and a function >> to query the current status. >> >> >> Patch by: Leandro Dorileo <do...@pr... <javascript:;>> >> >> >> >> Author: bdilly >> Date: 2012-07-05 15:53:14 -0700 (Thu, 05 Jul 2012) >> New Revision: 73383 >> Trac: http://trac.enlightenment.org/e/changeset/73383 >> >> Modified: >> trunk/ephysics/src/lib/EPhysics.h >> trunk/ephysics/src/lib/ephysics_world.cpp >> >> Modified: trunk/ephysics/src/lib/EPhysics.h >> =================================================================== >> --- trunk/ephysics/src/lib/EPhysics.h 2012-07-05 22:52:53 UTC (rev 73382) >> +++ trunk/ephysics/src/lib/EPhysics.h 2012-07-05 22:53:14 UTC (rev 73383) >> @@ -271,6 +271,26 @@ >> } EPhysics_Callback_World_Type; >> >> /** >> + * @enum _EPhysics_World_Constraint_Solver_Mode >> + * typedef EPhysics_World_Constraint_Solver_Mode >> + * >> + * Identifies the worlds contact and joint constraint solver mode. By >> default >> + * EPHYSICS_WORLD_SOLVER_USE_WARMSTARTING is the only enabled solver mode. >> + * >> + * @see ephysics_world_constraint_solver_mode_enable_set() >> + * @see ephysics_world_constraint_solver_mode_enable_get() >> + * >> + * @ingroup EPhysics_World >> + */ >> +typedef enum _EPhysics_World_Constraint_Solver_Mode >> +{ >> + EPHYSICS_WORLD_SOLVER_RANDMIZE_ORDER = 1, /**< Randomize the order of >> solving the constraint rows*/ >> + EPHYSICS_WORLD_SOLVER_USE_WARMSTARTING = 4, /**< The PGS is an >> iterative algorithm where each iteration is based on the solution of >> previous iteration, if no warmstarting is used, the initial solution for >> PGS is set to zero each frame (by default this mode is enabled, disabling >> this mode the user can face a better performance depending on the amount of >> objects in the simulation)*/ >> + EPHYSICS_WORLD_SOLVER_USE_2_FRICTION_DIRECTIONS = 16, /**< While >> calculating a friction impulse consider this should be applied on both >> bodies (this mode cause a better stacking stabilization)*/ >> + EPHYSICS_WORLD_SOLVER_SIMD = 256, /**< Use a SSE optimized innerloop, >> using assembly intrinsics, this is implemented and can be enabled/disabled >> for Windows and Mac OSX versions, single-precision floating point, >> 32bit(disabled by default)*/ >> +} EPhysics_World_Solver_Mode; >> + >> +/** >> * @typedef EPhysics_World_Event_Cb >> * >> * EPhysics world event callback function signature. >> @@ -480,6 +500,33 @@ >> >> /** >> * @brief >> + * Enable or disable a constraint solver mode to @p world. A world can >> operate >> + * on several constraint solver modes. >> + * >> + * @param world The world to be set. >> + * @param solver_mode The solver mode to set. >> + * >> + * @see EPhysics_World_Solver_Mode for supported solver modes. >> + * @see ephysics_world_constraint_solver_mode_enable_get() >> + * @ingroup EPhysics_World >> + */ >> +EAPI void ephysics_world_constraint_solver_mode_enable_set(EPhysics_World >> *world, EPhysics_World_Solver_Mode solver_mode, Eina_Bool enable); >> + >> +/** >> + * @brief >> + * Get the @p solver_mode status on @p world. >> + * >> + * @param world The world to be queried. >> + * @param solver_mode The solver mode of interest. >> + * @return EINA_TRUE if @p solver_mode is enabled, EINA_FALSE otherwise >> + * >> + * @see ephysics_world_constraint_solver_mode_enable_set() >> + * @ingroup EPhysics_World >> + */ >> +EAPI Eina_Bool >> ephysics_world_constraint_solver_mode_enable_get(EPhysics_World *world, >> EPhysics_World_Solver_Mode solver_mode); >> + >> +/** >> + * @brief >> * Get world gravity values for axis x and y. >> * >> * @param world The world object. >> >> Modified: trunk/ephysics/src/lib/ephysics_world.cpp >> =================================================================== >> --- trunk/ephysics/src/lib/ephysics_world.cpp 2012-07-05 22:52:53 UTC >> (rev 73382) >> +++ trunk/ephysics/src/lib/ephysics_world.cpp 2012-07-05 22:53:14 UTC >> (rev 73383) >> @@ -290,6 +290,8 @@ >> goto no_list; >> } >> >> + world->dynamics_world->getSolverInfo().m_solverMode ^= >> + EPHYSICS_WORLD_SOLVER_SIMD; >> world->dynamics_world->setGravity(btVector3(0, -9.8, 0)); >> world->rate = 30; >> world->dynamics_world->setInternalTickCallback(_ephysics_world_tick_cb, >> @@ -496,6 +498,34 @@ >> } >> >> EAPI void >> +ephysics_world_constraint_solver_mode_enable_set(EPhysics_World *world, >> EPhysics_World_Solver_Mode solver_mode, Eina_Bool enable) >> +{ >> + int current_solver_mode; >> + if (!world) >> + { >> + ERR("Can't enable/disable constraint solver mode, world is >> null."); >> + return; >> + } >> + >> + current_solver_mode = >> world->dynamics_world->getSolverInfo().m_solverMode; >> + if ((enable && !(current_solver_mode & solver_mode)) || >> + (!enable && (current_solver_mode & solver_mode))) >> + world->dynamics_world->getSolverInfo().m_solverMode ^= solver_mode; >> +} >> + >> +EAPI Eina_Bool >> +ephysics_world_constraint_solver_mode_enable_get(EPhysics_World *world, >> EPhysics_World_Solver_Mode solver_mode) >> +{ >> + if (!world) >> + { >> + ERR("Can't get constraint solver mode status, world is null."); >> + return EINA_FALSE; >> + } >> + >> + return world->dynamics_world->getSolverInfo().m_solverMode & >> solver_mode; >> +} >> + >> +EAPI void >> ephysics_world_gravity_get(const EPhysics_World *world, double *gx, >> double *gy) >> { >> btVector3 vector; >> >> >> >> ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> enlightenment-svn mailing list >> enl...@li... <javascript:;> >> https://lists.sourceforge.net/lists/listinfo/enlightenment-svn >> > > > -- > Gustavo Sverzut Barbieri > http://profusion.mobi embedded systems > -------------------------------------- > MSN: bar...@gm... > Skype: gsbarbieri > Mobile: +55 (19) 9225-2202 > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > enlightenment-devel mailing list > enl...@li... > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- Bruno Dilly Senior Developer ProFUSION embedded systems http://profusion.mobi |
From: Gustavo S. B. <bar...@pr...> - 2012-07-06 02:22:12
|
Missing const On Thursday, July 5, 2012, Enlightenment SVN wrote: > Log: > EPhysics: add missing damping getter > > > > > Author: bdilly > Date: 2012-07-05 15:53:56 -0700 (Thu, 05 Jul 2012) > New Revision: 73386 > Trac: http://trac.enlightenment.org/e/changeset/73386 > > Modified: > trunk/ephysics/src/lib/EPhysics.h > trunk/ephysics/src/lib/ephysics_body.cpp > > Modified: trunk/ephysics/src/lib/EPhysics.h > =================================================================== > --- trunk/ephysics/src/lib/EPhysics.h 2012-07-05 22:53:40 UTC (rev 73385) > +++ trunk/ephysics/src/lib/EPhysics.h 2012-07-05 22:53:56 UTC (rev 73386) > @@ -1316,15 +1316,34 @@ > * factor. > * > * @param body The physics body. > - * @param linear_damping The linear damping force to apply on @p body. > - * @param angular_damping The angular damping force to apply on @p body. > + * @param linear_damping The linear damping factor to apply on @p body. > + * @param angular_damping The angular damping factor to apply on @p body. > * > + * @see ephysics_body_damping_get(). > + * > * @ingroup EPhysics_Body > */ > EAPI void ephysics_body_damping_set(EPhysics_Body *body, double > linear_damping, double angular_damping); > > /** > * @brief > + * Get the angular and linear damping values. > + * > + * Damping(linear and angular) values are applied to body's linear and > angular > + * velocity. > + * > + * @param body The physics body. > + * @param linear_damping The linear damping factor applied over @p body. > + * @param angular_damping The angular damping factor applied over @p body. > + * > + * @see ephysics_body_damping_set() for details. > + * > + * @ingroup EPhysics_Body > + */ > +EAPI void ephysics_body_damping_get(EPhysics_Body *body, double > *linear_damping, double *angular_damping); > + > +/** > + * @brief > * Update the evas object associated to the body. > * > * This function should be called to update position and rotation of > > Modified: trunk/ephysics/src/lib/ephysics_body.cpp > =================================================================== > --- trunk/ephysics/src/lib/ephysics_body.cpp 2012-07-05 22:53:40 UTC > (rev 73385) > +++ trunk/ephysics/src/lib/ephysics_body.cpp 2012-07-05 22:53:56 UTC > (rev 73386) > @@ -660,6 +660,20 @@ > } > > EAPI void > +ephysics_body_damping_get(EPhysics_Body *body, double *linear_damping, > double *angular_damping) > +{ > + if (!body) > + { > + ERR("Can't get damping, body is null."); > + return; > + } > + > + if (linear_damping) *linear_damping = > body->rigid_body->getLinearDamping(); > + if (angular_damping) *angular_damping = > + body->rigid_body->getAngularDamping(); > +} > + > +EAPI void > ephysics_body_evas_object_update(EPhysics_Body *body) > { > if (!body) > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > enlightenment-svn mailing list > enl...@li... <javascript:;> > https://lists.sourceforge.net/lists/listinfo/enlightenment-svn > -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -------------------------------------- MSN: bar...@gm... Skype: gsbarbieri Mobile: +55 (19) 9225-2202 |
From: Bruno D. <bd...@pr...> - 2012-07-02 14:35:42
|
On Sat, Jun 30, 2012 at 5:40 AM, Michael Blumenkrantz <mic...@gm...> wrote: > On Fri, 29 Jun 2012 15:24:33 -0700 > "Enlightenment SVN" <no-...@en...> wrote: > >> Log: >> EPhysics: add linear slop setter / getter for world >> >> Constraint solver can be configured using some advanced settings, like >> the solver slop factor. >> >> Linear slop on sequencial impulse constraint solver is used as a factor >> for penetration. The penetration will the manifold distance + linear slop. >> >> >> >> Author: bdilly >> Date: 2012-06-29 15:24:33 -0700 (Fri, 29 Jun 2012) >> New Revision: 73066 >> Trac: http://trac.enlightenment.org/e/changeset/73066 >> >> Modified: >> trunk/ephysics/src/lib/EPhysics.h trunk/ephysics/src/lib/ephysics_world.cpp > > > so uhh...what does this actually do? We are starting the development of a very simple game, here. And placing objects right over the others sometimes lead us to very unstable scenarios. Objects use to shake a bit before stopping. We read that increasing a bit the linear slop would let objects to penetrate a bit each other so they wouldn't look so unstable. People tested it here and could see a small improvement. > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > enlightenment-devel mailing list > enl...@li... > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel -- Bruno Dilly Senior Developer ProFUSION embedded systems http://profusion.mobi |