Commit Graph

75 Commits

Author SHA1 Message Date
Robin Engman 9c18ba14b9 Fixed kinetic calculation 2014-01-22 15:29:50 +01:00
Robin Engman 53961f0e88 Added new onCollisionResponse handle 2014-01-22 13:50:54 +01:00
Robin Engman 0cae6261e9 ApplyEffect is now easier to handle for the user
Only needs a function with a pointer to an ICustomBody now.
2014-01-22 12:36:12 +01:00
Robin Engman 5c85580ffd Added gravity normal to state struct 2014-01-21 14:56:34 +01:00
Robin Engman 090d44b518 Added visit function to API
Called with collideable and hit action
2014-01-21 14:10:31 +01:00
Dander7BD 43e5561995 Gravity fix 3 2014-01-21 10:34:22 +01:00
Dander7BD 76723cf2d8 Gravity fix 2 2014-01-21 09:58:33 +01:00
Dander7BD 98563b6c33 Gravity fix 2014-01-21 09:27:52 +01:00
Dander7BD 0107745c7e Disable rotation
disabled at:
* RigidBody::Update_LeapFrog
* SimpleRigidBody::SetState
* SphericalRigidBody::SetState
2014-01-20 15:31:19 +01:00
Dander7BD 82d1a03450 ICustomBody :: Custom Tag added 2014-01-20 13:44:12 +01:00
Dander7BD 0b8ecd740a Added ICustombody event subscription
ICustomBody::EventAction_Move
if an object have moved, an event can now be subscribed.

External Impact:
ICustomBody
SimpleBodyDescription
SphericalBodyDescription
2014-01-20 11:29:43 +01:00
Dander7BD a8c87273e2 Gravity normal fix
Forgot to update that value. Done
2014-01-20 11:29:42 +01:00
Dander7BD ff4a39cdac Gravity implemented 2014-01-20 11:29:41 +01:00
Dander7BD 0f3c92cd52 Obsolete code removed
More commentated out than deleted actually
2014-01-20 11:29:39 +01:00
Robin Engman acb344ca44 Added missing mass and inertia 2014-01-20 11:29:39 +01:00
Dander7BD f2c6cc5306 Revert "Work asssignment split line"
This reverts commit 8ecd263318.
2014-01-20 11:29:35 +01:00
Dander7BD 2314935f48 linear coll. resp. fix add
fix didn't cover all cases. Now it do
2014-01-20 11:29:35 +01:00
Dander7BD ee5e5ff8ce linear collision response fix
moved improved version of Robin's implementation
2014-01-20 11:29:34 +01:00
Dander7BD 502513d4f8 Work asssignment split line 2014-01-20 11:29:33 +01:00
Dander7BD 4d3032dc81 postmerge compile error fix 2013-12-20 12:13:12 +01:00
Dander7BD ca90b3ae3b OnPossibleCollision updated 2013-12-20 12:08:33 +01:00
Robin Engman a440cffb0e Added function to get delta time
Now in local physics API
2013-12-20 12:08:32 +01:00
Robin Engman 66e93fbdae SimpleRigid functions mirrored in SphericalRigid
The functions added to SimpleRigidBody has been added to
SphericalRigidBody too.
2013-12-20 12:08:31 +01:00
Dander7BD ec0f0e0d14 SimpleRigidBody::Predict(..) added 2013-12-20 12:08:30 +01:00
Dander7BD d163b7d8cf Partial SimpleRigidBody update end 2013-12-20 12:08:30 +01:00
Dander7BD 604a17056c Partial SimpleRigid update 2013-12-20 12:08:28 +01:00
Dander7BD bbc489eac9 RigidBody improved and Gimbal lock proofed 2013-12-20 12:08:25 +01:00
Dander7BD ff52977dcf Bug fixes
including a hack
2013-12-20 12:08:24 +01:00
Dander7BD 461fecd1d2 Bug fixing
SimpleRigidBody::GetNormal returned wrong results.
Second bounce impulse in OnPossibleCollision, should be subtracted
instead of added.
2013-12-20 12:08:24 +01:00
Dander7BD 840f000ec9 Bug fix in API_Impl OnPossibleCollision(...) 2013-12-20 12:08:22 +01:00
Dander7BD 4e21e2b0c0 Renamed Formula::CollisionResponse::Impulse to..
.. Formula::CollisionResponse::Bounce
2013-12-20 12:08:20 +01:00
Dander7BD 24418603ad ICustomBody::GetNormal returns Float4::null if..
.. no normal can be decided.
2013-12-20 12:08:20 +01:00
Dander7BD 76c83add3d Added sanity check to SphericalRigidBody::GetNormalAt 2013-12-20 12:08:19 +01:00
Dander7BD 42418257cb CustomBodies now aware of it's scene
+ other minor changes
2013-12-20 12:08:18 +01:00
Robin Engman 59d5a3dc1e Created function for friction 2013-12-20 12:08:17 +01:00
Dander7BD 9cee69edd6 Extended friction content of the ICustomBody::State struct 2013-12-20 12:08:17 +01:00
Robin Engman 56dec6cf5d Added "alpha" friction
Alpha means that the friction is not tested and most likely needs
tweaking.
2013-12-20 12:08:16 +01:00
Dander7BD 09e55ddc30 SimpleRigidBody::GetNormalAt Done
implemented by using RayVsPlane tests
2013-12-20 12:07:46 +01:00
Dander7BD 5051a9e767 Major StateStruct and API update 2013-12-20 12:07:45 +01:00
Dander7BD dbb0c38432 Big patch
Loads of collision response related implementations/edits
2013-12-20 12:07:43 +01:00
Dander7BD c854b1af58 Stuff 2013-12-20 11:59:35 +01:00
Robin Engman c740bd5935 Added some data to PhysicsAPI
GetRigidLinearVelocity() and void* as reference to game object.
2013-12-12 10:02:35 +01:00
Dander7BD 5835a72acc Setstruct introduction done
Can be found as:
Physics::Struct::CustomBodyState
Physics::ICustomBody::State
Is all inline thus no expensive API calls, as intended.
Will be expanded to move API call methods from Physics::ICustomBody to
it.
2013-12-06 09:46:30 +01:00
Dander7BD 202ee23b25 Octtree::leafData Container should be kept updated now 2013-12-04 11:49:33 +01:00
Dander7BD 1d94ed0ddc Fixed MomentOfInertia methods 2013-12-04 11:30:56 +01:00
Robin Engman f2548c43ce Merge branch 'Physics' of https://github.com/dean11/Danbias into Physics 2013-12-04 09:52:03 +01:00
Robin Engman b03e9af027 Fixed octree and API
Rewrote AddObject function in octree and OnPossibleCollision in
PhysocsAPI_Impl
2013-12-04 09:51:48 +01:00
Dander7BD e4476f7757 Added function for ICustomBody
void ICustomBody::SetMomentum( const ::Oyster::Math::Float3 &worldG )
- Added and implemented
2013-12-03 15:11:24 +01:00
Dander7BD 026b427deb Implemented a temporary collision test update
Will only call the subscribed CollisioEventAction whenevera collision is
detected.
2013-11-29 10:00:07 +01:00
Robin Engman 1a06c7c7e6 Changed from pointer to reference
Did it in sample and visit functions
2013-11-29 10:00:06 +01:00