From 94f1c208176adad301505ddef96ec282801123d8 Mon Sep 17 00:00:00 2001 From: Robin Engman Date: Tue, 21 Jan 2014 11:48:04 +0100 Subject: [PATCH] Added more data to rigid body description. Friction and restitution coeffs --- Code/GamePhysics/PhysicsStructs-Impl.h | 6 ++++++ Code/GamePhysics/PhysicsStructs.h | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/Code/GamePhysics/PhysicsStructs-Impl.h b/Code/GamePhysics/PhysicsStructs-Impl.h index 2f218095..512c8e7a 100644 --- a/Code/GamePhysics/PhysicsStructs-Impl.h +++ b/Code/GamePhysics/PhysicsStructs-Impl.h @@ -16,6 +16,9 @@ namespace Oyster this->centerPosition = ::Oyster::Math::Float4::standard_unit_w; this->size = ::Oyster::Math::Float4( 1.0f ); this->mass = 12.0f; + this->restitutionCoeff = 1.0f; + this->frictionCoeff_Dynamic = 0.5f; + this->frictionCoeff_Static = 0.5f; this->inertiaTensor = ::Oyster::Math::Float4x4::identity; this->subscription_onCollision = NULL; this->subscription_onMovement = NULL; @@ -28,6 +31,9 @@ namespace Oyster this->centerPosition = ::Oyster::Math::Float4::standard_unit_w; this->radius = 0.5f; this->mass = 10.0f; + this->restitutionCoeff = 1.0f; + this->frictionCoeff_Dynamic = 0.5f; + this->frictionCoeff_Static = 0.5f; this->subscription_onCollision = NULL; this->subscription_onMovement = NULL; this->ignoreGravity = false; diff --git a/Code/GamePhysics/PhysicsStructs.h b/Code/GamePhysics/PhysicsStructs.h index 1d3d58dd..eafe2b20 100644 --- a/Code/GamePhysics/PhysicsStructs.h +++ b/Code/GamePhysics/PhysicsStructs.h @@ -14,6 +14,9 @@ namespace Oyster { namespace Physics ::Oyster::Math::Float4 centerPosition; ::Oyster::Math::Float4 size; ::Oyster::Math::Float mass; + ::Oyster::Math::Float restitutionCoeff; + ::Oyster::Math::Float frictionCoeff_Static; + ::Oyster::Math::Float frictionCoeff_Dynamic; ::Oyster::Math::Float4x4 inertiaTensor; ::Oyster::Physics::ICustomBody::EventAction_Collision subscription_onCollision; ::Oyster::Physics::ICustomBody::EventAction_Move subscription_onMovement; @@ -28,6 +31,9 @@ namespace Oyster { namespace Physics ::Oyster::Math::Float4 centerPosition; ::Oyster::Math::Float radius; ::Oyster::Math::Float mass; + ::Oyster::Math::Float restitutionCoeff; + ::Oyster::Math::Float frictionCoeff_Static; + ::Oyster::Math::Float frictionCoeff_Dynamic; ::Oyster::Physics::ICustomBody::EventAction_Collision subscription_onCollision; ::Oyster::Physics::ICustomBody::EventAction_Move subscription_onMovement; bool ignoreGravity;