Added new function to set orientation.

This commit is contained in:
Robin Engman 2014-01-28 09:24:51 +01:00
parent a07e2911de
commit 5d1e05cc4e
2 changed files with 12 additions and 2 deletions

View File

@ -256,6 +256,13 @@ namespace Oyster
this->isSpatiallyAltered = this->isDisturbed = true;
}
inline void CustomBodyState::SetOrientation( const ::Oyster::Math::Float3 &angularAxis, const ::Oyster::Math::Float3 &translation )
{
this->angularAxis.xyz = angularAxis ;
this->centerPos.xyz = translation;
this->isSpatiallyAltered = this->isDisturbed = true;
}
/*inline void CustomBodyState::SetRotation( const ::Oyster::Math::Float4x4 &rotation )
{
this->SetRotation( ::Oyster::Math3D::AngularAxis(rotation) );
@ -267,6 +274,8 @@ namespace Oyster
this->SetCenterPosition( orientation.v[3] );
}*/
inline void CustomBodyState::SetLinearMomentum( const ::Oyster::Math::Float4 &g )
{
this->linearMomentum.xyz = g;

View File

@ -94,8 +94,9 @@ namespace Oyster { namespace Physics
void SetReach( const ::Oyster::Math::Float4 &halfSize );
void SetCenterPosition( const ::Oyster::Math::Float4 &centerPos );
void SetRotation( const ::Oyster::Math::Float4 &angularAxis );
void SetRotation( const ::Oyster::Math::Float4x4 &rotation );
void SetOrientation( const ::Oyster::Math::Float4x4 &orientation );
//void SetRotation( const ::Oyster::Math::Float4x4 &rotation );
//void SetOrientation( const ::Oyster::Math::Float4x4 &orientation );
void SetOrientation( const ::Oyster::Math::Float3 &angularAxis, const ::Oyster::Math::Float3 &translation );
void SetLinearMomentum( const ::Oyster::Math::Float4 &g );
void SetAngularMomentum( const ::Oyster::Math::Float4 &h );
void SetLinearImpulse( const ::Oyster::Math::Float4 &j );