RigidBody::Move(..) added
This commit is contained in:
parent
604a17056c
commit
9a67e7ef3d
|
@ -82,6 +82,13 @@ void RigidBody::Predict_LeapFrog( Float4 &outDeltaPos, Float4 &outDeltaAxis, con
|
|||
outDeltaAxis = Formula::AngularVelocity( wMomentOfInertiaTensor.GetInverse(), AverageWithDelta(this->momentum_Angular, actingAngularImpulse) );
|
||||
}
|
||||
|
||||
void RigidBody::Move( const Float4 &deltaPos, const Float4 &deltaAxis )
|
||||
{
|
||||
this->centerPos += deltaPos;
|
||||
this->axis += deltaAxis;
|
||||
this->rotation = Rotation( this->axis );
|
||||
}
|
||||
|
||||
void RigidBody::ApplyImpulse( const Float4 &worldJ, const Float4 &atWorldPos )
|
||||
{ // by Dan Andersson
|
||||
Float4 worldOffset = atWorldPos - this->centerPos;
|
||||
|
|
|
@ -32,6 +32,7 @@ namespace Oyster { namespace Physics3D
|
|||
void Update_LeapFrog( ::Oyster::Math::Float updateFrameLength );
|
||||
void Predict_LeapFrog( ::Oyster::Math::Float4 &outDeltaPos, ::Oyster::Math::Float4 &outDeltaAxis, const ::Oyster::Math::Float4 &actingLinearImpulse, const ::Oyster::Math::Float4 &actingAngularImpulse, ::Oyster::Math::Float deltaTime );
|
||||
|
||||
void Move( const ::Oyster::Math::Float4 &deltaPos, const ::Oyster::Math::Float4 &deltaAxis );
|
||||
void ApplyImpulse( const ::Oyster::Math::Float4 &worldJ, const ::Oyster::Math::Float4 &atWorldPos );
|
||||
void ApplyImpulse_Linear( const ::Oyster::Math::Float4 &worldJ );
|
||||
void ApplyImpulse_Angular( const ::Oyster::Math::Float4 &worldJ );
|
||||
|
|
Loading…
Reference in New Issue