Added function for ICustomBody
void ICustomBody::SetMomentum( const ::Oyster::Math::Float3 &worldG ) - Added and implemented
This commit is contained in:
parent
0a0e327d71
commit
e4476f7757
|
@ -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 );
|
||||
}
|
|
@ -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;
|
||||
|
|
|
@ -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 );
|
||||
}
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue