From ebbbd37605e2954c877454ed8cafd4027f0bdc10 Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Sun, 28 Sep 2008 21:53:56 +0000 Subject: Added the plumbing for llSetVehicleRotationParam in the classes between the LSL implementation and the underlying physics engines. --- OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 8 ++++++++ .../Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 5 +++++ OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs | 5 +++++ OpenSim/Region/Physics/Manager/PhysicsActor.cs | 6 ++++++ OpenSim/Region/Physics/OdePlugin/ODECharacter.cs | 6 ++++++ OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 5 +++++ OpenSim/Region/Physics/POSPlugin/POSCharacter.cs | 5 +++++ OpenSim/Region/Physics/POSPlugin/POSPrim.cs | 5 +++++ OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs | 10 ++++++++++ .../ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 15 ++++++++++++++- 10 files changed, 69 insertions(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index e76952a..68df0e4 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs @@ -2353,6 +2353,14 @@ namespace OpenSim.Region.Environment.Scenes } } + public void SetVehicleRotationParam(int param, Quaternion rotation) + { + if (PhysActor != null) + { + PhysActor.VehicleRotationParam(param, rotation); + } + } + public void SetGroup(UUID groupID, IClientAPI client) { _groupID = groupID; diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index c75c40e..96543da 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -345,6 +345,11 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin } + public override void VehicleRotationParam(int param, Quaternion rotation) + { + + } + public override PhysicsVector CenterOfMass { get { return PhysicsVector.Zero; } diff --git a/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs b/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs index acd4cb1..e62f966 100644 --- a/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs +++ b/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs @@ -959,6 +959,11 @@ namespace OpenSim.Region.Physics.BulletXPlugin { } + + public override void VehicleRotationParam(int param, OpenMetaverse.Quaternion rotation) + { + + } public override PhysicsVector CenterOfMass { diff --git a/OpenSim/Region/Physics/Manager/PhysicsActor.cs b/OpenSim/Region/Physics/Manager/PhysicsActor.cs index c5e6c8b..44d4df7 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsActor.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsActor.cs @@ -177,6 +177,7 @@ namespace OpenSim.Region.Physics.Manager public abstract void VehicleFloatParam(int param, float value); public abstract void VehicleVectorParam(int param, PhysicsVector value); + public abstract void VehicleRotationParam(int param, Quaternion rotation); public abstract PhysicsVector GeometricCenter { get; } public abstract PhysicsVector CenterOfMass { get; } @@ -290,6 +291,11 @@ namespace OpenSim.Region.Physics.Manager } + public override void VehicleRotationParam(int param, Quaternion rotation) + { + + } + public override PhysicsVector CenterOfMass { get { return PhysicsVector.Zero; } diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs index b6dbac0..6af0781 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs @@ -547,6 +547,12 @@ namespace OpenSim.Region.Physics.OdePlugin } + public override void VehicleRotationParam(int param, Quaternion rotation) + { + + } + + public override PhysicsVector CenterOfMass { get { return PhysicsVector.Zero; } diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index 3af73cd..9db7e8b 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs @@ -1886,6 +1886,11 @@ namespace OpenSim.Region.Physics.OdePlugin } + public override void VehicleRotationParam(int param, Quaternion rotation) + { + + } + public override PhysicsVector CenterOfMass { get { return PhysicsVector.Zero; } diff --git a/OpenSim/Region/Physics/POSPlugin/POSCharacter.cs b/OpenSim/Region/Physics/POSPlugin/POSCharacter.cs index 719d4cf..9719a05 100644 --- a/OpenSim/Region/Physics/POSPlugin/POSCharacter.cs +++ b/OpenSim/Region/Physics/POSPlugin/POSCharacter.cs @@ -169,6 +169,11 @@ namespace OpenSim.Region.Physics.POSPlugin } + public override void VehicleRotationParam(int param, Quaternion rotation) + { + + } + public override PhysicsVector CenterOfMass { get { return PhysicsVector.Zero; } diff --git a/OpenSim/Region/Physics/POSPlugin/POSPrim.cs b/OpenSim/Region/Physics/POSPlugin/POSPrim.cs index a674e77..265e170 100644 --- a/OpenSim/Region/Physics/POSPlugin/POSPrim.cs +++ b/OpenSim/Region/Physics/POSPlugin/POSPrim.cs @@ -131,6 +131,11 @@ namespace OpenSim.Region.Physics.POSPlugin } + public override void VehicleRotationParam(int param, Quaternion rotation) + { + + } + public override PhysicsVector CenterOfMass { get { return PhysicsVector.Zero; } diff --git a/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs b/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs index c65ce1d..c9d2c13 100644 --- a/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs +++ b/OpenSim/Region/Physics/PhysXPlugin/PhysXPlugin.cs @@ -353,6 +353,11 @@ namespace OpenSim.Region.Physics.PhysXPlugin } + public override void VehicleRotationParam(int param, Quaternion rotation) + { + + } + public override PhysicsVector CenterOfMass { get { return PhysicsVector.Zero; } @@ -693,6 +698,11 @@ namespace OpenSim.Region.Physics.PhysXPlugin } + public override void VehicleRotationParam(int param, Quaternion rotation) + { + + } + public override PhysicsVector CenterOfMass { get { return PhysicsVector.Zero; } diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index edc732e..e560d52 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -5162,6 +5162,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api NotImplemented("llSetVehicleType"); } + //CFK 9/28: Most, but not all of the underlying plumbing between here and the physics modules is in + //CFK 9/28: so these are not complete yet. public void llSetVehicleFloatParam(int param, float value) { m_host.AddScriptLPS(1); @@ -5175,6 +5177,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } } + //CFK 9/28: Most, but not all of the underlying plumbing between here and the physics modules is in + //CFK 9/28: so these are not complete yet. public void llSetVehicleVectorParam(int param, LSL_Vector vec) { m_host.AddScriptLPS(1); @@ -5188,10 +5192,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } } + //CFK 9/28: Most, but not all of the underlying plumbing between here and the physics modules is in + //CFK 9/28: so these are not complete yet. public void llSetVehicleRotationParam(int param, LSL_Rotation rot) { m_host.AddScriptLPS(1); - NotImplemented("llSetVehicleRotationParam"); + if (m_host.ParentGroup != null) + { + if (m_host.ParentGroup.RootPart != null) + { + m_host.ParentGroup.RootPart.SetVehicleRotationParam(param, + new Quaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s)); + } + } } public void llSetVehicleFlags(int flags) -- cgit v1.1