From c4687116adfdeb5de056000ef3d2dd47b8695339 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Tue, 29 Jan 2008 15:10:18 +0000 Subject: * Implemented grab and throw in ODE. It's a little strong still so toss gently at first to test the waters or you'll lose prim to the pit at the edge of the sim. Make sure the object is physical before trying to toss it or it'll just move to the new location. --- .../BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 10 ++++++++++ .../Region/Physics/BulletXPlugin/BulletXPlugin.cs | 10 ++++++++++ OpenSim/Region/Physics/Manager/PhysicsActor.cs | 17 +++++++++++++++++ OpenSim/Region/Physics/OdePlugin/ODECharacter.cs | 11 +++++++++++ OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 11 +++++++++++ OpenSim/Region/Physics/POSPlugin/POSPlugin.cs | 21 +++++++++++++++++++++ OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs | 20 ++++++++++++++++++++ 7 files changed, 100 insertions(+) (limited to 'OpenSim/Region/Physics') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index 636cf1a..ff157d7 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -224,6 +224,16 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin set { return; } } + public override bool Grabbed + { + set { return; } + } + + public override bool Selected + { + set { return; } + } + public override bool IsPhysical { get { return false; } diff --git a/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs b/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs index deba5f6..f42fdf6 100644 --- a/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs +++ b/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs @@ -883,6 +883,16 @@ namespace OpenSim.Region.Physics.BulletXPlugin set { return; } } + public override bool Grabbed + { + set { return; } + } + + public override bool Selected + { + set { return; } + } + public virtual void SetAcceleration(PhysicsVector accel) { lock (BulletXScene.BulletXLock) diff --git a/OpenSim/Region/Physics/Manager/PhysicsActor.cs b/OpenSim/Region/Physics/Manager/PhysicsActor.cs index d393b62..f97b279 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsActor.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsActor.cs @@ -122,6 +122,10 @@ namespace OpenSim.Region.Physics.Manager public abstract PrimitiveBaseShape Shape { set; } + public abstract bool Grabbed { set; } + + public abstract bool Selected { set; } + public virtual void RequestPhysicsterseUpdate() { // Make a temporary copy of the event to avoid possibility of @@ -190,6 +194,8 @@ namespace OpenSim.Region.Physics.Manager public abstract void AddForce(PhysicsVector force); public abstract void SetMomentum(PhysicsVector momentum); + + } public class NullPhysicsActor : PhysicsActor @@ -206,6 +212,17 @@ namespace OpenSim.Region.Physics.Manager set { return; } } + public override bool Grabbed + { + set { return; } + } + + public override bool Selected + { + set { return; } + } + + public override bool CollidingGround { get { return false; } diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs index f9010e6..3f63477 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs @@ -152,6 +152,17 @@ namespace OpenSim.Region.Physics.OdePlugin set { m_alwaysRun = value; } } + public override bool Grabbed + { + set { return; } + } + + public override bool Selected + { + set { return; } + } + + public override bool IsPhysical { get { return false; } diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index dcff558..d70819e 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs @@ -202,6 +202,17 @@ namespace OpenSim.Region.Physics.OdePlugin set { return; } } + public override bool Grabbed + { + set { return; } + } + + public override bool Selected + { + set { return; } + } + + public void enableBody() { // Sets the geom to a body diff --git a/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs b/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs index 74b319a..2b07553 100644 --- a/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs +++ b/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs @@ -354,6 +354,16 @@ namespace OpenSim.Region.Physics.POSPlugin set { return; } } + public override bool Grabbed + { + set { return; } + } + + public override bool Selected + { + set { return; } + } + public override bool IsPhysical { get { return false; } @@ -607,5 +617,16 @@ namespace OpenSim.Region.Physics.POSPlugin get { return false; } set { return; } } + + public override bool Grabbed + { + set { return; } + } + + public override bool Selected + { + set { return; } + } + } } \ No newline at end of file diff --git a/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs b/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs index 20bf358..71bd94e 100644 --- a/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs +++ b/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs @@ -224,6 +224,16 @@ namespace OpenSim.Region.Physics.PhysXPlugin set { return; } } + public override bool Grabbed + { + set { return; } + } + + public override bool Selected + { + set { return; } + } + public override bool IsPhysical { get { return false; } @@ -410,6 +420,16 @@ namespace OpenSim.Region.Physics.PhysXPlugin set { return; } } + public override bool Grabbed + { + set { return; } + } + + public override bool Selected + { + set { return; } + } + public override bool ThrottleUpdates { get { return false; } -- cgit v1.1