From 27e028752600921deac57e281f1df6d8c7310c5d Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Wed, 19 Dec 2007 22:42:06 +0000 Subject: * Re-did the mass calculations in ODE for Prim * Exposed the mass as a PhysicsActor read only property (so scripts can get at it - hint hint -) * Hollow and Path Cuts affect the prim mass (all Hollow Types are supported in this calculation (sphere,square,triangle)) * Prim no longer sink into the ground. --- OpenSim/Region/Physics/Manager/PhysicsActor.cs | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Physics/Manager/PhysicsActor.cs') diff --git a/OpenSim/Region/Physics/Manager/PhysicsActor.cs b/OpenSim/Region/Physics/Manager/PhysicsActor.cs index 7e8d160..5894ab0 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsActor.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsActor.cs @@ -157,6 +157,14 @@ namespace OpenSim.Region.Physics.Manager public abstract PhysicsVector Position { get; set; } + public abstract float Mass { get; } + + public abstract PhysicsVector Force { get;} + + public abstract PhysicsVector GeometricCenter { get; } + + public abstract PhysicsVector CenterOfMass { get; } + public abstract PhysicsVector Velocity { get; set; } public abstract PhysicsVector Acceleration { get; } @@ -210,7 +218,22 @@ namespace OpenSim.Region.Physics.Manager get { return PhysicsVector.Zero; } set { return; } } - + public override float Mass + { + get { return 0f; } + } + public override PhysicsVector Force + { + get { return PhysicsVector.Zero; } + } + public override PhysicsVector CenterOfMass + { + get { return PhysicsVector.Zero; } + } + public override PhysicsVector GeometricCenter + { + get { return PhysicsVector.Zero; } + } public override PrimitiveBaseShape Shape { set -- cgit v1.1