SimpleRigidBody::Predict(..) added

This commit is contained in:
Dander7BD 2013-12-20 11:30:11 +01:00
parent d163b7d8cf
commit ec0f0e0d14
3 changed files with 11 additions and 0 deletions

View File

@ -266,6 +266,11 @@ UpdateState SimpleRigidBody::Update( Float timeStepLength )
return UpdateState_altered;
}
void SimpleRigidBody::Predict( Float4 &outDeltaPos, Float4 &outDeltaAxis, const Float4 &actingLinearImpulse, const Float4 &actingAngularImpulse, Float deltaTime )
{
this->rigid.Predict_LeapFrog( outDeltaPos, outDeltaAxis, actingLinearImpulse, actingAngularImpulse, deltaTime );
}
void SimpleRigidBody::SetScene( void *scene )
{
this->scene = (Octree*)scene;

View File

@ -36,6 +36,7 @@ namespace Oyster { namespace Physics
//::Oyster::Math::Float4x4 & GetView( ::Oyster::Math::Float4x4 &targetMem = ::Oyster::Math::Float4x4() ) const;
UpdateState Update( ::Oyster::Math::Float timeStepLength );
void Predict( ::Oyster::Math::Float4 &outDeltaPos, ::Oyster::Math::Float4 &outDeltaAxis, const ::Oyster::Math::Float4 &actingLinearImpulse, const ::Oyster::Math::Float4 &actingAngularImpulse, ::Oyster::Math::Float deltaTime );
void SetScene( void *scene );
void SetSubscription( EventAction_Collision functionPointer );

View File

@ -338,6 +338,11 @@ namespace Oyster
********************************************************/
virtual UpdateState Update( ::Oyster::Math::Float timeStepLength ) = 0;
/********************************************************
* @todo TODO: add doc
********************************************************/
virtual void Predict( ::Oyster::Math::Float4 &outDeltaPos, ::Oyster::Math::Float4 &outDeltaAxis, const ::Oyster::Math::Float4 &actingLinearImpulse, const ::Oyster::Math::Float4 &actingAngularImpulse, ::Oyster::Math::Float deltaTime ) = 0;
/********************************************************
* Sets which scene this ICustomBody is within.
* Reserved to only be used by the scene.