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/POSPlugin/POSPlugin.cs | 36 +++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'OpenSim/Region/Physics/POSPlugin/POSPlugin.cs') diff --git a/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs b/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs index a565598..26310f9 100644 --- a/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs +++ b/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs @@ -383,6 +383,22 @@ namespace OpenSim.Region.Physics.POSPlugin get { return new PhysicsVector(0.5f, 0.5f, 1.0f); } set { } } + 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 { @@ -492,6 +508,26 @@ namespace OpenSim.Region.Physics.POSPlugin set { _size = value; } } + 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