Merge branch 'Physics' of https://github.com/dean11/Danbias into Physics

This commit is contained in:
Robin Engman 2013-12-04 09:52:03 +01:00
commit f2548c43ce
5 changed files with 18 additions and 0 deletions

View File

@ -177,4 +177,9 @@ void SimpleRigidBody::SetOrientation( const Float4x4 &orientation )
void SimpleRigidBody::SetSize( const Float3 &size )
{
this->rigid.SetSize( size );
}
void SimpleRigidBody::SetMomentum( const Float3 &worldG )
{
this->rigid.SetLinearMomentum( worldG );
}

View File

@ -41,6 +41,7 @@ namespace Oyster { namespace Physics
void SetRotation( const ::Oyster::Math::Float4x4 &rotation );
void SetOrientation( const ::Oyster::Math::Float4x4 &orientation );
void SetSize( const ::Oyster::Math::Float3 &size );
void SetMomentum( const ::Oyster::Math::Float3 &worldG );
private:
::Oyster::Physics3D::RigidBody rigid;

View File

@ -183,4 +183,9 @@ void SphericalRigidBody::SetSize( const Float3 &size )
{
this->rigid.SetSize( size );
this->body.radius = 0.5f * Min( Min( size.x, size.y ), size.z ); // inline Min( FloatN )?
}
void SphericalRigidBody::SetMomentum( const Float3 &worldG )
{
this->rigid.SetLinearMomentum( worldG );
}

View File

@ -42,6 +42,7 @@ namespace Oyster { namespace Physics
void SetRotation( const ::Oyster::Math::Float4x4 &rotation );
void SetOrientation( const ::Oyster::Math::Float4x4 &orientation );
void SetSize( const ::Oyster::Math::Float3 &size );
void SetMomentum( const ::Oyster::Math::Float3 &worldG );
private:
::Oyster::Physics3D::RigidBody rigid;

View File

@ -390,6 +390,12 @@ namespace Oyster
* Use API::SetSize(...)
********************************************************/
virtual void SetSize( const ::Oyster::Math::Float3 &size ) = 0;
/********************************************************
* To not be called if is in Engine
* Use API::?? @todo TODO:
********************************************************/
virtual void SetMomentum( const ::Oyster::Math::Float3 &worldG ) = 0;
};
struct API::SimpleBodyDescription