inertiaTensor removed from API::SphericalBodyDescription

was redundant. struct already have everything that the factory needs to
generate one.
This commit is contained in:
Dander7BD 2013-11-28 12:18:06 +01:00
parent 2928e08252
commit f379ed49e5
2 changed files with 1 additions and 3 deletions

View File

@ -21,7 +21,7 @@ SphericalRigidBody::SphericalRigidBody( const API::SphericalBodyDescription &des
{ {
this->rigid = RigidBody( Box( desc.rotation, desc.centerPosition, Float3(2.0f * desc.radius) ), this->rigid = RigidBody( Box( desc.rotation, desc.centerPosition, Float3(2.0f * desc.radius) ),
desc.mass, desc.mass,
desc.inertiaTensor ); MomentOfInertia::CreateSphereMatrix( desc.mass, desc.radius ) );
this->gravityNormal = Float3::null; this->gravityNormal = Float3::null;
if( desc.subscription ) if( desc.subscription )

View File

@ -415,7 +415,6 @@ namespace Oyster
::Oyster::Math::Float3 centerPosition; ::Oyster::Math::Float3 centerPosition;
::Oyster::Math::Float radius; ::Oyster::Math::Float radius;
::Oyster::Math::Float mass; ::Oyster::Math::Float mass;
::Oyster::Math::Float4x4 inertiaTensor;
ICustomBody::EventAction_Collision subscription; ICustomBody::EventAction_Collision subscription;
bool ignoreGravity; bool ignoreGravity;
@ -425,7 +424,6 @@ namespace Oyster
this->centerPosition = ::Oyster::Math::Float3::null; this->centerPosition = ::Oyster::Math::Float3::null;
this->radius = 0.5f; this->radius = 0.5f;
this->mass = 10.0f; this->mass = 10.0f;
this->inertiaTensor = ::Oyster::Math::Float4x4::identity;
this->subscription = NULL; this->subscription = NULL;
this->ignoreGravity = false; this->ignoreGravity = false;
} }