From 646bbbc84b8010e0dacbeed5342cdb045f46cc49 Mon Sep 17 00:00:00 2001 From: MW Date: Wed, 27 Jun 2007 15:28:52 +0000 Subject: Some work on restructuring the namespaces / project names. Note this doesn't compile yet as not all the code has been changed to use the new namespaces. Am committing it now for feedback on the namespaces. --- .../Physics/BasicPhysicsPlugin/AssemblyInfo.cs | 58 ++++ .../BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 294 +++++++++++++++++++++ ...penSim.Region.Physics.BasicPhysicsPlugin.csproj | 93 +++++++ ...m.Region.Physics.BasicPhysicsPlugin.csproj.user | 12 + 4 files changed, 457 insertions(+) create mode 100644 OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs create mode 100644 OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs create mode 100644 OpenSim/Region/Physics/BasicPhysicsPlugin/OpenSim.Region.Physics.BasicPhysicsPlugin.csproj create mode 100644 OpenSim/Region/Physics/BasicPhysicsPlugin/OpenSim.Region.Physics.BasicPhysicsPlugin.csproj.user (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs new file mode 100644 index 0000000..177c49d --- /dev/null +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs @@ -0,0 +1,58 @@ +/* +* Copyright (c) Contributors, http://www.openmetaverse.org/ +* See CONTRIBUTORS.TXT for a full list of copyright holders. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in the +* documentation and/or other materials provided with the distribution. +* * Neither the name of the OpenSim Project nor the +* names of its contributors may be used to endorse or promote products +* derived from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY +* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY +* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +*/ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Information about this assembly is defined by the following +// attributes. +// +// change them to the information which is associated with the assembly +// you compile. + +[assembly: AssemblyTitle("PhysXplugin")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("PhysXplugin")] +[assembly: AssemblyCopyright("")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// This sets the default COM visibility of types in the assembly to invisible. +// If you need to expose a type to COM, use [ComVisible(true)] on that type. +[assembly: ComVisible(false)] + +// The assembly version has following format : +// +// Major.Minor.Build.Revision +// +// You can specify all values by your own or you can build default build and revision +// numbers with the '*' character (the default): + +[assembly: AssemblyVersion("1.0.*")] diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs new file mode 100644 index 0000000..dcb8f3b --- /dev/null +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -0,0 +1,294 @@ +/* +* Copyright (c) Contributors, http://www.openmetaverse.org/ +* See CONTRIBUTORS.TXT for a full list of copyright holders. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in the +* documentation and/or other materials provided with the distribution. +* * Neither the name of the OpenSim Project nor the +* names of its contributors may be used to endorse or promote products +* derived from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY +* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY +* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +*/ +using System; +using System.Collections.Generic; +using OpenSim.Physics.Manager; + +namespace OpenSim.Region.Physics.BasicPhysicsPlugin +{ + /// + /// Will be the PhysX plugin but for now will be a very basic physics engine + /// + public class BasicPhysicsPlugin : IPhysicsPlugin + { + private BasicScene _mScene; + + public BasicPhysicsPlugin() + { + + } + + public bool Init() + { + return true; + } + + public PhysicsScene GetScene() + { + return new BasicScene(); + } + + public string GetName() + { + return("basicphysics"); + } + + public void Dispose() + { + + } + } + + public class BasicScene :PhysicsScene + { + private List _actors = new List(); + private float[] _heightMap; + + public BasicScene() + { + + } + + public override PhysicsActor AddAvatar(PhysicsVector position) + { + BasicActor act = new BasicActor(); + act.Position = position; + _actors.Add(act); + return act; + } + + public override void RemoveAvatar(PhysicsActor actor) + { + BasicActor act = (BasicActor)actor; + if(_actors.Contains(act)) + { + _actors.Remove(act); + } + + } + + public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size) + { + return null; + } + + public override void Simulate(float timeStep) + { + foreach (BasicActor actor in _actors) + { + actor.Position.X = actor.Position.X + (actor.Velocity.X * timeStep); + actor.Position.Y = actor.Position.Y + (actor.Velocity.Y * timeStep); + actor.Position.Z = actor.Position.Z + (actor.Velocity.Z * timeStep); + /*if(actor.Flying) + { + actor.Position.Z = actor.Position.Z + (actor.Velocity.Z * timeStep); + } + else + { + actor.Position.Z = actor.Position.Z + ((-9.8f + actor.Velocity.Z) * timeStep); + } + if(actor.Position.Z < (_heightMap[(int)actor.Position.Y * 256 + (int)actor.Position.X]+1)) + {*/ + if ((actor.Position.Y > 0 && actor.Position.Y < 256) && (actor.Position.X > 0 && actor.Position.X < 256)) + { + actor.Position.Z = _heightMap[(int)actor.Position.Y * 256 + (int)actor.Position.X] + 1; + } + else + { + if (actor.Position.Y < 0) + { + actor.Position.Y = 0; + } + else if (actor.Position.Y > 256) + { + actor.Position.Y = 256; + } + + if (actor.Position.X < 0) + { + actor.Position.X = 0; + } + if (actor.Position.X > 256) + { + actor.Position.X = 256; + } + } + //} + + + + // This code needs sorting out - border crossings etc +/* if(actor.Position.X<0) + { + ControllingClient.CrossSimBorder(new LLVector3(this.Position.X,this.Position.Y,this.Position.Z)); + actor.Position.X = 0; + actor.Velocity.X = 0; + } + if(actor.Position.Y < 0) + { + ControllingClient.CrossSimBorder(new LLVector3(this.Position.X,this.Position.Y,this.Position.Z)); + actor.Position.Y = 0; + actor.Velocity.Y = 0; + } + if(actor.Position.X > 255) + { + ControllingClient.CrossSimBorder(new LLVector3(this.Position.X,this.Position.Y,this.Position.Z)); + actor.Position.X = 255; + actor.Velocity.X = 0; + } + if(actor.Position.Y > 255) + { + ControllingClient.CrossSimBorder(new LLVector3(this.Position.X,this.Position.Y,this.Position.Z)); + actor.Position.Y = 255; + actor.Velocity.X = 0; + }*/ + } + } + + public override void GetResults() + { + + } + + public override bool IsThreaded + { + get + { + return(false); // for now we won't be multithreaded + } + } + + public override void SetTerrain(float[] heightMap) + { + this._heightMap = heightMap; + } + + public override void DeleteTerrain() + { + + } + } + + public class BasicActor : PhysicsActor + { + private PhysicsVector _position; + private PhysicsVector _velocity; + private PhysicsVector _acceleration; + private bool flying; + public BasicActor() + { + _velocity = new PhysicsVector(); + _position = new PhysicsVector(); + _acceleration = new PhysicsVector(); + } + + public override bool Flying + { + get + { + return false; + } + set + { + flying= value; + } + } + + public override PhysicsVector Position + { + get + { + return _position; + } + set + { + _position = value; + } + } + + public override PhysicsVector Velocity + { + get + { + return _velocity; + } + set + { + _velocity = value; + } + } + + public override Axiom.MathLib.Quaternion Orientation + { + get + { + return Axiom.MathLib.Quaternion.Identity; + } + set + { + + } + } + + public override PhysicsVector Acceleration + { + get + { + return _acceleration; + } + + } + + public override bool Kinematic + { + get + { + return true; + } + set + { + + } + } + public void SetAcceleration (PhysicsVector accel) + { + this._acceleration = accel; + } + + public override void AddForce(PhysicsVector force) + { + + } + + public override void SetMomentum(PhysicsVector momentum) + { + + } + } + +} diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/OpenSim.Region.Physics.BasicPhysicsPlugin.csproj b/OpenSim/Region/Physics/BasicPhysicsPlugin/OpenSim.Region.Physics.BasicPhysicsPlugin.csproj new file mode 100644 index 0000000..7dad533 --- /dev/null +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/OpenSim.Region.Physics.BasicPhysicsPlugin.csproj @@ -0,0 +1,93 @@ + + + Local + 8.0.50727 + 2.0 + {15B4FEF3-0000-0000-0000-000000000000} + Debug + AnyCPU + + + + OpenSim.Region.Physics.BasicPhysicsPlugin + JScript + Grid + IE50 + false + Library + + OpenSim.Region.Physics.BasicPhysicsPlugin + + + + + + False + 285212672 + False + + + TRACE;DEBUG + + True + 4096 + False + ..\..\..\..\bin\Physics\ + False + False + False + 4 + + + + False + 285212672 + False + + + TRACE + + False + 4096 + True + ..\..\..\..\bin\Physics\ + False + False + False + 4 + + + + + ..\..\..\..\bin\Axiom.MathLib.dll + False + + + System.dll + False + + + + + OpenSim.Region.Physics.Manager + {F4FF31EB-0000-0000-0000-000000000000} + {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + False + + + + + Code + + + Code + + + + + + + + + + diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/OpenSim.Region.Physics.BasicPhysicsPlugin.csproj.user b/OpenSim/Region/Physics/BasicPhysicsPlugin/OpenSim.Region.Physics.BasicPhysicsPlugin.csproj.user new file mode 100644 index 0000000..6841907 --- /dev/null +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/OpenSim.Region.Physics.BasicPhysicsPlugin.csproj.user @@ -0,0 +1,12 @@ + + + Debug + AnyCPU + C:\New Folder\second-life-viewer\opensim-dailys2\opensim15-06\NameSpaceChanges\bin\ + 8.0.50727 + ProjectFiles + 0 + + + + -- cgit v1.1 From fe120533efd0ec6b2248d96b9a1f8b7637c5dadd Mon Sep 17 00:00:00 2001 From: mingchen Date: Wed, 27 Jun 2007 17:12:32 +0000 Subject: *Updated prebuild.xml and ran prebuild again *Removed .user, .suo, and unneccessary files in /bin/Physics/ *OpenSim.sln should compile with nant and on windows now --- .../OpenSim.Region.Physics.BasicPhysicsPlugin.csproj.user | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 OpenSim/Region/Physics/BasicPhysicsPlugin/OpenSim.Region.Physics.BasicPhysicsPlugin.csproj.user (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/OpenSim.Region.Physics.BasicPhysicsPlugin.csproj.user b/OpenSim/Region/Physics/BasicPhysicsPlugin/OpenSim.Region.Physics.BasicPhysicsPlugin.csproj.user deleted file mode 100644 index 6841907..0000000 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/OpenSim.Region.Physics.BasicPhysicsPlugin.csproj.user +++ /dev/null @@ -1,12 +0,0 @@ - - - Debug - AnyCPU - C:\New Folder\second-life-viewer\opensim-dailys2\opensim15-06\NameSpaceChanges\bin\ - 8.0.50727 - ProjectFiles - 0 - - - - -- cgit v1.1 From 3456d951d89fbc83f742d40ca8ca2a1a79d414eb Mon Sep 17 00:00:00 2001 From: MW Date: Thu, 28 Jun 2007 13:13:17 +0000 Subject: Imported the scripting changes, so now should be up to date with sugilite. --- ...Sim.Region.Physics.BasicPhysicsPlugin.dll.build | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 OpenSim/Region/Physics/BasicPhysicsPlugin/OpenSim.Region.Physics.BasicPhysicsPlugin.dll.build (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/OpenSim.Region.Physics.BasicPhysicsPlugin.dll.build b/OpenSim/Region/Physics/BasicPhysicsPlugin/OpenSim.Region.Physics.BasicPhysicsPlugin.dll.build new file mode 100644 index 0000000..6cf26ca --- /dev/null +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/OpenSim.Region.Physics.BasicPhysicsPlugin.dll.build @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.1 From cc1c4c034c788b9e2f48d398b12b40ed8d363f40 Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Fri, 29 Jun 2007 18:37:26 +0000 Subject: * Applying Danx0r's BasicPhysics update. --- .../BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 39 +++++++++++++--------- 1 file changed, 23 insertions(+), 16 deletions(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index dcb8f3b..e3f34da 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -101,22 +101,29 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin { foreach (BasicActor actor in _actors) { - actor.Position.X = actor.Position.X + (actor.Velocity.X * timeStep); - actor.Position.Y = actor.Position.Y + (actor.Velocity.Y * timeStep); - actor.Position.Z = actor.Position.Z + (actor.Velocity.Z * timeStep); - /*if(actor.Flying) - { - actor.Position.Z = actor.Position.Z + (actor.Velocity.Z * timeStep); - } - else - { - actor.Position.Z = actor.Position.Z + ((-9.8f + actor.Velocity.Z) * timeStep); - } - if(actor.Position.Z < (_heightMap[(int)actor.Position.Y * 256 + (int)actor.Position.X]+1)) - {*/ if ((actor.Position.Y > 0 && actor.Position.Y < 256) && (actor.Position.X > 0 && actor.Position.X < 256)) { - actor.Position.Z = _heightMap[(int)actor.Position.Y * 256 + (int)actor.Position.X] + 1; + float height = _heightMap[(int)actor.Position.Y * 256 + (int)actor.Position.X] + 1.2f; + actor.Position.X = actor.Position.X + (actor.Velocity.X * timeStep); + actor.Position.Y = actor.Position.Y + (actor.Velocity.Y * timeStep); + if (actor.Flying) + { + if (actor.Position.Z + (actor.Velocity.Z * timeStep) < + _heightMap[(int)actor.Position.Y * 256 + (int)actor.Position.X] + 2) + { + actor.Position.Z = height; + actor.Velocity.Z = 0; + } + else + { + actor.Position.Z = actor.Position.Z + (actor.Velocity.Z * timeStep); + } + } + else + { + actor.Position.Z = height; + actor.Velocity.Z = 0; + } } else { @@ -167,7 +174,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin actor.Position.Y = 255; actor.Velocity.X = 0; }*/ - } + } } public override void GetResults() @@ -211,7 +218,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin { get { - return false; + return flying; } set { -- cgit v1.1 From 9b6b6d05d45cf0f754a0b26bf6240ef50be66563 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Tue, 3 Jul 2007 14:37:29 +0000 Subject: * Optimized usings (the 'LL ate my scripts' commit) * added some licensing info --- OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs | 2 -- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs index 177c49d..ce567a9 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs @@ -26,9 +26,7 @@ * */ using System.Reflection; -using System.Runtime.CompilerServices; using System.Runtime.InteropServices; - // Information about this assembly is defined by the following // attributes. // diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index e3f34da..393796f 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -25,8 +25,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; using System.Collections.Generic; +using Axiom.MathLib; using OpenSim.Physics.Manager; namespace OpenSim.Region.Physics.BasicPhysicsPlugin @@ -250,11 +250,11 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin } } - public override Axiom.MathLib.Quaternion Orientation + public override Quaternion Orientation { get { - return Axiom.MathLib.Quaternion.Identity; + return Quaternion.Identity; } set { -- cgit v1.1 From beb3073bec9438a439e13eaec40a8320a9279adc Mon Sep 17 00:00:00 2001 From: MW Date: Wed, 4 Jul 2007 19:07:27 +0000 Subject: A bit more work on Building tools/support. updated Axiom.MathLib.dll. --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index 393796f..f133045 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -26,7 +26,7 @@ * */ using System.Collections.Generic; -using Axiom.MathLib; +using Axiom.Math; using OpenSim.Physics.Manager; namespace OpenSim.Region.Physics.BasicPhysicsPlugin -- cgit v1.1 From 5f8de1e7045b9daa2d4f3b21ca826987e32efe6e Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Sun, 8 Jul 2007 19:27:04 +0000 Subject: * By popular demand, all generated build files are now deleted. Somebody should make sure the wiki is updated. --- ...penSim.Region.Physics.BasicPhysicsPlugin.csproj | 93 ---------------------- ...Sim.Region.Physics.BasicPhysicsPlugin.dll.build | 42 ---------- 2 files changed, 135 deletions(-) delete mode 100644 OpenSim/Region/Physics/BasicPhysicsPlugin/OpenSim.Region.Physics.BasicPhysicsPlugin.csproj delete mode 100644 OpenSim/Region/Physics/BasicPhysicsPlugin/OpenSim.Region.Physics.BasicPhysicsPlugin.dll.build (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/OpenSim.Region.Physics.BasicPhysicsPlugin.csproj b/OpenSim/Region/Physics/BasicPhysicsPlugin/OpenSim.Region.Physics.BasicPhysicsPlugin.csproj deleted file mode 100644 index 7dad533..0000000 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/OpenSim.Region.Physics.BasicPhysicsPlugin.csproj +++ /dev/null @@ -1,93 +0,0 @@ - - - Local - 8.0.50727 - 2.0 - {15B4FEF3-0000-0000-0000-000000000000} - Debug - AnyCPU - - - - OpenSim.Region.Physics.BasicPhysicsPlugin - JScript - Grid - IE50 - false - Library - - OpenSim.Region.Physics.BasicPhysicsPlugin - - - - - - False - 285212672 - False - - - TRACE;DEBUG - - True - 4096 - False - ..\..\..\..\bin\Physics\ - False - False - False - 4 - - - - False - 285212672 - False - - - TRACE - - False - 4096 - True - ..\..\..\..\bin\Physics\ - False - False - False - 4 - - - - - ..\..\..\..\bin\Axiom.MathLib.dll - False - - - System.dll - False - - - - - OpenSim.Region.Physics.Manager - {F4FF31EB-0000-0000-0000-000000000000} - {FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - False - - - - - Code - - - Code - - - - - - - - - - diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/OpenSim.Region.Physics.BasicPhysicsPlugin.dll.build b/OpenSim/Region/Physics/BasicPhysicsPlugin/OpenSim.Region.Physics.BasicPhysicsPlugin.dll.build deleted file mode 100644 index 6cf26ca..0000000 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/OpenSim.Region.Physics.BasicPhysicsPlugin.dll.build +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- cgit v1.1 From 2a3c79df83e800d5dfe75a1a3b140ed81da2b1d6 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Mon, 16 Jul 2007 15:40:11 +0000 Subject: changed to native line ending encoding --- .../Physics/BasicPhysicsPlugin/AssemblyInfo.cs | 112 ++-- .../BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 602 ++++++++++----------- 2 files changed, 357 insertions(+), 357 deletions(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs index ce567a9..ecf8e68 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs @@ -1,56 +1,56 @@ -/* -* Copyright (c) Contributors, http://www.openmetaverse.org/ -* See CONTRIBUTORS.TXT for a full list of copyright holders. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in the -* documentation and/or other materials provided with the distribution. -* * Neither the name of the OpenSim Project nor the -* names of its contributors may be used to endorse or promote products -* derived from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY -* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -*/ -using System.Reflection; -using System.Runtime.InteropServices; -// Information about this assembly is defined by the following -// attributes. -// -// change them to the information which is associated with the assembly -// you compile. - -[assembly: AssemblyTitle("PhysXplugin")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("PhysXplugin")] -[assembly: AssemblyCopyright("")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// This sets the default COM visibility of types in the assembly to invisible. -// If you need to expose a type to COM, use [ComVisible(true)] on that type. -[assembly: ComVisible(false)] - -// The assembly version has following format : -// -// Major.Minor.Build.Revision -// -// You can specify all values by your own or you can build default build and revision -// numbers with the '*' character (the default): - -[assembly: AssemblyVersion("1.0.*")] +/* +* Copyright (c) Contributors, http://www.openmetaverse.org/ +* See CONTRIBUTORS.TXT for a full list of copyright holders. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in the +* documentation and/or other materials provided with the distribution. +* * Neither the name of the OpenSim Project nor the +* names of its contributors may be used to endorse or promote products +* derived from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY +* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY +* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +*/ +using System.Reflection; +using System.Runtime.InteropServices; +// Information about this assembly is defined by the following +// attributes. +// +// change them to the information which is associated with the assembly +// you compile. + +[assembly: AssemblyTitle("PhysXplugin")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("PhysXplugin")] +[assembly: AssemblyCopyright("")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// This sets the default COM visibility of types in the assembly to invisible. +// If you need to expose a type to COM, use [ComVisible(true)] on that type. +[assembly: ComVisible(false)] + +// The assembly version has following format : +// +// Major.Minor.Build.Revision +// +// You can specify all values by your own or you can build default build and revision +// numbers with the '*' character (the default): + +[assembly: AssemblyVersion("1.0.*")] diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index f133045..ec406f1 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -1,301 +1,301 @@ -/* -* Copyright (c) Contributors, http://www.openmetaverse.org/ -* See CONTRIBUTORS.TXT for a full list of copyright holders. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in the -* documentation and/or other materials provided with the distribution. -* * Neither the name of the OpenSim Project nor the -* names of its contributors may be used to endorse or promote products -* derived from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY -* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -*/ -using System.Collections.Generic; -using Axiom.Math; -using OpenSim.Physics.Manager; - -namespace OpenSim.Region.Physics.BasicPhysicsPlugin -{ - /// - /// Will be the PhysX plugin but for now will be a very basic physics engine - /// - public class BasicPhysicsPlugin : IPhysicsPlugin - { - private BasicScene _mScene; - - public BasicPhysicsPlugin() - { - - } - - public bool Init() - { - return true; - } - - public PhysicsScene GetScene() - { - return new BasicScene(); - } - - public string GetName() - { - return("basicphysics"); - } - - public void Dispose() - { - - } - } - - public class BasicScene :PhysicsScene - { - private List _actors = new List(); - private float[] _heightMap; - - public BasicScene() - { - - } - - public override PhysicsActor AddAvatar(PhysicsVector position) - { - BasicActor act = new BasicActor(); - act.Position = position; - _actors.Add(act); - return act; - } - - public override void RemoveAvatar(PhysicsActor actor) - { - BasicActor act = (BasicActor)actor; - if(_actors.Contains(act)) - { - _actors.Remove(act); - } - - } - - public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size) - { - return null; - } - - public override void Simulate(float timeStep) - { - foreach (BasicActor actor in _actors) - { - if ((actor.Position.Y > 0 && actor.Position.Y < 256) && (actor.Position.X > 0 && actor.Position.X < 256)) - { - float height = _heightMap[(int)actor.Position.Y * 256 + (int)actor.Position.X] + 1.2f; - actor.Position.X = actor.Position.X + (actor.Velocity.X * timeStep); - actor.Position.Y = actor.Position.Y + (actor.Velocity.Y * timeStep); - if (actor.Flying) - { - if (actor.Position.Z + (actor.Velocity.Z * timeStep) < - _heightMap[(int)actor.Position.Y * 256 + (int)actor.Position.X] + 2) - { - actor.Position.Z = height; - actor.Velocity.Z = 0; - } - else - { - actor.Position.Z = actor.Position.Z + (actor.Velocity.Z * timeStep); - } - } - else - { - actor.Position.Z = height; - actor.Velocity.Z = 0; - } - } - else - { - if (actor.Position.Y < 0) - { - actor.Position.Y = 0; - } - else if (actor.Position.Y > 256) - { - actor.Position.Y = 256; - } - - if (actor.Position.X < 0) - { - actor.Position.X = 0; - } - if (actor.Position.X > 256) - { - actor.Position.X = 256; - } - } - //} - - - - // This code needs sorting out - border crossings etc -/* if(actor.Position.X<0) - { - ControllingClient.CrossSimBorder(new LLVector3(this.Position.X,this.Position.Y,this.Position.Z)); - actor.Position.X = 0; - actor.Velocity.X = 0; - } - if(actor.Position.Y < 0) - { - ControllingClient.CrossSimBorder(new LLVector3(this.Position.X,this.Position.Y,this.Position.Z)); - actor.Position.Y = 0; - actor.Velocity.Y = 0; - } - if(actor.Position.X > 255) - { - ControllingClient.CrossSimBorder(new LLVector3(this.Position.X,this.Position.Y,this.Position.Z)); - actor.Position.X = 255; - actor.Velocity.X = 0; - } - if(actor.Position.Y > 255) - { - ControllingClient.CrossSimBorder(new LLVector3(this.Position.X,this.Position.Y,this.Position.Z)); - actor.Position.Y = 255; - actor.Velocity.X = 0; - }*/ - } - } - - public override void GetResults() - { - - } - - public override bool IsThreaded - { - get - { - return(false); // for now we won't be multithreaded - } - } - - public override void SetTerrain(float[] heightMap) - { - this._heightMap = heightMap; - } - - public override void DeleteTerrain() - { - - } - } - - public class BasicActor : PhysicsActor - { - private PhysicsVector _position; - private PhysicsVector _velocity; - private PhysicsVector _acceleration; - private bool flying; - public BasicActor() - { - _velocity = new PhysicsVector(); - _position = new PhysicsVector(); - _acceleration = new PhysicsVector(); - } - - public override bool Flying - { - get - { - return flying; - } - set - { - flying= value; - } - } - - public override PhysicsVector Position - { - get - { - return _position; - } - set - { - _position = value; - } - } - - public override PhysicsVector Velocity - { - get - { - return _velocity; - } - set - { - _velocity = value; - } - } - - public override Quaternion Orientation - { - get - { - return Quaternion.Identity; - } - set - { - - } - } - - public override PhysicsVector Acceleration - { - get - { - return _acceleration; - } - - } - - public override bool Kinematic - { - get - { - return true; - } - set - { - - } - } - public void SetAcceleration (PhysicsVector accel) - { - this._acceleration = accel; - } - - public override void AddForce(PhysicsVector force) - { - - } - - public override void SetMomentum(PhysicsVector momentum) - { - - } - } - -} +/* +* Copyright (c) Contributors, http://www.openmetaverse.org/ +* See CONTRIBUTORS.TXT for a full list of copyright holders. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in the +* documentation and/or other materials provided with the distribution. +* * Neither the name of the OpenSim Project nor the +* names of its contributors may be used to endorse or promote products +* derived from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY +* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY +* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +*/ +using System.Collections.Generic; +using Axiom.Math; +using OpenSim.Physics.Manager; + +namespace OpenSim.Region.Physics.BasicPhysicsPlugin +{ + /// + /// Will be the PhysX plugin but for now will be a very basic physics engine + /// + public class BasicPhysicsPlugin : IPhysicsPlugin + { + private BasicScene _mScene; + + public BasicPhysicsPlugin() + { + + } + + public bool Init() + { + return true; + } + + public PhysicsScene GetScene() + { + return new BasicScene(); + } + + public string GetName() + { + return("basicphysics"); + } + + public void Dispose() + { + + } + } + + public class BasicScene :PhysicsScene + { + private List _actors = new List(); + private float[] _heightMap; + + public BasicScene() + { + + } + + public override PhysicsActor AddAvatar(PhysicsVector position) + { + BasicActor act = new BasicActor(); + act.Position = position; + _actors.Add(act); + return act; + } + + public override void RemoveAvatar(PhysicsActor actor) + { + BasicActor act = (BasicActor)actor; + if(_actors.Contains(act)) + { + _actors.Remove(act); + } + + } + + public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size) + { + return null; + } + + public override void Simulate(float timeStep) + { + foreach (BasicActor actor in _actors) + { + if ((actor.Position.Y > 0 && actor.Position.Y < 256) && (actor.Position.X > 0 && actor.Position.X < 256)) + { + float height = _heightMap[(int)actor.Position.Y * 256 + (int)actor.Position.X] + 1.2f; + actor.Position.X = actor.Position.X + (actor.Velocity.X * timeStep); + actor.Position.Y = actor.Position.Y + (actor.Velocity.Y * timeStep); + if (actor.Flying) + { + if (actor.Position.Z + (actor.Velocity.Z * timeStep) < + _heightMap[(int)actor.Position.Y * 256 + (int)actor.Position.X] + 2) + { + actor.Position.Z = height; + actor.Velocity.Z = 0; + } + else + { + actor.Position.Z = actor.Position.Z + (actor.Velocity.Z * timeStep); + } + } + else + { + actor.Position.Z = height; + actor.Velocity.Z = 0; + } + } + else + { + if (actor.Position.Y < 0) + { + actor.Position.Y = 0; + } + else if (actor.Position.Y > 256) + { + actor.Position.Y = 256; + } + + if (actor.Position.X < 0) + { + actor.Position.X = 0; + } + if (actor.Position.X > 256) + { + actor.Position.X = 256; + } + } + //} + + + + // This code needs sorting out - border crossings etc +/* if(actor.Position.X<0) + { + ControllingClient.CrossSimBorder(new LLVector3(this.Position.X,this.Position.Y,this.Position.Z)); + actor.Position.X = 0; + actor.Velocity.X = 0; + } + if(actor.Position.Y < 0) + { + ControllingClient.CrossSimBorder(new LLVector3(this.Position.X,this.Position.Y,this.Position.Z)); + actor.Position.Y = 0; + actor.Velocity.Y = 0; + } + if(actor.Position.X > 255) + { + ControllingClient.CrossSimBorder(new LLVector3(this.Position.X,this.Position.Y,this.Position.Z)); + actor.Position.X = 255; + actor.Velocity.X = 0; + } + if(actor.Position.Y > 255) + { + ControllingClient.CrossSimBorder(new LLVector3(this.Position.X,this.Position.Y,this.Position.Z)); + actor.Position.Y = 255; + actor.Velocity.X = 0; + }*/ + } + } + + public override void GetResults() + { + + } + + public override bool IsThreaded + { + get + { + return(false); // for now we won't be multithreaded + } + } + + public override void SetTerrain(float[] heightMap) + { + this._heightMap = heightMap; + } + + public override void DeleteTerrain() + { + + } + } + + public class BasicActor : PhysicsActor + { + private PhysicsVector _position; + private PhysicsVector _velocity; + private PhysicsVector _acceleration; + private bool flying; + public BasicActor() + { + _velocity = new PhysicsVector(); + _position = new PhysicsVector(); + _acceleration = new PhysicsVector(); + } + + public override bool Flying + { + get + { + return flying; + } + set + { + flying= value; + } + } + + public override PhysicsVector Position + { + get + { + return _position; + } + set + { + _position = value; + } + } + + public override PhysicsVector Velocity + { + get + { + return _velocity; + } + set + { + _velocity = value; + } + } + + public override Quaternion Orientation + { + get + { + return Quaternion.Identity; + } + set + { + + } + } + + public override PhysicsVector Acceleration + { + get + { + return _acceleration; + } + + } + + public override bool Kinematic + { + get + { + return true; + } + set + { + + } + } + public void SetAcceleration (PhysicsVector accel) + { + this._acceleration = accel; + } + + public override void AddForce(PhysicsVector force) + { + + } + + public override void SetMomentum(PhysicsVector momentum) + { + + } + } + +} -- cgit v1.1 From 85bdec5e0d30224f66851fe4183eb03e15828fbf Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Mon, 16 Jul 2007 20:10:54 +0000 Subject: * Massive restructuring of RegionApplicationBase, OpenSimMain and SimpleApp --- .../BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 31 ---------------------- 1 file changed, 31 deletions(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index ec406f1..81e2ea3 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -36,8 +36,6 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin /// public class BasicPhysicsPlugin : IPhysicsPlugin { - private BasicScene _mScene; - public BasicPhysicsPlugin() { @@ -145,35 +143,6 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin actor.Position.X = 256; } } - //} - - - - // This code needs sorting out - border crossings etc -/* if(actor.Position.X<0) - { - ControllingClient.CrossSimBorder(new LLVector3(this.Position.X,this.Position.Y,this.Position.Z)); - actor.Position.X = 0; - actor.Velocity.X = 0; - } - if(actor.Position.Y < 0) - { - ControllingClient.CrossSimBorder(new LLVector3(this.Position.X,this.Position.Y,this.Position.Z)); - actor.Position.Y = 0; - actor.Velocity.Y = 0; - } - if(actor.Position.X > 255) - { - ControllingClient.CrossSimBorder(new LLVector3(this.Position.X,this.Position.Y,this.Position.Z)); - actor.Position.X = 255; - actor.Velocity.X = 0; - } - if(actor.Position.Y > 255) - { - ControllingClient.CrossSimBorder(new LLVector3(this.Position.X,this.Position.Y,this.Position.Z)); - actor.Position.Y = 255; - actor.Velocity.X = 0; - }*/ } } -- cgit v1.1 From c33b29a105c2491f7c2e9f6747499ea7213ed4a5 Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Sun, 29 Jul 2007 06:23:07 +0000 Subject: * Applying issue#230 - Avatar stuck at region edge (Thanks Babblefrog!) * Fix for issue #237 - Sim startup cannot read a terrain file (Reported by CutterRubio) --- .../BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 62 ++++++++++------------ 1 file changed, 28 insertions(+), 34 deletions(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index 81e2ea3..4d0699b 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -99,49 +99,43 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin { foreach (BasicActor actor in _actors) { - if ((actor.Position.Y > 0 && actor.Position.Y < 256) && (actor.Position.X > 0 && actor.Position.X < 256)) - { - float height = _heightMap[(int)actor.Position.Y * 256 + (int)actor.Position.X] + 1.2f; - actor.Position.X = actor.Position.X + (actor.Velocity.X * timeStep); - actor.Position.Y = actor.Position.Y + (actor.Velocity.Y * timeStep); - if (actor.Flying) + float height = _heightMap[(int)actor.Position.Y * 256 + (int)actor.Position.X] + 1.2f; + actor.Position.X = actor.Position.X + (actor.Velocity.X * timeStep); + actor.Position.Y = actor.Position.Y + (actor.Velocity.Y * timeStep); + if (actor.Flying) { - if (actor.Position.Z + (actor.Velocity.Z * timeStep) < - _heightMap[(int)actor.Position.Y * 256 + (int)actor.Position.X] + 2) - { - actor.Position.Z = height; - actor.Velocity.Z = 0; - } - else - { - actor.Position.Z = actor.Position.Z + (actor.Velocity.Z * timeStep); - } - } - else + if (actor.Position.Z + (actor.Velocity.Z * timeStep) < _heightMap[(int)actor.Position.Y * 256 + (int)actor.Position.X] + 2) { actor.Position.Z = height; actor.Velocity.Z = 0; } + else + { + actor.Position.Z = actor.Position.Z + (actor.Velocity.Z * timeStep); + } } else { - if (actor.Position.Y < 0) - { - actor.Position.Y = 0; - } - else if (actor.Position.Y > 256) - { - actor.Position.Y = 256; - } + actor.Position.Z = height; + actor.Velocity.Z = 0; + } - if (actor.Position.X < 0) - { - actor.Position.X = 0; - } - if (actor.Position.X > 256) - { - actor.Position.X = 256; - } + if (actor.Position.Y < 0) + { + actor.Position.Y = 0; + } + else if (actor.Position.Y > 256) + { + actor.Position.Y = 256; + } + + if (actor.Position.X < 0) + { + actor.Position.X = 0; + } + if (actor.Position.X > 256) + { + actor.Position.X = 256; } } } -- cgit v1.1 From 5ee2e38c11785e9b68ecf1767af7a4ea5b13b7c7 Mon Sep 17 00:00:00 2001 From: MW Date: Sun, 29 Jul 2007 13:05:57 +0000 Subject: Deleting objects should now work. But beware they aren't send to your trash folder or anything so there is at the moment no way to recover deleted objects. --- .../BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 386 +++++++++++---------- 1 file changed, 194 insertions(+), 192 deletions(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index 4d0699b..b722fdf 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -31,79 +31,97 @@ using OpenSim.Physics.Manager; namespace OpenSim.Region.Physics.BasicPhysicsPlugin { - /// - /// Will be the PhysX plugin but for now will be a very basic physics engine - /// - public class BasicPhysicsPlugin : IPhysicsPlugin - { - public BasicPhysicsPlugin() - { - - } - - public bool Init() - { - return true; - } - - public PhysicsScene GetScene() - { - return new BasicScene(); - } - - public string GetName() - { - return("basicphysics"); - } - - public void Dispose() - { - - } - } - - public class BasicScene :PhysicsScene - { - private List _actors = new List(); - private float[] _heightMap; - - public BasicScene() - { - - } - - public override PhysicsActor AddAvatar(PhysicsVector position) - { - BasicActor act = new BasicActor(); - act.Position = position; - _actors.Add(act); - return act; - } + /// + /// Will be the PhysX plugin but for now will be a very basic physics engine + /// + public class BasicPhysicsPlugin : IPhysicsPlugin + { + public BasicPhysicsPlugin() + { + + } + + public bool Init() + { + return true; + } + + public PhysicsScene GetScene() + { + return new BasicScene(); + } + + public string GetName() + { + return ("basicphysics"); + } + + public void Dispose() + { + + } + } + + public class BasicScene : PhysicsScene + { + private List _actors = new List(); + private float[] _heightMap; + + public BasicScene() + { + + } + + public override PhysicsActor AddAvatar(PhysicsVector position) + { + BasicActor act = new BasicActor(); + act.Position = position; + _actors.Add(act); + return act; + } public override void RemoveAvatar(PhysicsActor actor) { BasicActor act = (BasicActor)actor; - if(_actors.Contains(act)) + if (_actors.Contains(act)) { _actors.Remove(act); } } - public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size) - { - return null; - } - - public override void Simulate(float timeStep) - { - foreach (BasicActor actor in _actors) - { - float height = _heightMap[(int)actor.Position.Y * 256 + (int)actor.Position.X] + 1.2f; + public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size) + { + return null; + } + + public override void Simulate(float timeStep) + { + foreach (BasicActor actor in _actors) + { actor.Position.X = actor.Position.X + (actor.Velocity.X * timeStep); actor.Position.Y = actor.Position.Y + (actor.Velocity.Y * timeStep); + if (actor.Position.Y < 0) + { + actor.Position.Y = 0; + } + else if (actor.Position.Y > 256) + { + actor.Position.Y = 256; + } + + if (actor.Position.X < 0) + { + actor.Position.X = 0; + } + else if (actor.Position.X > 256) + { + actor.Position.X = 256; + } + + float height = _heightMap[(int)actor.Position.Y * 256 + (int)actor.Position.X] + 1.2f; if (actor.Flying) - { + { if (actor.Position.Z + (actor.Velocity.Z * timeStep) < _heightMap[(int)actor.Position.Y * 256 + (int)actor.Position.X] + 2) { actor.Position.Z = height; @@ -120,145 +138,129 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin actor.Velocity.Z = 0; } - if (actor.Position.Y < 0) - { - actor.Position.Y = 0; - } - else if (actor.Position.Y > 256) - { - actor.Position.Y = 256; - } - if (actor.Position.X < 0) - { - actor.Position.X = 0; - } - if (actor.Position.X > 256) - { - actor.Position.X = 256; - } } - } - - public override void GetResults() - { - - } - - public override bool IsThreaded - { - get - { - return(false); // for now we won't be multithreaded - } - } - - public override void SetTerrain(float[] heightMap) - { - this._heightMap = heightMap; - } + } + + public override void GetResults() + { + + } + + public override bool IsThreaded + { + get + { + return (false); // for now we won't be multithreaded + } + } + + public override void SetTerrain(float[] heightMap) + { + this._heightMap = heightMap; + } public override void DeleteTerrain() { } - } - - public class BasicActor : PhysicsActor - { - private PhysicsVector _position; - private PhysicsVector _velocity; - private PhysicsVector _acceleration; - private bool flying; - public BasicActor() - { - _velocity = new PhysicsVector(); - _position = new PhysicsVector(); - _acceleration = new PhysicsVector(); - } - - public override bool Flying - { - get - { + } + + public class BasicActor : PhysicsActor + { + private PhysicsVector _position; + private PhysicsVector _velocity; + private PhysicsVector _acceleration; + private bool flying; + public BasicActor() + { + _velocity = new PhysicsVector(); + _position = new PhysicsVector(); + _acceleration = new PhysicsVector(); + } + + public override bool Flying + { + get + { return flying; - } - set - { - flying= value; - } - } - - public override PhysicsVector Position - { - get - { - return _position; - } - set - { - _position = value; - } - } - - public override PhysicsVector Velocity - { - get - { - return _velocity; - } - set - { - _velocity = value; - } - } - - public override Quaternion Orientation - { - get - { - return Quaternion.Identity; - } - set - { - - } - } - - public override PhysicsVector Acceleration - { - get - { - return _acceleration; - } - - } - - public override bool Kinematic - { - get - { - return true; - } - set - { - - } - } - public void SetAcceleration (PhysicsVector accel) - { - this._acceleration = accel; - } - - public override void AddForce(PhysicsVector force) - { - - } - - public override void SetMomentum(PhysicsVector momentum) - { - - } - } + } + set + { + flying = value; + } + } + + public override PhysicsVector Position + { + get + { + return _position; + } + set + { + _position = value; + } + } + + public override PhysicsVector Velocity + { + get + { + return _velocity; + } + set + { + _velocity = value; + } + } + + public override Quaternion Orientation + { + get + { + return Quaternion.Identity; + } + set + { + + } + } + + public override PhysicsVector Acceleration + { + get + { + return _acceleration; + } + + } + + public override bool Kinematic + { + get + { + return true; + } + set + { + + } + } + public void SetAcceleration(PhysicsVector accel) + { + this._acceleration = accel; + } + + public override void AddForce(PhysicsVector force) + { + + } + + public override void SetMomentum(PhysicsVector momentum) + { + + } + } } -- cgit v1.1 From 6cb3833021a15e1f62ed198de8845b7332a2152b Mon Sep 17 00:00:00 2001 From: Brian McBee Date: Fri, 3 Aug 2007 21:54:21 +0000 Subject: OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs, OpenSim/Region/Environment/Scenes/ScenePresence.cs Fix for array out-of-bounds error in basicphysics. --- .../Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index b722fdf..6732d98 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -103,20 +103,20 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin actor.Position.Y = actor.Position.Y + (actor.Velocity.Y * timeStep); if (actor.Position.Y < 0) { - actor.Position.Y = 0; + actor.Position.Y = 0.1F; } - else if (actor.Position.Y > 256) + else if (actor.Position.Y >= 256) { - actor.Position.Y = 256; + actor.Position.Y = 255.9F; } if (actor.Position.X < 0) { - actor.Position.X = 0; + actor.Position.X = 0.1F; } else if (actor.Position.X > 256) { - actor.Position.X = 256; + actor.Position.X = 255.9F; } float height = _heightMap[(int)actor.Position.Y * 256 + (int)actor.Position.X] + 1.2f; -- cgit v1.1 From 318376707de4f5406958239eac069f24ef8ef62a Mon Sep 17 00:00:00 2001 From: Brian McBee Date: Sat, 18 Aug 2007 23:05:02 +0000 Subject: starting to add bits and pieces to physics prims that we will eventually need for collisions. not hooked in yet. --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index 6732d98..a990318 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -90,7 +90,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin } - public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size) + public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size, Quaternion rotation) { return null; } -- cgit v1.1 From 75f6c3d36455fa542e67c16a96c1fda61e9956d5 Mon Sep 17 00:00:00 2001 From: Brian McBee Date: Sun, 19 Aug 2007 06:14:36 +0000 Subject: More prep work for adding prims to ODE physics --- .../Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index a990318..92b6929 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -203,6 +203,17 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin } } + public override PhysicsVector Size + { + get + { + return new PhysicsVector(0, 0, 0); + } + set + { + } + } + public override PhysicsVector Velocity { get -- cgit v1.1 From 0d5311e49bf5700efcf779bfa4bc83a00585c424 Mon Sep 17 00:00:00 2001 From: MW Date: Thu, 23 Aug 2007 17:21:08 +0000 Subject: Added RemovePrim method to the physics plugins interface. Implemented that method in ODE plugin. Hooked it up so when deleting/taking prims into your inventory they will be removed from physics engine. Enabled the other physics hook ups in Scene.cs (and also added registering prims with physics plugin when they are rezzed from Inventory.) So now to get the avatar to prim collision testing working, just change to use the ODE plugin (in the OpenSim.ini file, physics = OpenDynamicsEngine). Remember though ODE only really works (without problems) when running with a single region. --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index 92b6929..c1ad555 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -80,6 +80,11 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin return act; } + public override void RemovePrim(PhysicsActor prim) + { + + } + public override void RemoveAvatar(PhysicsActor actor) { BasicActor act = (BasicActor)actor; -- cgit v1.1 From 7915adc6c569536742acf783bcc2f4aba673950e Mon Sep 17 00:00:00 2001 From: MW Date: Tue, 28 Aug 2007 18:40:40 +0000 Subject: Corrected the namespace in OpenSim.Region.Physics.Manager, so now namespace should equal project and directory. --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index c1ad555..e0c738d 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -27,7 +27,7 @@ */ using System.Collections.Generic; using Axiom.Math; -using OpenSim.Physics.Manager; +using OpenSim.Region.Physics.Manager; namespace OpenSim.Region.Physics.BasicPhysicsPlugin { -- cgit v1.1 From ffe9c9374a9b220b2046940a4dec7eb47e5c958b Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Mon, 10 Sep 2007 08:14:38 +0000 Subject: mass update of urls in source code to new website --- OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs | 2 +- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs index ecf8e68..2d4d898 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs @@ -1,5 +1,5 @@ /* -* Copyright (c) Contributors, http://www.openmetaverse.org/ +* Copyright (c) Contributors, http://opensimulator.org/ * See CONTRIBUTORS.TXT for a full list of copyright holders. * * Redistribution and use in source and binary forms, with or without diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index e0c738d..2668acc 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -1,5 +1,5 @@ /* -* Copyright (c) Contributors, http://www.openmetaverse.org/ +* Copyright (c) Contributors, http://opensimulator.org/ * See CONTRIBUTORS.TXT for a full list of copyright holders. * * Redistribution and use in source and binary forms, with or without -- cgit v1.1 From 26eebf6b3274f5cf2ec7b76bc300edcdfdba1423 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Wed, 12 Sep 2007 10:56:04 +0000 Subject: I think 1.0f makes a better offset than 1.2f for basic physics (less floating, not too much crouching). I think that we'll have to rethink what the terrain resolution is down the road, as we don't really have enough sample data to actually get people placed right on the land. --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index 2668acc..31861b4 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -124,7 +124,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin actor.Position.X = 255.9F; } - float height = _heightMap[(int)actor.Position.Y * 256 + (int)actor.Position.X] + 1.2f; + float height = _heightMap[(int)actor.Position.Y * 256 + (int)actor.Position.X] + 1.0f; if (actor.Flying) { if (actor.Position.Z + (actor.Velocity.Z * timeStep) < _heightMap[(int)actor.Position.Y * 256 + (int)actor.Position.X] + 2) -- cgit v1.1 From a0265300aa09be0bdd2d4629d6a22394d5b219be Mon Sep 17 00:00:00 2001 From: dan miller Date: Sat, 29 Sep 2007 03:56:36 +0000 Subject: Hollow prims (box only), thanks Gerard! Enjoy --- .../Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index 31861b4..85d9ff6 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -27,6 +27,7 @@ */ using System.Collections.Generic; using Axiom.Math; +using OpenSim.Framework.Types; using OpenSim.Region.Physics.Manager; namespace OpenSim.Region.Physics.BasicPhysicsPlugin @@ -72,7 +73,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin } - public override PhysicsActor AddAvatar(PhysicsVector position) + public override PhysicsActor AddAvatar(string avName, PhysicsVector position) { BasicActor act = new BasicActor(); act.Position = position; @@ -95,10 +96,17 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin } +/* public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size, Quaternion rotation) { return null; } +*/ + public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position, PhysicsVector size, Quaternion rotation) + { + return null; + } + public override void Simulate(float timeStep) { -- cgit v1.1 From 3d8219f6c7faa256d6a13ab7925f75d83af95b78 Mon Sep 17 00:00:00 2001 From: MW Date: Mon, 29 Oct 2007 21:46:25 +0000 Subject: as per the "Filesystem cleanup for OpenSim repository" mailing list thread. Have flattened the OpenSim.Framework project/namespace. The problem is that the namespace is still wrong as its "OpenSim.Framework" while the directory is "OpenSim\Framework\General" , so we need to decide if we change the directory or correct the namespace. Note this has lead to a big flat project, but I think a lot of the files we most likely don't even use any longer. And others belong in other projects/namespaces anyway. --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index 85d9ff6..95e6095 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -27,7 +27,7 @@ */ using System.Collections.Generic; using Axiom.Math; -using OpenSim.Framework.Types; +using OpenSim.Framework; using OpenSim.Region.Physics.Manager; namespace OpenSim.Region.Physics.BasicPhysicsPlugin -- cgit v1.1 From 67e12b95ea7b68f4904a7484d77ecfd787d16d0c Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Tue, 30 Oct 2007 09:05:31 +0000 Subject: * Optimized usings * Shortened type references * Removed redundant 'this' qualifier --- .../Physics/BasicPhysicsPlugin/AssemblyInfo.cs | 22 +++-- .../BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 106 ++++++--------------- 2 files changed, 41 insertions(+), 87 deletions(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs index 2d4d898..a8f1de1 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs @@ -27,24 +27,26 @@ */ using System.Reflection; using System.Runtime.InteropServices; + // Information about this assembly is defined by the following // attributes. // // change them to the information which is associated with the assembly // you compile. -[assembly: AssemblyTitle("PhysXplugin")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("PhysXplugin")] -[assembly: AssemblyCopyright("")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] +[assembly : AssemblyTitle("PhysXplugin")] +[assembly : AssemblyDescription("")] +[assembly : AssemblyConfiguration("")] +[assembly : AssemblyCompany("")] +[assembly : AssemblyProduct("PhysXplugin")] +[assembly : AssemblyCopyright("")] +[assembly : AssemblyTrademark("")] +[assembly : AssemblyCulture("")] // This sets the default COM visibility of types in the assembly to invisible. // If you need to expose a type to COM, use [ComVisible(true)] on that type. -[assembly: ComVisible(false)] + +[assembly : ComVisible(false)] // The assembly version has following format : // @@ -53,4 +55,4 @@ using System.Runtime.InteropServices; // You can specify all values by your own or you can build default build and revision // numbers with the '*' character (the default): -[assembly: AssemblyVersion("1.0.*")] +[assembly : AssemblyVersion("1.0.*")] \ No newline at end of file diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index 95e6095..b412818 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -39,7 +39,6 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin { public BasicPhysicsPlugin() { - } public bool Init() @@ -59,7 +58,6 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin public void Dispose() { - } } @@ -70,7 +68,6 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin public BasicScene() { - } public override PhysicsActor AddAvatar(string avName, PhysicsVector position) @@ -83,17 +80,15 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin public override void RemovePrim(PhysicsActor prim) { - } public override void RemoveAvatar(PhysicsActor actor) { - BasicActor act = (BasicActor)actor; + BasicActor act = (BasicActor) actor; if (_actors.Contains(act)) { _actors.Remove(act); } - } /* @@ -102,7 +97,9 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin return null; } */ - public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position, PhysicsVector size, Quaternion rotation) + + public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position, + PhysicsVector size, Quaternion rotation) { return null; } @@ -112,8 +109,8 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin { foreach (BasicActor actor in _actors) { - actor.Position.X = actor.Position.X + (actor.Velocity.X * timeStep); - actor.Position.Y = actor.Position.Y + (actor.Velocity.Y * timeStep); + actor.Position.X = actor.Position.X + (actor.Velocity.X*timeStep); + actor.Position.Y = actor.Position.Y + (actor.Velocity.Y*timeStep); if (actor.Position.Y < 0) { actor.Position.Y = 0.1F; @@ -132,17 +129,18 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin actor.Position.X = 255.9F; } - float height = _heightMap[(int)actor.Position.Y * 256 + (int)actor.Position.X] + 1.0f; + float height = _heightMap[(int) actor.Position.Y*256 + (int) actor.Position.X] + 1.0f; if (actor.Flying) { - if (actor.Position.Z + (actor.Velocity.Z * timeStep) < _heightMap[(int)actor.Position.Y * 256 + (int)actor.Position.X] + 2) + if (actor.Position.Z + (actor.Velocity.Z*timeStep) < + _heightMap[(int) actor.Position.Y*256 + (int) actor.Position.X] + 2) { actor.Position.Z = height; actor.Velocity.Z = 0; } else { - actor.Position.Z = actor.Position.Z + (actor.Velocity.Z * timeStep); + actor.Position.Z = actor.Position.Z + (actor.Velocity.Z*timeStep); } } else @@ -150,32 +148,26 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin actor.Position.Z = height; actor.Velocity.Z = 0; } - - } } public override void GetResults() { - } public override bool IsThreaded { - get - { - return (false); // for now we won't be multithreaded + get { return (false); // for now we won't be multithreaded } } public override void SetTerrain(float[] heightMap) { - this._heightMap = heightMap; + _heightMap = heightMap; } public override void DeleteTerrain() { - } } @@ -185,6 +177,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin private PhysicsVector _velocity; private PhysicsVector _acceleration; private bool flying; + public BasicActor() { _velocity = new PhysicsVector(); @@ -194,97 +187,56 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin public override bool Flying { - get - { - return flying; - } - set - { - flying = value; - } + get { return flying; } + set { flying = value; } } public override PhysicsVector Position { - get - { - return _position; - } - set - { - _position = value; - } + get { return _position; } + set { _position = value; } } public override PhysicsVector Size { - get - { - return new PhysicsVector(0, 0, 0); - } - set - { - } + get { return new PhysicsVector(0, 0, 0); } + set { } } public override PhysicsVector Velocity { - get - { - return _velocity; - } - set - { - _velocity = value; - } + get { return _velocity; } + set { _velocity = value; } } public override Quaternion Orientation { - get - { - return Quaternion.Identity; - } - set - { - - } + get { return Quaternion.Identity; } + set { } } public override PhysicsVector Acceleration { - get - { - return _acceleration; - } - + get { return _acceleration; } } public override bool Kinematic { - get - { - return true; - } - set - { - - } + get { return true; } + set { } } + public void SetAcceleration(PhysicsVector accel) { - this._acceleration = accel; + _acceleration = accel; } public override void AddForce(PhysicsVector force) { - } public override void SetMomentum(PhysicsVector momentum) { - } } - -} +} \ No newline at end of file -- cgit v1.1 From 33d6222e8dc40331e98c3549a040d3d206eed338 Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Wed, 31 Oct 2007 04:18:34 +0000 Subject: Thank you Teravus, very much, for a 'jump', 'crouch' and 'inertia' patch for all three physics plugins. --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index b412818..c516044 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -177,6 +177,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin private PhysicsVector _velocity; private PhysicsVector _acceleration; private bool flying; + private bool iscolliding; public BasicActor() { @@ -191,6 +192,12 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin set { flying = value; } } + public override bool IsColliding + { + get { return iscolliding; } + set { iscolliding = value; } + } + public override PhysicsVector Position { get { return _position; } @@ -239,4 +246,4 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin { } } -} \ No newline at end of file +} -- cgit v1.1 From 4fad66f855544b9298ae2216c58c0f44009358a5 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Thu, 1 Nov 2007 19:19:05 +0000 Subject: * Diuerse beavtificatems --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index c516044..f26b9a1 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -246,4 +246,4 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin { } } -} +} \ No newline at end of file -- cgit v1.1 From f8e0cf0f1de3cabded7bce2e438cc37ce4bb989c Mon Sep 17 00:00:00 2001 From: darok Date: Sat, 3 Nov 2007 10:25:43 +0000 Subject: Changes in BulletXPlugin: Added new class BulletXActor class inherits from PhysicsActor and it's the ancestor for BulletXCharacter and BulletXPrim.Physical modifications: Changes for pass the value of Physical flag in the SceneObjectPart class to the Physics engines. New call for AddPrimShape so it has a new parameter called "isPhysical". The old call will be obselete soon (i believe). PhysActor and its descendants have a new property called IsPhysical. By the way no new special funcionallity added. It's more like preparing the way for new modifications. --- .../Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index f26b9a1..7c2bbf4 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -101,9 +101,14 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position, PhysicsVector size, Quaternion rotation) { - return null; + return this.AddPrimShape(primName, pbs, position, size, rotation, false); } + public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position, + PhysicsVector size, Quaternion rotation, bool isPhysical) + { + return null; + } public override void Simulate(float timeStep) { @@ -186,6 +191,12 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin _acceleration = new PhysicsVector(); } + public override bool IsPhysical + { + get { return false; } + set { return; } + } + public override bool Flying { get { return flying; } -- cgit v1.1 From fdb57b28b164f239de0f976b967b79dc2ca5f6ae Mon Sep 17 00:00:00 2001 From: dan miller Date: Mon, 5 Nov 2007 12:25:53 +0000 Subject: prim cuts in ODE Much thanks to Gerhard! Merged with Darok's recent changes re: physical prims --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index 7c2bbf4..46037df 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -221,6 +221,14 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin set { } } + public override PrimitiveBaseShape Shape + { + set + { + return; + } + } + public override PhysicsVector Velocity { get { return _velocity; } -- cgit v1.1 From 9e9dad1cde362de093d0d7e6c3e247ff00ceac96 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Thu, 8 Nov 2007 00:10:40 +0000 Subject: * Added Rotational Velocity reporting for Client Interpolation to Terse Updates * Added Angular Velocity reporting for smooth-ish rotations on object collisions --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index 46037df..d5cb99f 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -181,6 +181,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin private PhysicsVector _position; private PhysicsVector _velocity; private PhysicsVector _acceleration; + private PhysicsVector m_rotationalVelocity = PhysicsVector.Zero; private bool flying; private bool iscolliding; @@ -190,7 +191,11 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin _position = new PhysicsVector(); _acceleration = new PhysicsVector(); } - + public override PhysicsVector RotationalVelocity + { + get { return m_rotationalVelocity; } + set { m_rotationalVelocity = value; } + } public override bool IsPhysical { get { return false; } -- cgit v1.1 From e9e72fe9079ab011dc43199496fb9a9dc7ea5b3a Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Fri, 9 Nov 2007 21:01:55 +0000 Subject: * Added an internal throttle on ODE physics updates * Added a ThrottleUpdates member to PhysicsActor to expose 'throttle' ability to the Scene. * Updated the ode.dll file with a fix to invalid data passed to ODE's heightfield collision calculator. --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index d5cb99f..6377392 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -201,7 +201,11 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin get { return false; } set { return; } } - + public override bool ThrottleUpdates + { + get { return false; } + set { return; } + } public override bool Flying { get { return flying; } -- cgit v1.1 From cb07ba0d68eeb57bae1cb60f387483ff720cc29d Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sat, 10 Nov 2007 19:13:52 +0000 Subject: * Moves the Meshmerizer to a separate plugin * Experimental. Linux Prebuild needs testing. * One more update after this to remove the ODEMeshing directory.... --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index 6377392..1d1c14f 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -70,6 +70,11 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin { } + public override void Initialise(IMesher meshmerizer) + { + // Does nothing right now + } + public override PhysicsActor AddAvatar(string avName, PhysicsVector position) { BasicActor act = new BasicActor(); @@ -274,4 +279,4 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin { } } -} \ No newline at end of file +} -- cgit v1.1 From 5952441fcc886902f7b2f72eb839ae49d2c85012 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Mon, 12 Nov 2007 21:45:49 +0000 Subject: * Added a lot of Glue to help with reporting proper collisions. * ODE - Fixed the iscolliding property to report a static true when colliding. * Added reporting of collisions to call UpdateMovementAnimations * Added Jump - air animation (with arms outstretched). * Added Fall Animations * ODE - Added a small amount of X, Y motion control while jumping or Falling * ODE - Avatar movement animations are still a bit odd sometimes, and had to get this up there. --- .../Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index 1d1c14f..3283ec0 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -196,6 +196,11 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin _position = new PhysicsVector(); _acceleration = new PhysicsVector(); } + public override int PhysicsActorType + { + get { return (int)ActorTypes.Agent; } + set { return; } + } public override PhysicsVector RotationalVelocity { get { return m_rotationalVelocity; } @@ -222,7 +227,16 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin get { return iscolliding; } set { iscolliding = value; } } - + public override bool CollidingGround + { + get { return false; } + set { return; } + } + public override bool CollidingObj + { + get { return false; } + set { return; } + } public override PhysicsVector Position { get { return _position; } -- cgit v1.1 From d9d35f9fd7141d8f7a5b3b056cae051d6de2efd5 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Mon, 12 Nov 2007 23:46:26 +0000 Subject: * Implemented Walk Vs Run in ODE. Also helps make the walk look smoother. * All thanks to unimplemented packet listing :D --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index 3283ec0..2582097 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -206,6 +206,11 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin get { return m_rotationalVelocity; } set { m_rotationalVelocity = value; } } + public override bool SetAlwaysRun + { + get { return false; } + set { return; } + } public override bool IsPhysical { get { return false; } -- cgit v1.1 From 76a67f45c6aeeba9a1a1e262737e474be50767c7 Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Fri, 16 Nov 2007 10:35:52 +0000 Subject: fixed some AssemblyInfo files --- OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs index a8f1de1..07a2cd6 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs @@ -34,11 +34,11 @@ using System.Runtime.InteropServices; // change them to the information which is associated with the assembly // you compile. -[assembly : AssemblyTitle("PhysXplugin")] +[assembly : AssemblyTitle("BasicPhysicsPlugin")] [assembly : AssemblyDescription("")] [assembly : AssemblyConfiguration("")] [assembly : AssemblyCompany("")] -[assembly : AssemblyProduct("PhysXplugin")] +[assembly : AssemblyProduct("BasicPhysicsPlugin")] [assembly : AssemblyCopyright("")] [assembly : AssemblyTrademark("")] [assembly : AssemblyCulture("")] -- cgit v1.1 From 5a71d03b7ac1de0b599f651c62bf1e33a3d1745d Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Tue, 20 Nov 2007 04:38:08 +0000 Subject: *Huge* structural changes in ODE/OdePrim to get all of the calls in threadlocked code. ODEPrim was almost completely re-written. Copy/Space test needed. --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index 2582097..a7f7877 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -114,7 +114,10 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin { return null; } + public override void AddPhysicsActorTaint(PhysicsActor prim) + { + } public override void Simulate(float timeStep) { foreach (BasicActor actor in _actors) -- cgit v1.1 From 83ed435d01724b28771c4acaadf1f74e8114b12a Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Tue, 20 Nov 2007 05:09:30 +0000 Subject: fixed potential reference invalidation and array out of bounds exception in basicphysics --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index a7f7877..eb9590a 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -120,8 +120,10 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin } public override void Simulate(float timeStep) { - foreach (BasicActor actor in _actors) + for (int i = 0; i < _actors.Count; ++i) { + BasicActor actor = _actors[i]; + actor.Position.X = actor.Position.X + (actor.Velocity.X*timeStep); actor.Position.Y = actor.Position.Y + (actor.Velocity.Y*timeStep); if (actor.Position.Y < 0) @@ -137,7 +139,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin { actor.Position.X = 0.1F; } - else if (actor.Position.X > 256) + else if (actor.Position.X >= 256) { actor.Position.X = 255.9F; } -- cgit v1.1 From af6eb67999875f12270ef19ed33c179556696754 Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Mon, 10 Dec 2007 05:25:16 +0000 Subject: saved OpenSim source code from the giant rampaging unterminated copyright notice of doom --- OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs | 4 ++-- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs index 07a2cd6..919910c 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs @@ -13,7 +13,7 @@ * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * -* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY +* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY @@ -55,4 +55,4 @@ using System.Runtime.InteropServices; // You can specify all values by your own or you can build default build and revision // numbers with the '*' character (the default): -[assembly : AssemblyVersion("1.0.*")] \ No newline at end of file +[assembly : AssemblyVersion("1.0.*")] diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index eb9590a..6b647b1 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -13,7 +13,7 @@ * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * -* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY +* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY -- cgit v1.1 From 081f4403ea2a2f8352d480910052bf5032e2e4a5 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Wed, 12 Dec 2007 06:58:55 +0000 Subject: * Added some simstats to fill the simulator pane of the Statistics monitor. * I stress, this is an initial implementation and the Agents(Child and Root) are definately obviously incorrect. --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index 6b647b1..df3ebb9 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -118,8 +118,9 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin { } - public override void Simulate(float timeStep) + public override float Simulate(float timeStep) { + float fps = 0; for (int i = 0; i < _actors.Count; ++i) { BasicActor actor = _actors[i]; @@ -164,6 +165,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin actor.Velocity.Z = 0; } } + return fps; } public override void GetResults() -- cgit v1.1 From 6702b0373371fd2a546a580ad82f5cc175fa29e0 Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Wed, 19 Dec 2007 08:44:25 +0000 Subject: Misc. cleanup: * added Util.Clip(value, min, max) * modified asset cache's numPackets calculation to use max packet size (600) instead of 1000 * removed a few magic numbers --- .../Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index df3ebb9..545f461 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -125,8 +125,9 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin { BasicActor actor = _actors[i]; - actor.Position.X = actor.Position.X + (actor.Velocity.X*timeStep); - actor.Position.Y = actor.Position.Y + (actor.Velocity.Y*timeStep); + actor.Position.X += actor.Velocity.X * timeStep; + actor.Position.Y += actor.Velocity.Y * timeStep; + if (actor.Position.Y < 0) { actor.Position.Y = 0.1F; @@ -145,18 +146,18 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin actor.Position.X = 255.9F; } - float height = _heightMap[(int) actor.Position.Y*256 + (int) actor.Position.X] + 1.0f; + float height = _heightMap[(int) actor.Position.Y * 256 + (int) actor.Position.X] + 1.0f; if (actor.Flying) { - if (actor.Position.Z + (actor.Velocity.Z*timeStep) < - _heightMap[(int) actor.Position.Y*256 + (int) actor.Position.X] + 2) + if (actor.Position.Z + (actor.Velocity.Z * timeStep) < + _heightMap[(int) actor.Position.Y * 256 + (int) actor.Position.X] + 2) { actor.Position.Z = height; actor.Velocity.Z = 0; } else { - actor.Position.Z = actor.Position.Z + (actor.Velocity.Z*timeStep); + actor.Position.Z += actor.Velocity.Z * timeStep; } } else -- cgit v1.1 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. --- .../Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index 545f461..5ac651f 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -258,7 +258,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin public override PhysicsVector Size { - get { return new PhysicsVector(0, 0, 0); } + get { return PhysicsVector.Zero; } set { } } @@ -269,7 +269,22 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin 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 PhysicsVector Velocity { get { return _velocity; } -- cgit v1.1 From efd90b56b761219af6425b1c7a2cdd3b6ffb4de2 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Thu, 27 Dec 2007 21:41:48 +0000 Subject: * Optimized usings * shortened references * Removed redundant 'this' * Normalized EOF --- .../Physics/BasicPhysicsPlugin/AssemblyInfo.cs | 2 +- .../BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 42 ++++++++++++++-------- 2 files changed, 28 insertions(+), 16 deletions(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs index 919910c..b76fbbf 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs @@ -55,4 +55,4 @@ using System.Runtime.InteropServices; // You can specify all values by your own or you can build default build and revision // numbers with the '*' character (the default): -[assembly : AssemblyVersion("1.0.*")] +[assembly : AssemblyVersion("1.0.*")] \ No newline at end of file diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index 5ac651f..636cf1a 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -106,18 +106,19 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position, PhysicsVector size, Quaternion rotation) { - return this.AddPrimShape(primName, pbs, position, size, rotation, false); + return AddPrimShape(primName, pbs, position, size, rotation, false); } - public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position, + public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position, PhysicsVector size, Quaternion rotation, bool isPhysical) { return null; } + public override void AddPhysicsActorTaint(PhysicsActor prim) { - } + public override float Simulate(float timeStep) { float fps = 0; @@ -125,8 +126,8 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin { BasicActor actor = _actors[i]; - actor.Position.X += actor.Velocity.X * timeStep; - actor.Position.Y += actor.Velocity.Y * timeStep; + actor.Position.X += actor.Velocity.X*timeStep; + actor.Position.Y += actor.Velocity.Y*timeStep; if (actor.Position.Y < 0) { @@ -146,18 +147,18 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin actor.Position.X = 255.9F; } - float height = _heightMap[(int) actor.Position.Y * 256 + (int) actor.Position.X] + 1.0f; + float height = _heightMap[(int) actor.Position.Y*256 + (int) actor.Position.X] + 1.0f; if (actor.Flying) { - if (actor.Position.Z + (actor.Velocity.Z * timeStep) < - _heightMap[(int) actor.Position.Y * 256 + (int) actor.Position.X] + 2) + if (actor.Position.Z + (actor.Velocity.Z*timeStep) < + _heightMap[(int) actor.Position.Y*256 + (int) actor.Position.X] + 2) { actor.Position.Z = height; actor.Velocity.Z = 0; } else { - actor.Position.Z += actor.Velocity.Z * timeStep; + actor.Position.Z += actor.Velocity.Z*timeStep; } } else @@ -204,31 +205,37 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin _position = new PhysicsVector(); _acceleration = new PhysicsVector(); } + public override int PhysicsActorType { - get { return (int)ActorTypes.Agent; } + get { return (int) ActorTypes.Agent; } set { return; } } + public override PhysicsVector RotationalVelocity { get { return m_rotationalVelocity; } set { m_rotationalVelocity = value; } } + public override bool SetAlwaysRun { get { return false; } set { return; } } + public override bool IsPhysical { get { return false; } set { return; } } + public override bool ThrottleUpdates { get { return false; } set { return; } } + public override bool Flying { get { return flying; } @@ -240,16 +247,19 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin get { return iscolliding; } set { iscolliding = value; } } + public override bool CollidingGround { get { return false; } set { return; } } + public override bool CollidingObj { get { return false; } set { return; } } + public override PhysicsVector Position { get { return _position; } @@ -264,27 +274,29 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin public override PrimitiveBaseShape Shape { - set - { - return; - } + 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 PhysicsVector Velocity { get { return _velocity; } @@ -321,4 +333,4 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin { } } -} +} \ No newline at end of file -- cgit v1.1 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. --- .../Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') 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; } -- cgit v1.1 From 6ed5283bc06a62f38eb517e67b975832b603bf61 Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Tue, 5 Feb 2008 19:44:27 +0000 Subject: Converted logging to use log4net. Changed LogBase to ConsoleBase, which handles console I/O. This is mostly an in-place conversion, so lots of refactoring can still be done. --- OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs index b76fbbf..919910c 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs @@ -55,4 +55,4 @@ using System.Runtime.InteropServices; // You can specify all values by your own or you can build default build and revision // numbers with the '*' character (the default): -[assembly : AssemblyVersion("1.0.*")] \ No newline at end of file +[assembly : AssemblyVersion("1.0.*")] -- cgit v1.1 From f603e57e9ae9d9b7e3bf6b35924d99292cf6de43 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Mon, 11 Feb 2008 22:54:51 +0000 Subject: * Added PhysicsScene.Dispose() * In ODE, disposing of all of the ODE objects and the ODE World to reclaim memory when the simulator restarts. --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index ff157d7..13b3f1a 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -69,12 +69,16 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin public BasicScene() { } - + public override void Initialise(IMesher meshmerizer) { // Does nothing right now } + public override void Dispose() + { + + } public override PhysicsActor AddAvatar(string avName, PhysicsVector position) { BasicActor act = new BasicActor(); -- cgit v1.1 From d773ca514726d67d7f8092440484f27440459745 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Wed, 13 Feb 2008 07:50:15 +0000 Subject: * Made physical prim stable enough for the general population to turn on. (though I still don't recommend it for welcome regions unless object build is off. * Updated the ode.dll for windows with a more reasonable stack space reserve. Linux users will need to type ulimit -s 262144 before starting up OpenSimulator if using Physical Prim to protect against stack collisions. or run the included ./bin/opensim-ode.sh to start up OpenSimulator in ODE mode. * Added internal collision score and am keeping track of 'high usage' prim. * Tweaked collisions some more * Tested up to 460 physical prim in extremely close quarters (which was previously impossible in OpenSim). After 460 in tight quarters, physics slows down enough to make it hard to do any moving, however.. non physics things still work, such as logging on to the simulator, etc. --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index 13b3f1a..b7ed417 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -317,6 +317,11 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin set { _velocity = value; } } + public override float CollisionScore + { + get { return 0f; } + } + public override Quaternion Orientation { get { return Quaternion.Identity; } -- cgit v1.1 From 3588d89b2cba36415991c46c300b1f9c94f109bf Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Wed, 13 Feb 2008 23:14:41 +0000 Subject: * Bigish ODE stability Update. Run Prebuild --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index b7ed417..a32bca5 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -351,5 +351,9 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin public override void SetMomentum(PhysicsVector momentum) { } + public override void CrossingFailure() + { + + } } } \ No newline at end of file -- cgit v1.1 From f3afa68a2af6ad5999e6efe3e4725cb17293108d Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Thu, 14 Feb 2008 12:16:33 +0000 Subject: * Made new Framework.Constants class, added RegionSize member. * Converted all instances of "256" spotted to use RegionSize instead. Some approximations used for border crossings (ie 255.9f) are still using that value, but should be updated to use something based on RegionSize. * Moving Terrain to a RegionModule, implemented ITerrainChannel and TerrainModule - nonfunctional, but will be soon. --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index a32bca5..d767eab 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -137,7 +137,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin { actor.Position.Y = 0.1F; } - else if (actor.Position.Y >= 256) + else if (actor.Position.Y >= Constants.RegionSize) { actor.Position.Y = 255.9F; } @@ -146,16 +146,16 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin { actor.Position.X = 0.1F; } - else if (actor.Position.X >= 256) + else if (actor.Position.X >= Constants.RegionSize) { actor.Position.X = 255.9F; } - float height = _heightMap[(int) actor.Position.Y*256 + (int) actor.Position.X] + 1.0f; + float height = _heightMap[(int)actor.Position.Y * Constants.RegionSize + (int)actor.Position.X] + 1.0f; if (actor.Flying) { if (actor.Position.Z + (actor.Velocity.Z*timeStep) < - _heightMap[(int) actor.Position.Y*256 + (int) actor.Position.X] + 2) + _heightMap[(int)actor.Position.Y * Constants.RegionSize + (int)actor.Position.X] + 2) { actor.Position.Z = height; actor.Velocity.Z = 0; -- cgit v1.1 From 19e0ada93af347cff93a3950f66abe245399f8b2 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sun, 17 Feb 2008 10:41:08 +0000 Subject: * Located and destroyed the weird velocity and rotation transfers. It turned out to be that the Static PhysicsVector.Zero was transferring velocities between all non fixed objects. Not so static after all :(. Finding it was cruel and unusual punishment from the CLR. * Therefore, when you run through a pile of prim you won't see things rotate when they're not supposed to anymore. * Avatars don't float off either. --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index d767eab..3fb30fb 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -274,6 +274,12 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin set { return; } } + public override bool Stopped + { + get { return false; } + } + + public override PhysicsVector Position { get { return _position; } -- cgit v1.1 From 8edaada1d3a8766f0759ddd42bdbf96c864ef30c Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Mon, 18 Feb 2008 01:52:25 +0000 Subject: ODE: Tired of floating above the ground after crossing a border? Boy have I got a solution for you! For a limited time, you can be the right height after border crossings automatically. Just three easy payments of $9.95 and make sure your neighbor is sending child agent updates! --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index 3fb30fb..4e96ce0 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -79,7 +79,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin { } - public override PhysicsActor AddAvatar(string avName, PhysicsVector position) + public override PhysicsActor AddAvatar(string avName, PhysicsVector position, PhysicsVector size) { BasicActor act = new BasicActor(); act.Position = position; -- cgit v1.1 From 27508c1ad87786935dbf28aa217bcbe55a9aa645 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sat, 23 Feb 2008 11:42:55 +0000 Subject: * Added Support within the ODEPlugin for Selected. Which means that; * When you select a physical prim, it stops while you've got it selected. * When you move or alter a prim in some manner, it doesn't become collidable until you de-select it * When you select a prim, it doesn't become temporarily 'phantom' until you make some change to it while it's selected. (this prevents accidental selections in prim floor from causing it to go phantom on you(but don't move it or you'll fall)) * There's one major difference, and that's a physical object won't stop if you don't have permission to edit it. This prevents people who don't have edit permissions on a prim from stopping it while it's moving. --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index 4e96ce0..e3b9ef3 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -228,6 +228,11 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin set { return; } } + public override uint LocalID + { + set { return; } + } + public override bool Grabbed { set { return; } -- cgit v1.1 From 0a5c48b1c820d0899ffb130c9bf0a59b04bc9099 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sun, 2 Mar 2008 09:31:39 +0000 Subject: * This is a very icky implementation of physical linkset prim using fixed joints. This will change quite drastically, however it's fun to play with. * To play with this you must link your prim before setting it physical, otherwise they won't link in the physics engine properly. This will also be fixed. * Currently the linked prim are extremely unstable because I have yet to implement combining of forces with the same normal. This will also be fixed. In fact, the whole PhysicsActor, ODEPrim relationship will be reworked to consider groups from the get-go. * This implementation is better then it crashing your sim, so I'm commiting it for now. --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index e3b9ef3..c7ccef3 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -349,7 +349,15 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin get { return true; } set { } } + public override void link(PhysicsActor obj) + { + + } + public override void delink() + { + + } public void SetAcceleration(PhysicsVector accel) { _acceleration = accel; -- cgit v1.1 From 8bea3dbdb91dfb465338572e3dfb40a5adfb9bab Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Mon, 10 Mar 2008 05:23:43 +0000 Subject: * Added ODEPlugin Support for llSetBuoyancy. Set Buoyancy to 1 for space prim. * Added WaterLevel support to the ODEPlugin. More on this later. --- .../Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index c7ccef3..2b4bbc4 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -189,6 +189,11 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin _heightMap = heightMap; } + public override void SetWaterLevel(float baseheight) + { + + } + public override void DeleteTerrain() { } @@ -243,6 +248,12 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin set { return; } } + public override float Buoyancy + { + get { return 0f; } + set { return; } + } + public override bool IsPhysical { get { return false; } -- cgit v1.1 From d0123a796b0066a50914c6fae5d86550dcf58636 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Mon, 10 Mar 2008 05:56:58 +0000 Subject: ODEPlugin * Added osSetPrimFloatOnWater(BOOL) to make Physical prim float at the water level. * osSetPrimFloatOnWater(TRUE); or osSetPrimFloatOnWater(FALSE); * By default, prim do not float at the water level. * More work is needed on the floating, but it's a start. --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index 2b4bbc4..429894d 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -254,6 +254,11 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin set { return; } } + public override bool FloatOnWater + { + set { return; } + } + public override bool IsPhysical { get { return false; } -- cgit v1.1 From 47180080f0f4b93c60232b47ca4e093bd7c73a1d Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Tue, 18 Mar 2008 05:16:43 +0000 Subject: Formatting cleanup. --- .../Physics/BasicPhysicsPlugin/AssemblyInfo.cs | 52 +++++++++---------- .../BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 60 +++++++++++----------- 2 files changed, 56 insertions(+), 56 deletions(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs index 919910c..8f221f1 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs @@ -1,30 +1,30 @@ /* -* Copyright (c) Contributors, http://opensimulator.org/ -* See CONTRIBUTORS.TXT for a full list of copyright holders. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in the -* documentation and/or other materials provided with the distribution. -* * Neither the name of the OpenSim Project nor the -* names of its contributors may be used to endorse or promote products -* derived from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY -* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -*/ + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSim Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + using System.Reflection; using System.Runtime.InteropServices; diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index 429894d..8459fbc 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -1,30 +1,30 @@ /* -* Copyright (c) Contributors, http://opensimulator.org/ -* See CONTRIBUTORS.TXT for a full list of copyright holders. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in the -* documentation and/or other materials provided with the distribution. -* * Neither the name of the OpenSim Project nor the -* names of its contributors may be used to endorse or promote products -* derived from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY -* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY -* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -*/ + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSim Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + using System.Collections.Generic; using Axiom.Math; using OpenSim.Framework; @@ -365,15 +365,15 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin get { return true; } set { } } + public override void link(PhysicsActor obj) { - } public override void delink() { - } + public void SetAcceleration(PhysicsVector accel) { _acceleration = accel; @@ -386,9 +386,9 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin public override void SetMomentum(PhysicsVector momentum) { } + public override void CrossingFailure() { - } } -} \ No newline at end of file +} -- cgit v1.1 From a21112cceedfc93840b935feae4ad8725c4afb48 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Tue, 25 Mar 2008 03:36:31 +0000 Subject: * Adds llMoveToTarget and llStopMoveToTarget support to the ODEPlugin. * It doesn't generate at_target events, because they don't exist yet in the script engine. * The Tau is different, however, compatible with scripts I tested. * Not perfect... but pretty good. --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index 8459fbc..16ec66e 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -390,5 +390,8 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin public override void CrossingFailure() { } + public override PhysicsVector PIDTarget { set { return; } } + public override bool PIDActive { set { return; } } + public override float PIDTau { set { return; } } } } -- cgit v1.1 From 2a3bdde0fa78c5a59c530e6d974dfd6709aa1519 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Wed, 23 Apr 2008 15:32:19 +0000 Subject: * Adds llSetStatus(STATUS_ROTATE_X | STATUS_ROTATE_Y | STATUS_ROTATE_Z,TF) * Currently if you apply that to only one or two axis you get unpredictable and sometimes explosive results. * Three axis works well enough to play with it anyway. More work is needed here. * Fixed an incorrectly named method in ODE.NET --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index 16ec66e..08fdd80 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -374,6 +374,11 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin { } + public override void LockAngularMotion(PhysicsVector axis) + { + + } + public void SetAcceleration(PhysicsVector accel) { _acceleration = accel; -- cgit v1.1 From 07167c9a3f6d93fddf66e6f252f4a9b3a4fde8de Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sat, 3 May 2008 04:33:17 +0000 Subject: * Committing some collision stuffs that I'm working on. * Nothing user facing yet. --- .../Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index 08fdd80..0d54dad 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -398,5 +398,17 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin public override PhysicsVector PIDTarget { set { return; } } public override bool PIDActive { set { return; } } public override float PIDTau { set { return; } } + public override void SubscribeEvents(int ms) + { + + } + public override void UnSubscribeEvents() + { + + } + public override bool SubscribedEvents() + { + return false; + } } } -- cgit v1.1 From 240e8646dac402068930065c1fb792e647f1ce4b Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Tue, 6 May 2008 00:23:19 +0000 Subject: * If you llApplyImpulse on an attachment, it applies impulse on the avatar, not the attachment. --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index 0d54dad..eecd115 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -384,7 +384,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin _acceleration = accel; } - public override void AddForce(PhysicsVector force) + public override void AddForce(PhysicsVector force, bool pushforce) { } -- cgit v1.1 From 2a988f187ec4c743d6b269fc3a8fe32d84716f65 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Wed, 14 May 2008 23:15:25 +0000 Subject: * Refactored IConfigSource into Physics plug-ins and Scene. We can get rid of some of the parameters we pass to it's constructor now like, 'm_allowPhysicalPrim', 'seeIntoOtherRegions', etc.. so on * The main purpose of this is to provide configuration options for ODE and other physics plug-ins that are advanced enough to be able to be configured. --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index eecd115..d7c4013 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -27,6 +27,7 @@ using System.Collections.Generic; using Axiom.Math; +using Nini.Config; using OpenSim.Framework; using OpenSim.Region.Physics.Manager; @@ -70,7 +71,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin { } - public override void Initialise(IMesher meshmerizer) + public override void Initialise(IMesher meshmerizer, IConfigSource config) { // Does nothing right now } -- cgit v1.1 From 042c9ed4d82e4389ec929f5438e82defad251235 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sun, 25 May 2008 11:22:05 +0000 Subject: * Adds Top Colliders when using ODE. Access it from the estate tools/debug tab. --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index d7c4013..ee30e54 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -198,6 +198,11 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin public override void DeleteTerrain() { } + public override Dictionary GetTopColliders() + { + Dictionary returncolliders = new Dictionary(); + return returncolliders; + } } public class BasicActor : PhysicsActor @@ -348,6 +353,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin public override float CollisionScore { get { return 0f; } + set { } } public override Quaternion Orientation -- cgit v1.1 From f74a9bcdc7b0682c1c205e9d640fbfa5f214840b Mon Sep 17 00:00:00 2001 From: Dahlia Trimble Date: Thu, 24 Jul 2008 07:45:58 +0000 Subject: Implements llSetForce() and llGetForce(). These are experimental and the units may not match the Linden implementation. --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 1 + 1 file changed, 1 insertion(+) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index ee30e54..213f1d4 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -332,6 +332,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin public override PhysicsVector Force { get { return PhysicsVector.Zero; } + set { return; } } public override PhysicsVector CenterOfMass -- cgit v1.1 From 6ef9d4da901a346c232458317cca6268da888e2e Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Mon, 18 Aug 2008 00:39:10 +0000 Subject: Formatting cleanup. --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index 213f1d4..3bf0956 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -70,7 +70,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin public BasicScene() { } - + public override void Initialise(IMesher meshmerizer, IConfigSource config) { // Does nothing right now -- cgit v1.1 From 7d89e122930be39e84a6d174548fa2d12ac0484a Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sat, 6 Sep 2008 07:52:41 +0000 Subject: * This is the fabled LibOMV update with all of the libOMV types from JHurliman * This is a HUGE OMG update and will definitely have unknown side effects.. so this is really only for the strong hearted at this point. Regular people should let the dust settle. * This has been tested to work with most basic functions. However.. make sure you back up 'everything' before using this. It's that big! * Essentially we're back at square 1 in the testing phase.. so lets identify things that broke. --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index 3bf0956..e38a12b 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -26,8 +26,8 @@ */ using System.Collections.Generic; -using Axiom.Math; using Nini.Config; +using OpenMetaverse; using OpenSim.Framework; using OpenSim.Region.Physics.Manager; -- cgit v1.1 From 3397236c6c759178bfb77e41ba761fca162a7b5f Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Sun, 28 Sep 2008 18:36:30 +0000 Subject: Plumb the connection through from llSetVehicleFloatParam to the various physics engines. No connection to the underlying physics simulator yet, just plumbing through the various classes. --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index e38a12b..23b7518 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -335,6 +335,12 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin set { return; } } + public override float VehicleFloatParam + { + get { return 0f; } + set { return; } + } + public override PhysicsVector CenterOfMass { get { return PhysicsVector.Zero; } -- cgit v1.1 From 37478629995e6c113fa1ccbd56eb948c64e0f594 Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Sun, 28 Sep 2008 20:20:32 +0000 Subject: Plumb the connection though from llSetVehicleVectorParam to the various physics engines. No connection to the underlying physics simulator yet, just plumbing through the various classes. --- .../Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index 23b7518..c75c40e 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -335,12 +335,16 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin set { return; } } - public override float VehicleFloatParam + public override void VehicleFloatParam(int param, float value) { - get { return 0f; } - set { return; } + + } + + public override void VehicleVectorParam(int param, PhysicsVector value) + { + } - + public override PhysicsVector CenterOfMass { get { return PhysicsVector.Zero; } -- cgit v1.1 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/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') 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; } -- cgit v1.1 From 6758ecc40375fb046f142f5f45a19513a89b1f86 Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Sun, 28 Sep 2008 22:38:59 +0000 Subject: Implement the plumbing for llSetVehicleType from the LSL subroutine down through the physics modules through PhysActor and SceneObjectPart. No connection to the physics simulators. --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index 96543da..702f5f1 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -335,6 +335,12 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin set { return; } } + public override int VehicleType + { + get { return 0; } + set { return; } + } + public override void VehicleFloatParam(int param, float value) { -- cgit v1.1 From 81dcf223bf2c564423d2c5c101ea95b6d79c6eab Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Thu, 20 Nov 2008 16:58:40 +0000 Subject: * Add enough infrastructure code to run an extremely basic and flaky add root agent scene test --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index 702f5f1..cacb9eb 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -34,7 +34,7 @@ using OpenSim.Region.Physics.Manager; namespace OpenSim.Region.Physics.BasicPhysicsPlugin { /// - /// Will be the PhysX plugin but for now will be a very basic physics engine + /// Effectively a physics plugin that simulates no physics at all. /// public class BasicPhysicsPlugin : IPhysicsPlugin { -- cgit v1.1 From 098f16fe3192ef17e7c749a70ea0607a22ae55fa Mon Sep 17 00:00:00 2001 From: idb Date: Mon, 1 Dec 2008 00:49:36 +0000 Subject: Remove duplicated avatar height calculation in lsl functions. Use height calculation in Basic Physics and Physics of Simplicity so that avatars larger than the default walk with straight legs and shorter walk on the ground. --- .../Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index cacb9eb..6a27f46 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -152,7 +152,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin actor.Position.X = 255.9F; } - float height = _heightMap[(int)actor.Position.Y * Constants.RegionSize + (int)actor.Position.X] + 1.0f; + float height = _heightMap[(int)actor.Position.Y * Constants.RegionSize + (int)actor.Position.X] + actor.Size.Z; if (actor.Flying) { if (actor.Position.Z + (actor.Velocity.Z*timeStep) < @@ -210,15 +210,16 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin private PhysicsVector _position; private PhysicsVector _velocity; private PhysicsVector _acceleration; + private PhysicsVector _size; private PhysicsVector m_rotationalVelocity = PhysicsVector.Zero; private bool flying; private bool iscolliding; - public BasicActor() { _velocity = new PhysicsVector(); _position = new PhysicsVector(); _acceleration = new PhysicsVector(); + _size = new PhysicsVector(); } public override int PhysicsActorType @@ -315,8 +316,11 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin public override PhysicsVector Size { - get { return PhysicsVector.Zero; } - set { } + get { return _size; } + set { + _size = value; + _size.Z = _size.Z / 2.0f; + } } public override PrimitiveBaseShape Shape -- cgit v1.1 From 3844e73d2742f4dee633bd2b5a8eb7e1a0d524f9 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Tue, 9 Dec 2008 11:11:16 +0000 Subject: * Gerhard's patch m2781. Does some initial work for setting up llVolumeDetect. * Warning! Physics API change. This means that the NBodySimulation needs to be updated! * PhysicsActor -> void SetVolumeDetect(int) needs to go into classes that use PhysicsActor as their base class. --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index 6a27f46..9954798 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -360,6 +360,11 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin } + public override void SetVolumeDetect(int param) + { + + } + public override PhysicsVector CenterOfMass { get { return PhysicsVector.Zero; } -- cgit v1.1 From 8ad6f575ebc23f0c7b282b9ec2543bce26287e54 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sun, 14 Dec 2008 14:30:28 +0000 Subject: * Implements the torque/Rotational Impulse methods in the PhysicsAPI and the ODEPlugin and pipes them to their respective LSL method. * NBody will need to be updated, this is an API change. Torque property and AddAngularForce --- .../Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index 9954798..013c9cf 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -381,6 +381,12 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin set { _velocity = value; } } + public override PhysicsVector Torque + { + get { return PhysicsVector.Zero; } + set { return; } + } + public override float CollisionScore { get { return 0f; } @@ -426,6 +432,10 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin { } + public override void AddAngularForce(PhysicsVector force, bool pushforce) + { + } + public override void SetMomentum(PhysicsVector momentum) { } -- cgit v1.1 From 3b0db66b92a9e497d965d2a26c9d6de643612b63 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Mon, 15 Dec 2008 18:39:54 +0000 Subject: * Apply http://opensimulator.org/mantis/view.php?id=2775 with small tweaks * This pushes an identifier for the OpenSim scene to the physics scene. This allows log messages from the physics scene to identify which OpenSim scene they relate to. * Thanks Gerhard --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index 013c9cf..3673302 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -47,9 +47,9 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin return true; } - public PhysicsScene GetScene() + public PhysicsScene GetScene(string sceneIdentifier) { - return new BasicScene(); + return new BasicScene(sceneIdentifier); } public string GetName() @@ -67,8 +67,11 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin private List _actors = new List(); private float[] _heightMap; - public BasicScene() + string sceneIdentifier; + + public BasicScene(string _sceneIdentifier) { + sceneIdentifier = _sceneIdentifier; } public override void Initialise(IMesher meshmerizer, IConfigSource config) -- cgit v1.1 From ff7c8551bab7c8a5b7a075c8899c8aeb51035b67 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Wed, 17 Dec 2008 18:42:23 +0000 Subject: * remove mono compiler warnings * should work - the last compile failure looks like a random glitch... --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index 3673302..010d9d3 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -67,11 +67,11 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin private List _actors = new List(); private float[] _heightMap; - string sceneIdentifier; + //protected internal string sceneIdentifier; public BasicScene(string _sceneIdentifier) { - sceneIdentifier = _sceneIdentifier; + //sceneIdentifier = _sceneIdentifier; } public override void Initialise(IMesher meshmerizer, IConfigSource config) -- cgit v1.1 From 3d5a9e6748ef743c4db04b427d4d76ea65269618 Mon Sep 17 00:00:00 2001 From: diva Date: Sun, 15 Feb 2009 05:00:58 +0000 Subject: This started as way to correct Mantis #3158, which I believe should be fixed now. The flying status was temporarily being ignored, which caused the avie to drop sometimes -- there was a race condition. In the process it also fixes that annoying bug in basic physics where the avie would drop half-way to the ground upon region crossings (SetAppearance was missing). Additionally, a lot of child-agent-related code has been cleaned up; namely child agents are now consistently not added to physical scenes, and they also don't have appearances. All of that happens in MakeRoot, consistently. --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index 010d9d3..3081077 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -83,10 +83,11 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin { } - public override PhysicsActor AddAvatar(string avName, PhysicsVector position, PhysicsVector size) + public override PhysicsActor AddAvatar(string avName, PhysicsVector position, PhysicsVector size, bool isFlying) { BasicActor act = new BasicActor(); act.Position = position; + act.Flying = isFlying; _actors.Add(act); return act; } -- cgit v1.1 From 5af465a364c74c715bbb99ee2a391b49a5fc4e11 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Thu, 19 Feb 2009 14:51:33 +0000 Subject: * Changed all AssemblyInfo to explicit version 1.0.0.0 to not confuse poor poor Nant. We probably should take the opportunity to let the non-module bins reside in their /bin/Debug dirs later. --- OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs index 8f221f1..095ce49 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs @@ -55,4 +55,4 @@ using System.Runtime.InteropServices; // You can specify all values by your own or you can build default build and revision // numbers with the '*' character (the default): -[assembly : AssemblyVersion("1.0.*")] +[assembly : AssemblyVersion("1.0.0.0")] -- cgit v1.1 From 2e095f5727b2bd22ccf06f940ec191bed4fc8820 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Fri, 20 Feb 2009 16:47:31 +0000 Subject: * Upped VersionInfo to 0.6.3 and in the process, changed assemblyinfo to 0.6.3.* to better track down dll ref and overwrite problems. --- OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs index 095ce49..fcc97be 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs @@ -37,9 +37,9 @@ using System.Runtime.InteropServices; [assembly : AssemblyTitle("BasicPhysicsPlugin")] [assembly : AssemblyDescription("")] [assembly : AssemblyConfiguration("")] -[assembly : AssemblyCompany("")] +[assembly : AssemblyCompany("http://opensimulator.org")] [assembly : AssemblyProduct("BasicPhysicsPlugin")] -[assembly : AssemblyCopyright("")] +[assembly : AssemblyCopyright("Copyright (c) OpenSimulator.org Developers 2007-2009")] [assembly : AssemblyTrademark("")] [assembly : AssemblyCulture("")] @@ -55,4 +55,4 @@ using System.Runtime.InteropServices; // You can specify all values by your own or you can build default build and revision // numbers with the '*' character (the default): -[assembly : AssemblyVersion("1.0.0.0")] +[assembly : AssemblyVersion("0.6.3.*")] -- cgit v1.1 From b637a11b58292cb6165317b317dc077a79ee6779 Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Fri, 6 Mar 2009 23:01:35 +0000 Subject: Fixes Mantis #3260. Thank you kindly, MCortez for a patch that: llSetHoverHeight() should not clamp the x/y position of an object the way MoveTo does, and it should recalculate the absolute height to hover at as an object moves to reflect the current ground/water height under it. Correctly implementing required adjusting the Physics interfaces and implementing at the physics plug-in level. The attached is a patch that correctly implements llSetHoverHeight() including updates to the ODE physics plug-in. --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index 3081077..284837b 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -447,9 +447,17 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin public override void CrossingFailure() { } + public override PhysicsVector PIDTarget { set { return; } } public override bool PIDActive { set { return; } } public override float PIDTau { set { return; } } + + public override float PIDHoverHeight { set { return; } } + public override bool PIDHoverActive { set { return; } } + public override PIDHoverType PIDHoverType { set { return; } } + public override float PIDHoverTau { set { return; } } + + public override void SubscribeEvents(int ms) { -- cgit v1.1 From 958d764172fcbaa5d3a33b787b01426caa300a8a Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Wed, 1 Apr 2009 19:44:46 +0000 Subject: * Upped trunk version number to 0.6.4 as we just tagged 0.6.4-release --- OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs index fcc97be..b6f27cc 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs @@ -55,4 +55,4 @@ using System.Runtime.InteropServices; // You can specify all values by your own or you can build default build and revision // numbers with the '*' character (the default): -[assembly : AssemblyVersion("0.6.3.*")] +[assembly : AssemblyVersion("0.6.4.*")] -- cgit v1.1 From 716e1fe0e149129dad9fd05de3aee6f2de6e1dfe Mon Sep 17 00:00:00 2001 From: idb Date: Sun, 19 Apr 2009 12:28:29 +0000 Subject: Keep IsColliding updated for the recent changes in ScenePresence so that walk/stand animations will get used instead of just falling --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index 284837b..e7902bf 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -164,16 +164,19 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin { actor.Position.Z = height; actor.Velocity.Z = 0; + actor.IsColliding = true; } else { actor.Position.Z += actor.Velocity.Z*timeStep; + actor.IsColliding = false; } } else { actor.Position.Z = height; actor.Velocity.Z = 0; + actor.IsColliding = true; } } return fps; -- cgit v1.1 From ba360ede8b876c5c1b99b4f172eb5d254a1c6f5a Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Mon, 25 May 2009 11:43:56 +0000 Subject: * Upped version number to 0.6.5 --- OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs index b6f27cc..3c0d0de 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs @@ -55,4 +55,4 @@ using System.Runtime.InteropServices; // You can specify all values by your own or you can build default build and revision // numbers with the '*' character (the default): -[assembly : AssemblyVersion("0.6.4.*")] +[assembly : AssemblyVersion("0.6.5.*")] -- cgit v1.1 From 840de6c036570d559ec6924cd8405d3f34a99fdd Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Mon, 1 Jun 2009 06:37:14 +0000 Subject: Minor: Change OpenSim to OpenSimulator in older copyright headers and LICENSE.txt. --- OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs | 2 +- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs index 3c0d0de..063eb54 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs @@ -9,7 +9,7 @@ * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSim Project nor the + * * Neither the name of the OpenSimulator Project nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index e7902bf..83d7a1d 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -9,7 +9,7 @@ * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSim Project nor the + * * Neither the name of the OpenSimulator Project nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * -- cgit v1.1 From 08819bcbea9012d67cc4cb44e4d7ec7e5837bac6 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sun, 19 Jul 2009 02:32:02 +0000 Subject: * Created a way that the OpenSimulator scene can ask the physics scene to do a raycast test safely. * Test for prim obstructions between the avatar and camera. If there are obstructions, inform the client to move the camera closer. This makes it so that walls and objects don't obstruct your view while you're moving around. Try walking inside a hollowed tori. You'll see how much easier it is now because your camera automatically moves closer so you can still see. * Created a way to know if the user's camera is alt + cammed or just following the avatar. * Changes IClientAPI interface by adding SendCameraConstraint(Vector4 CameraConstraint) --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 1 + 1 file changed, 1 insertion(+) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index 83d7a1d..92d5771 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -210,6 +210,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin Dictionary returncolliders = new Dictionary(); return returncolliders; } + } public class BasicActor : PhysicsActor -- cgit v1.1 From 2b990a61bfa88e13d5ad19602e6acef751ea473c Mon Sep 17 00:00:00 2001 From: Teravus Ovares (Dan Olivares) Date: Fri, 7 Aug 2009 20:31:48 -0400 Subject: This is the second part of the 'not crash on regionsize changes'. This lets you configure region sizes to be smaller without crashing the region. I remind you that regions are still square, must be a multiple of 4, and the Linden client doesn't like anything other then 256. If you set it bigger or smaller, the terrain doesn't load in the client, the map has issues, and god forbid you connect it to a grid that expects 256m regions. --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index 92d5771..d3d10bf 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -144,7 +144,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin } else if (actor.Position.Y >= Constants.RegionSize) { - actor.Position.Y = 255.9F; + actor.Position.Y = ((int)Constants.RegionSize - 0.1f); } if (actor.Position.X < 0) @@ -153,7 +153,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin } else if (actor.Position.X >= Constants.RegionSize) { - actor.Position.X = 255.9F; + actor.Position.X = ((int)Constants.RegionSize - 0.1f); } float height = _heightMap[(int)actor.Position.Y * Constants.RegionSize + (int)actor.Position.X] + actor.Size.Z; -- cgit v1.1 From 8863092f7c0e97b5ebae797c059b6c8c03e948b9 Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Tue, 11 Aug 2009 00:24:39 +0900 Subject: Split BasicPhysics classes into separate files. --- .../BasicPhysicsPlugin/BasicPhysicsActor.cs | 322 ++++++++++++++++ .../BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 416 +-------------------- .../BasicPhysicsPlugin/BasicPhysicsScene.cs | 185 +++++++++ 3 files changed, 508 insertions(+), 415 deletions(-) create mode 100644 OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs create mode 100644 OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs new file mode 100644 index 0000000..a74eb0c --- /dev/null +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs @@ -0,0 +1,322 @@ +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +using System; +using System.Collections.Generic; +using Nini.Config; +using OpenMetaverse; +using OpenSim.Framework; +using OpenSim.Region.Physics.Manager; + +namespace OpenSim.Region.Physics.BasicPhysicsPlugin +{ + public class BasicActor : PhysicsActor + { + private PhysicsVector _position; + private PhysicsVector _velocity; + private PhysicsVector _acceleration; + private PhysicsVector _size; + private PhysicsVector m_rotationalVelocity = PhysicsVector.Zero; + private bool flying; + private bool iscolliding; + public BasicActor() + { + _velocity = new PhysicsVector(); + _position = new PhysicsVector(); + _acceleration = new PhysicsVector(); + _size = new PhysicsVector(); + } + + public override int PhysicsActorType + { + get { return (int) ActorTypes.Agent; } + set { return; } + } + + public override PhysicsVector RotationalVelocity + { + get { return m_rotationalVelocity; } + set { m_rotationalVelocity = value; } + } + + public override bool SetAlwaysRun + { + get { return false; } + set { return; } + } + + public override uint LocalID + { + set { return; } + } + + public override bool Grabbed + { + set { return; } + } + + public override bool Selected + { + set { return; } + } + + public override float Buoyancy + { + get { return 0f; } + set { return; } + } + + public override bool FloatOnWater + { + set { return; } + } + + public override bool IsPhysical + { + get { return false; } + set { return; } + } + + public override bool ThrottleUpdates + { + get { return false; } + set { return; } + } + + public override bool Flying + { + get { return flying; } + set { flying = value; } + } + + public override bool IsColliding + { + get { return iscolliding; } + set { iscolliding = value; } + } + + public override bool CollidingGround + { + get { return false; } + set { return; } + } + + public override bool CollidingObj + { + get { return false; } + set { return; } + } + + public override bool Stopped + { + get { return false; } + } + + public override PhysicsVector Position + { + get { return _position; } + set { _position = value; } + } + + public override PhysicsVector Size + { + get { return _size; } + set { + _size = value; + _size.Z = _size.Z / 2.0f; + } + } + + public override PrimitiveBaseShape Shape + { + set { return; } + } + + public override float Mass + { + get { return 0f; } + } + + public override PhysicsVector Force + { + get { return PhysicsVector.Zero; } + set { return; } + } + + public override int VehicleType + { + get { return 0; } + set { return; } + } + + public override void VehicleFloatParam(int param, float value) + { + + } + + public override void VehicleVectorParam(int param, PhysicsVector value) + { + + } + + public override void VehicleRotationParam(int param, Quaternion rotation) + { + + } + + public override void SetVolumeDetect(int param) + { + + } + + public override PhysicsVector CenterOfMass + { + get { return PhysicsVector.Zero; } + } + + public override PhysicsVector GeometricCenter + { + get { return PhysicsVector.Zero; } + } + + public override PhysicsVector Velocity + { + get { return _velocity; } + set { _velocity = value; } + } + + public override PhysicsVector Torque + { + get { return PhysicsVector.Zero; } + set { return; } + } + + public override float CollisionScore + { + get { return 0f; } + set { } + } + + public override Quaternion Orientation + { + get { return Quaternion.Identity; } + set { } + } + + public override PhysicsVector Acceleration + { + get { return _acceleration; } + } + + public override bool Kinematic + { + get { return true; } + set { } + } + + public override void link(PhysicsActor obj) + { + } + + public override void delink() + { + } + + public override void LockAngularMotion(PhysicsVector axis) + { + } + + public void SetAcceleration(PhysicsVector accel) + { + _acceleration = accel; + } + + public override void AddForce(PhysicsVector force, bool pushforce) + { + } + + public override void AddAngularForce(PhysicsVector force, bool pushforce) + { + } + + public override void SetMomentum(PhysicsVector momentum) + { + } + + public override void CrossingFailure() + { + } + + public override PhysicsVector PIDTarget + { + set { return; } + } + + public override bool PIDActive + { + set { return; } + } + + public override float PIDTau + { + set { return; } + } + + public override float PIDHoverHeight + { + set { return; } + } + + public override bool PIDHoverActive + { + set { return; } + } + + public override PIDHoverType PIDHoverType + { + set { return; } + } + + public override float PIDHoverTau + { + set { return; } + } + + public override void SubscribeEvents(int ms) + { + } + + public override void UnSubscribeEvents() + { + } + + public override bool SubscribedEvents() + { + return false; + } + } +} diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index d3d10bf..7ab2a03 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -25,9 +25,9 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +using System; using System.Collections.Generic; using Nini.Config; -using OpenMetaverse; using OpenSim.Framework; using OpenSim.Region.Physics.Manager; @@ -61,418 +61,4 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin { } } - - public class BasicScene : PhysicsScene - { - private List _actors = new List(); - private float[] _heightMap; - - //protected internal string sceneIdentifier; - - public BasicScene(string _sceneIdentifier) - { - //sceneIdentifier = _sceneIdentifier; - } - - public override void Initialise(IMesher meshmerizer, IConfigSource config) - { - // Does nothing right now - } - - public override void Dispose() - { - - } - public override PhysicsActor AddAvatar(string avName, PhysicsVector position, PhysicsVector size, bool isFlying) - { - BasicActor act = new BasicActor(); - act.Position = position; - act.Flying = isFlying; - _actors.Add(act); - return act; - } - - public override void RemovePrim(PhysicsActor prim) - { - } - - public override void RemoveAvatar(PhysicsActor actor) - { - BasicActor act = (BasicActor) actor; - if (_actors.Contains(act)) - { - _actors.Remove(act); - } - } - -/* - public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size, Quaternion rotation) - { - return null; - } -*/ - - public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position, - PhysicsVector size, Quaternion rotation) - { - return AddPrimShape(primName, pbs, position, size, rotation, false); - } - - public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position, - PhysicsVector size, Quaternion rotation, bool isPhysical) - { - return null; - } - - public override void AddPhysicsActorTaint(PhysicsActor prim) - { - } - - public override float Simulate(float timeStep) - { - float fps = 0; - for (int i = 0; i < _actors.Count; ++i) - { - BasicActor actor = _actors[i]; - - actor.Position.X += actor.Velocity.X*timeStep; - actor.Position.Y += actor.Velocity.Y*timeStep; - - if (actor.Position.Y < 0) - { - actor.Position.Y = 0.1F; - } - else if (actor.Position.Y >= Constants.RegionSize) - { - actor.Position.Y = ((int)Constants.RegionSize - 0.1f); - } - - if (actor.Position.X < 0) - { - actor.Position.X = 0.1F; - } - else if (actor.Position.X >= Constants.RegionSize) - { - actor.Position.X = ((int)Constants.RegionSize - 0.1f); - } - - float height = _heightMap[(int)actor.Position.Y * Constants.RegionSize + (int)actor.Position.X] + actor.Size.Z; - if (actor.Flying) - { - if (actor.Position.Z + (actor.Velocity.Z*timeStep) < - _heightMap[(int)actor.Position.Y * Constants.RegionSize + (int)actor.Position.X] + 2) - { - actor.Position.Z = height; - actor.Velocity.Z = 0; - actor.IsColliding = true; - } - else - { - actor.Position.Z += actor.Velocity.Z*timeStep; - actor.IsColliding = false; - } - } - else - { - actor.Position.Z = height; - actor.Velocity.Z = 0; - actor.IsColliding = true; - } - } - return fps; - } - - public override void GetResults() - { - } - - public override bool IsThreaded - { - get { return (false); // for now we won't be multithreaded - } - } - - public override void SetTerrain(float[] heightMap) - { - _heightMap = heightMap; - } - - public override void SetWaterLevel(float baseheight) - { - - } - - public override void DeleteTerrain() - { - } - public override Dictionary GetTopColliders() - { - Dictionary returncolliders = new Dictionary(); - return returncolliders; - } - - } - - public class BasicActor : PhysicsActor - { - private PhysicsVector _position; - private PhysicsVector _velocity; - private PhysicsVector _acceleration; - private PhysicsVector _size; - private PhysicsVector m_rotationalVelocity = PhysicsVector.Zero; - private bool flying; - private bool iscolliding; - public BasicActor() - { - _velocity = new PhysicsVector(); - _position = new PhysicsVector(); - _acceleration = new PhysicsVector(); - _size = new PhysicsVector(); - } - - public override int PhysicsActorType - { - get { return (int) ActorTypes.Agent; } - set { return; } - } - - public override PhysicsVector RotationalVelocity - { - get { return m_rotationalVelocity; } - set { m_rotationalVelocity = value; } - } - - public override bool SetAlwaysRun - { - get { return false; } - set { return; } - } - - public override uint LocalID - { - set { return; } - } - - public override bool Grabbed - { - set { return; } - } - - public override bool Selected - { - set { return; } - } - - public override float Buoyancy - { - get { return 0f; } - set { return; } - } - - public override bool FloatOnWater - { - set { return; } - } - - public override bool IsPhysical - { - get { return false; } - set { return; } - } - - public override bool ThrottleUpdates - { - get { return false; } - set { return; } - } - - public override bool Flying - { - get { return flying; } - set { flying = value; } - } - - public override bool IsColliding - { - get { return iscolliding; } - set { iscolliding = value; } - } - - public override bool CollidingGround - { - get { return false; } - set { return; } - } - - public override bool CollidingObj - { - get { return false; } - set { return; } - } - - public override bool Stopped - { - get { return false; } - } - - - public override PhysicsVector Position - { - get { return _position; } - set { _position = value; } - } - - public override PhysicsVector Size - { - get { return _size; } - set { - _size = value; - _size.Z = _size.Z / 2.0f; - } - } - - public override PrimitiveBaseShape Shape - { - set { return; } - } - - public override float Mass - { - get { return 0f; } - } - - public override PhysicsVector Force - { - get { return PhysicsVector.Zero; } - set { return; } - } - - public override int VehicleType - { - get { return 0; } - set { return; } - } - - public override void VehicleFloatParam(int param, float value) - { - - } - - public override void VehicleVectorParam(int param, PhysicsVector value) - { - - } - - public override void VehicleRotationParam(int param, Quaternion rotation) - { - - } - - public override void SetVolumeDetect(int param) - { - - } - - public override PhysicsVector CenterOfMass - { - get { return PhysicsVector.Zero; } - } - - public override PhysicsVector GeometricCenter - { - get { return PhysicsVector.Zero; } - } - - public override PhysicsVector Velocity - { - get { return _velocity; } - set { _velocity = value; } - } - - public override PhysicsVector Torque - { - get { return PhysicsVector.Zero; } - set { return; } - } - - public override float CollisionScore - { - get { return 0f; } - set { } - } - - public override Quaternion Orientation - { - get { return Quaternion.Identity; } - set { } - } - - public override PhysicsVector Acceleration - { - get { return _acceleration; } - } - - public override bool Kinematic - { - get { return true; } - set { } - } - - public override void link(PhysicsActor obj) - { - } - - public override void delink() - { - } - - public override void LockAngularMotion(PhysicsVector axis) - { - - } - - public void SetAcceleration(PhysicsVector accel) - { - _acceleration = accel; - } - - public override void AddForce(PhysicsVector force, bool pushforce) - { - } - - public override void AddAngularForce(PhysicsVector force, bool pushforce) - { - } - - public override void SetMomentum(PhysicsVector momentum) - { - } - - public override void CrossingFailure() - { - } - - public override PhysicsVector PIDTarget { set { return; } } - public override bool PIDActive { set { return; } } - public override float PIDTau { set { return; } } - - public override float PIDHoverHeight { set { return; } } - public override bool PIDHoverActive { set { return; } } - public override PIDHoverType PIDHoverType { set { return; } } - public override float PIDHoverTau { set { return; } } - - - public override void SubscribeEvents(int ms) - { - - } - public override void UnSubscribeEvents() - { - - } - public override bool SubscribedEvents() - { - return false; - } - } } diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs new file mode 100644 index 0000000..66bd099 --- /dev/null +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs @@ -0,0 +1,185 @@ +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +using System; +using System.Collections.Generic; +using Nini.Config; +using OpenMetaverse; +using OpenSim.Framework; +using OpenSim.Region.Physics.Manager; + +namespace OpenSim.Region.Physics.BasicPhysicsPlugin +{ + public class BasicScene : PhysicsScene + { + private List _actors = new List(); + private float[] _heightMap; + + //protected internal string sceneIdentifier; + + public BasicScene(string _sceneIdentifier) + { + //sceneIdentifier = _sceneIdentifier; + } + + public override void Initialise(IMesher meshmerizer, IConfigSource config) + { + } + + public override void Dispose() + { + + } + public override PhysicsActor AddAvatar(string avName, PhysicsVector position, PhysicsVector size, bool isFlying) + { + BasicActor act = new BasicActor(); + act.Position = position; + act.Flying = isFlying; + _actors.Add(act); + return act; + } + + public override void RemovePrim(PhysicsActor prim) + { + } + + public override void RemoveAvatar(PhysicsActor actor) + { + BasicActor act = (BasicActor) actor; + if (_actors.Contains(act)) + { + _actors.Remove(act); + } + } + +/* + public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size, Quaternion rotation) + { + return null; + } +*/ + + public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position, + PhysicsVector size, Quaternion rotation) + { + return AddPrimShape(primName, pbs, position, size, rotation, false); + } + + public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position, + PhysicsVector size, Quaternion rotation, bool isPhysical) + { + return null; + } + + public override void AddPhysicsActorTaint(PhysicsActor prim) + { + } + + public override float Simulate(float timeStep) + { + float fps = 0; + for (int i = 0; i < _actors.Count; ++i) + { + BasicActor actor = _actors[i]; + + actor.Position.X += actor.Velocity.X*timeStep; + actor.Position.Y += actor.Velocity.Y*timeStep; + + if (actor.Position.Y < 0) + { + actor.Position.Y = 0.1F; + } + else if (actor.Position.Y >= Constants.RegionSize) + { + actor.Position.Y = ((int)Constants.RegionSize - 0.1f); + } + + if (actor.Position.X < 0) + { + actor.Position.X = 0.1F; + } + else if (actor.Position.X >= Constants.RegionSize) + { + actor.Position.X = ((int)Constants.RegionSize - 0.1f); + } + + float height = _heightMap[(int)actor.Position.Y * Constants.RegionSize + (int)actor.Position.X] + actor.Size.Z; + if (actor.Flying) + { + if (actor.Position.Z + (actor.Velocity.Z*timeStep) < + _heightMap[(int)actor.Position.Y * Constants.RegionSize + (int)actor.Position.X] + 2) + { + actor.Position.Z = height; + actor.Velocity.Z = 0; + actor.IsColliding = true; + } + else + { + actor.Position.Z += actor.Velocity.Z*timeStep; + actor.IsColliding = false; + } + } + else + { + actor.Position.Z = height; + actor.Velocity.Z = 0; + actor.IsColliding = true; + } + } + return fps; + } + + public override void GetResults() + { + } + + public override bool IsThreaded + { + get { return (false); // for now we won't be multithreaded + } + } + + public override void SetTerrain(float[] heightMap) + { + _heightMap = heightMap; + } + + public override void DeleteTerrain() + { + } + + public override void SetWaterLevel(float baseheight) + { + } + + public override Dictionary GetTopColliders() + { + Dictionary returncolliders = new Dictionary(); + return returncolliders; + } + } +} -- cgit v1.1 From 256624566f4708fc6e3280c240393d0abdb7beb6 Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Wed, 26 Aug 2009 12:58:37 +0900 Subject: Formatting cleanup, minor refactoring. --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs | 1 + 1 file changed, 1 insertion(+) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs index a74eb0c..8d8b3fe 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs @@ -43,6 +43,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin private PhysicsVector m_rotationalVelocity = PhysicsVector.Zero; private bool flying; private bool iscolliding; + public BasicActor() { _velocity = new PhysicsVector(); -- cgit v1.1 From d199767e6991d6f368661fce9c5a072e564b8a4b Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Sun, 25 Oct 2009 23:16:12 -0700 Subject: Experimental change of PhysicsVector to Vector3. Untested --- .../BasicPhysicsPlugin/BasicPhysicsActor.cs | 54 ++++++++++------------ .../BasicPhysicsPlugin/BasicPhysicsScene.cs | 40 +++++++++------- 2 files changed, 48 insertions(+), 46 deletions(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs index 8d8b3fe..8df997e 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs @@ -36,20 +36,16 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin { public class BasicActor : PhysicsActor { - private PhysicsVector _position; - private PhysicsVector _velocity; - private PhysicsVector _acceleration; - private PhysicsVector _size; - private PhysicsVector m_rotationalVelocity = PhysicsVector.Zero; + private Vector3 _position; + private Vector3 _velocity; + private Vector3 _acceleration; + private Vector3 _size; + private Vector3 m_rotationalVelocity; private bool flying; private bool iscolliding; public BasicActor() { - _velocity = new PhysicsVector(); - _position = new PhysicsVector(); - _acceleration = new PhysicsVector(); - _size = new PhysicsVector(); } public override int PhysicsActorType @@ -58,7 +54,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin set { return; } } - public override PhysicsVector RotationalVelocity + public override Vector3 RotationalVelocity { get { return m_rotationalVelocity; } set { m_rotationalVelocity = value; } @@ -137,13 +133,13 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin get { return false; } } - public override PhysicsVector Position + public override Vector3 Position { get { return _position; } set { _position = value; } } - public override PhysicsVector Size + public override Vector3 Size { get { return _size; } set { @@ -162,9 +158,9 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin get { return 0f; } } - public override PhysicsVector Force + public override Vector3 Force { - get { return PhysicsVector.Zero; } + get { return Vector3.Zero; } set { return; } } @@ -179,7 +175,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin } - public override void VehicleVectorParam(int param, PhysicsVector value) + public override void VehicleVectorParam(int param, Vector3 value) { } @@ -194,25 +190,25 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin } - public override PhysicsVector CenterOfMass + public override Vector3 CenterOfMass { - get { return PhysicsVector.Zero; } + get { return Vector3.Zero; } } - public override PhysicsVector GeometricCenter + public override Vector3 GeometricCenter { - get { return PhysicsVector.Zero; } + get { return Vector3.Zero; } } - public override PhysicsVector Velocity + public override Vector3 Velocity { get { return _velocity; } set { _velocity = value; } } - public override PhysicsVector Torque + public override Vector3 Torque { - get { return PhysicsVector.Zero; } + get { return Vector3.Zero; } set { return; } } @@ -228,7 +224,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin set { } } - public override PhysicsVector Acceleration + public override Vector3 Acceleration { get { return _acceleration; } } @@ -247,24 +243,24 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin { } - public override void LockAngularMotion(PhysicsVector axis) + public override void LockAngularMotion(Vector3 axis) { } - public void SetAcceleration(PhysicsVector accel) + public void SetAcceleration(Vector3 accel) { _acceleration = accel; } - public override void AddForce(PhysicsVector force, bool pushforce) + public override void AddForce(Vector3 force, bool pushforce) { } - public override void AddAngularForce(PhysicsVector force, bool pushforce) + public override void AddAngularForce(Vector3 force, bool pushforce) { } - public override void SetMomentum(PhysicsVector momentum) + public override void SetMomentum(Vector3 momentum) { } @@ -272,7 +268,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin { } - public override PhysicsVector PIDTarget + public override Vector3 PIDTarget { set { return; } } diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs index 66bd099..b6e1cb4 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs @@ -54,7 +54,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin { } - public override PhysicsActor AddAvatar(string avName, PhysicsVector position, PhysicsVector size, bool isFlying) + public override PhysicsActor AddAvatar(string avName, Vector3 position, Vector3 size, bool isFlying) { BasicActor act = new BasicActor(); act.Position = position; @@ -77,20 +77,20 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin } /* - public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size, Quaternion rotation) + public override PhysicsActor AddPrim(Vector3 position, Vector3 size, Quaternion rotation) { return null; } */ - public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position, - PhysicsVector size, Quaternion rotation) + public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, + Vector3 size, Quaternion rotation) { return AddPrimShape(primName, pbs, position, size, rotation, false); } - public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position, - PhysicsVector size, Quaternion rotation, bool isPhysical) + public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, + Vector3 size, Quaternion rotation, bool isPhysical) { return null; } @@ -105,26 +105,28 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin for (int i = 0; i < _actors.Count; ++i) { BasicActor actor = _actors[i]; + Vector3 actorPosition = actor.Position; + Vector3 actorVelocity = actor.Velocity; - actor.Position.X += actor.Velocity.X*timeStep; - actor.Position.Y += actor.Velocity.Y*timeStep; + actorPosition.X += actor.Velocity.X*timeStep; + actorPosition.Y += actor.Velocity.Y*timeStep; if (actor.Position.Y < 0) { - actor.Position.Y = 0.1F; + actorPosition.Y = 0.1F; } else if (actor.Position.Y >= Constants.RegionSize) { - actor.Position.Y = ((int)Constants.RegionSize - 0.1f); + actorPosition.Y = ((int)Constants.RegionSize - 0.1f); } if (actor.Position.X < 0) { - actor.Position.X = 0.1F; + actorPosition.X = 0.1F; } else if (actor.Position.X >= Constants.RegionSize) { - actor.Position.X = ((int)Constants.RegionSize - 0.1f); + actorPosition.X = ((int)Constants.RegionSize - 0.1f); } float height = _heightMap[(int)actor.Position.Y * Constants.RegionSize + (int)actor.Position.X] + actor.Size.Z; @@ -133,23 +135,27 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin if (actor.Position.Z + (actor.Velocity.Z*timeStep) < _heightMap[(int)actor.Position.Y * Constants.RegionSize + (int)actor.Position.X] + 2) { - actor.Position.Z = height; - actor.Velocity.Z = 0; + actorPosition.Z = height; + actorVelocity.Z = 0; actor.IsColliding = true; } else { - actor.Position.Z += actor.Velocity.Z*timeStep; + actorPosition.Z += actor.Velocity.Z*timeStep; actor.IsColliding = false; } } else { - actor.Position.Z = height; - actor.Velocity.Z = 0; + actorPosition.Z = height; + actorVelocity.Z = 0; actor.IsColliding = true; } + + actor.Position = actorPosition; + actor.Velocity = actorVelocity; } + return fps; } -- cgit v1.1 From e530180c1e8e9758df7cb9a72ad0715fd7c8a0e7 Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 22 Dec 2009 00:26:12 +0000 Subject: Glue code for a couple of new LSL function implementations --- .../Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs index 8df997e..f411dd7 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs @@ -303,6 +303,26 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin set { return; } } + public override Quaternion APIDTarget + { + set { return; } + } + + public override bool APIDActive + { + set { return; } + } + + public override float APIDStrength + { + set { return; } + } + + public override float APIDDamping + { + set { return; } + } + public override void SubscribeEvents(int ms) { } -- cgit v1.1 From 70d5b1c34cf2eb6621f383169fdee03966850762 Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Mon, 4 Jan 2010 06:10:45 +0900 Subject: Formatting cleanup. Add copyright headers. --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs index f411dd7..31366db 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs @@ -305,22 +305,22 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin public override Quaternion APIDTarget { - set { return; } + set { return; } } public override bool APIDActive { - set { return; } + set { return; } } public override float APIDStrength { - set { return; } + set { return; } } public override float APIDDamping { - set { return; } + set { return; } } public override void SubscribeEvents(int ms) -- cgit v1.1 From 9821c4f566e11c75c8d87721777480c5b2e2bd4e Mon Sep 17 00:00:00 2001 From: Revolution Date: Sun, 14 Feb 2010 15:41:57 -0600 Subject: Revolution is on the roll again! :) Fixes: Undo, T-pose of others on login, modifiedBulletX works again, feet now stand on the ground instead of in the ground, adds checks to CombatModule. Adds: Redo, Land Undo, checks to agentUpdate (so one can not fall off of a region), more vehicle parts. Finishes almost all of LSL (1 function left, 2 events). Direct flames and kudos to Revolution, please Signed-off-by: Melanie --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs index 31366db..5e2eeeb 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs @@ -185,6 +185,11 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin } + public override void VehicleFlags(int param, bool remove) + { + + } + public override void SetVolumeDetect(int param) { -- cgit v1.1 From e9dbe54ab1217e4310b0e7e014516363237e2a21 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 15 Jul 2011 20:07:59 +0100 Subject: Fix some local id issues in physics glue --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs index b6e1cb4..6c9d9ab 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs @@ -84,13 +84,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin */ public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, - Vector3 size, Quaternion rotation) - { - return AddPrimShape(primName, pbs, position, size, rotation, false); - } - - public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, - Vector3 size, Quaternion rotation, bool isPhysical) + Vector3 size, Quaternion rotation, bool isPhysical, uint localid) { return null; } -- cgit v1.1 From 21d8a6b0e8f1480a5ac75ae4e76d01d4ae2fb13f Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 3 Aug 2011 23:06:18 +0100 Subject: extend move test to check one beat of the simulator without actually asking the npc to move. --- .../Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs index 6c9d9ab..1ceed1a 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs @@ -123,11 +123,15 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin actorPosition.X = ((int)Constants.RegionSize - 0.1f); } - float height = _heightMap[(int)actor.Position.Y * Constants.RegionSize + (int)actor.Position.X] + actor.Size.Z; + float terrainHeight = 0; + if (_heightMap != null) + terrainHeight = _heightMap[(int)actor.Position.Y * Constants.RegionSize + (int)actor.Position.X]; + + float height = terrainHeight + actor.Size.Z; + if (actor.Flying) { - if (actor.Position.Z + (actor.Velocity.Z*timeStep) < - _heightMap[(int)actor.Position.Y * Constants.RegionSize + (int)actor.Position.X] + 2) + if (actor.Position.Z + (actor.Velocity.Z * timeStep) < terrainHeight + 2) { actorPosition.Z = height; actorVelocity.Z = 0; @@ -135,7 +139,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin } else { - actorPosition.Z += actor.Velocity.Z*timeStep; + actorPosition.Z += actor.Velocity.Z * timeStep; actor.IsColliding = false; } } -- cgit v1.1 From c0ba99e5ada0b734b932091befce69dbd53d149a Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 15 Dec 2011 22:29:36 +0000 Subject: Stop having to call SetHeight again in ScenePresence.AddToPhysicalScene() when we've already passed size information to the avatar at PhysicsScene.AddAvatar() Eliminate some copypasta for height setting in OdeCharacter --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs | 3 ++- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs index 5e2eeeb..1e1d5e3 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs @@ -44,8 +44,9 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin private bool flying; private bool iscolliding; - public BasicActor() + public BasicActor(Vector3 size) { + Size = size; } public override int PhysicsActorType diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs index 1ceed1a..2e14216 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs @@ -56,7 +56,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin } public override PhysicsActor AddAvatar(string avName, Vector3 position, Vector3 size, bool isFlying) { - BasicActor act = new BasicActor(); + BasicActor act = new BasicActor(size); act.Position = position; act.Flying = isFlying; _actors.Add(act); -- cgit v1.1 From 41b02a7208a8363f8edefb812e4f93238759d2bd Mon Sep 17 00:00:00 2001 From: Dan Lake Date: Tue, 20 Dec 2011 14:45:32 -0800 Subject: Remove unused SetAcceleration and add set on Acceleration parameter --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs index 1e1d5e3..b1a3ff9 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs @@ -233,6 +233,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin public override Vector3 Acceleration { get { return _acceleration; } + set { _acceleration = value; } } public override bool Kinematic @@ -253,11 +254,6 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin { } - public void SetAcceleration(Vector3 accel) - { - _acceleration = accel; - } - public override void AddForce(Vector3 force, bool pushforce) { } -- cgit v1.1 From 8205fe79ceaeebd31509a044005bf27d226dbe07 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sun, 22 Apr 2012 19:51:51 +0100 Subject: Fix bug where setting phantom on a prim would result in a server log message rather than setting phantom. This was an oversight when removing some race conditions from PhysicsActor setting recently. Regression tests extended to probe this code path. Extending regression tests required implementation of a BasicPhysicsPrim (there was none before). However, BasicPhysics plugin is still of no current practical use other than to fill in as a component for other parts of regression testing. --- .../Physics/BasicPhysicsPlugin/BasicPhysicsPrim.cs | 344 +++++++++++++++++++++ .../BasicPhysicsPlugin/BasicPhysicsScene.cs | 41 +-- 2 files changed, 367 insertions(+), 18 deletions(-) create mode 100644 OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPrim.cs (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPrim.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPrim.cs new file mode 100644 index 0000000..ba7fe1e --- /dev/null +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPrim.cs @@ -0,0 +1,344 @@ +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +using System; +using System.Collections.Generic; +using Nini.Config; +using OpenMetaverse; +using OpenSim.Framework; +using OpenSim.Region.Physics.Manager; + +namespace OpenSim.Region.Physics.BasicPhysicsPlugin +{ + public class BasicPhysicsPrim : PhysicsActor + { + private Vector3 _position; + private Vector3 _velocity; + private Vector3 _acceleration; + private Vector3 _size; + private PrimitiveBaseShape _shape; + private Vector3 m_rotationalVelocity; + private bool flying; + private bool iscolliding; + + public BasicPhysicsPrim( + string name, uint localId, Vector3 position, Vector3 size, Quaternion orientation, PrimitiveBaseShape shape) + { + Name = name; + LocalID = localId; + Position = position; + Size = size; + Orientation = orientation; + Shape = shape; + } + + public override int PhysicsActorType + { + get { return (int) ActorTypes.Agent; } + set { return; } + } + + public override Vector3 RotationalVelocity + { + get { return m_rotationalVelocity; } + set { m_rotationalVelocity = value; } + } + + public override bool SetAlwaysRun + { + get { return false; } + set { return; } + } + + public override uint LocalID + { + set { return; } + } + + public override bool Grabbed + { + set { return; } + } + + public override bool Selected + { + set { return; } + } + + public override float Buoyancy + { + get { return 0f; } + set { return; } + } + + public override bool FloatOnWater + { + set { return; } + } + + public override bool IsPhysical + { + get { return false; } + set { return; } + } + + public override bool ThrottleUpdates + { + get { return false; } + set { return; } + } + + public override bool Flying + { + get { return flying; } + set { flying = value; } + } + + public override bool IsColliding + { + get { return iscolliding; } + set { iscolliding = value; } + } + + public override bool CollidingGround + { + get { return false; } + set { return; } + } + + public override bool CollidingObj + { + get { return false; } + set { return; } + } + + public override bool Stopped + { + get { return false; } + } + + public override Vector3 Position + { + get { return _position; } + set { _position = value; } + } + + public override Vector3 Size + { + get { return _size; } + set { + _size = value; + _size.Z = _size.Z / 2.0f; + } + } + + public override PrimitiveBaseShape Shape + { + set { _shape = value; } + } + + public override float Mass + { + get { return 0f; } + } + + public override Vector3 Force + { + get { return Vector3.Zero; } + set { return; } + } + + public override int VehicleType + { + get { return 0; } + set { return; } + } + + public override void VehicleFloatParam(int param, float value) + { + + } + + public override void VehicleVectorParam(int param, Vector3 value) + { + + } + + public override void VehicleRotationParam(int param, Quaternion rotation) + { + + } + + public override void VehicleFlags(int param, bool remove) + { + + } + + public override void SetVolumeDetect(int param) + { + + } + + public override Vector3 CenterOfMass + { + get { return Vector3.Zero; } + } + + public override Vector3 GeometricCenter + { + get { return Vector3.Zero; } + } + + public override Vector3 Velocity + { + get { return _velocity; } + set { _velocity = value; } + } + + public override Vector3 Torque + { + get { return Vector3.Zero; } + set { return; } + } + + public override float CollisionScore + { + get { return 0f; } + set { } + } + + public override Quaternion Orientation { get; set; } + + public override Vector3 Acceleration + { + get { return _acceleration; } + set { _acceleration = value; } + } + + public override bool Kinematic + { + get { return true; } + set { } + } + + public override void link(PhysicsActor obj) + { + } + + public override void delink() + { + } + + public override void LockAngularMotion(Vector3 axis) + { + } + + public override void AddForce(Vector3 force, bool pushforce) + { + } + + public override void AddAngularForce(Vector3 force, bool pushforce) + { + } + + public override void SetMomentum(Vector3 momentum) + { + } + + public override void CrossingFailure() + { + } + + public override Vector3 PIDTarget + { + set { return; } + } + + public override bool PIDActive + { + set { return; } + } + + public override float PIDTau + { + set { return; } + } + + public override float PIDHoverHeight + { + set { return; } + } + + public override bool PIDHoverActive + { + set { return; } + } + + public override PIDHoverType PIDHoverType + { + set { return; } + } + + public override float PIDHoverTau + { + set { return; } + } + + public override Quaternion APIDTarget + { + set { return; } + } + + public override bool APIDActive + { + set { return; } + } + + public override float APIDStrength + { + set { return; } + } + + public override float APIDDamping + { + set { return; } + } + + public override void SubscribeEvents(int ms) + { + } + + public override void UnSubscribeEvents() + { + } + + public override bool SubscribedEvents() + { + return false; + } + } +} diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs index 2e14216..f5826ed 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs @@ -34,9 +34,17 @@ using OpenSim.Region.Physics.Manager; namespace OpenSim.Region.Physics.BasicPhysicsPlugin { + /// + /// This is an incomplete extremely basic physics implementation + /// + /// + /// Not useful for anything at the moment apart from some regression testing in other components where some form + /// of physics plugin is needed. + /// public class BasicScene : PhysicsScene { private List _actors = new List(); + private List _prims = new List(); private float[] _heightMap; //protected internal string sceneIdentifier; @@ -50,10 +58,19 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin { } - public override void Dispose() + public override void Dispose() {} + + public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, + Vector3 size, Quaternion rotation, bool isPhysical, uint localid) { + BasicPhysicsPrim prim = new BasicPhysicsPrim(primName, localid, position, size, rotation, pbs); + prim.IsPhysical = isPhysical; + + _prims.Add(prim); + return prim; } + public override PhysicsActor AddAvatar(string avName, Vector3 position, Vector3 size, bool isFlying) { BasicActor act = new BasicActor(size); @@ -63,30 +80,18 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin return act; } - public override void RemovePrim(PhysicsActor prim) + public override void RemovePrim(PhysicsActor actor) { + BasicPhysicsPrim prim = (BasicPhysicsPrim)actor; + if (_prims.Contains(prim)) + _prims.Remove(prim); } public override void RemoveAvatar(PhysicsActor actor) { - BasicActor act = (BasicActor) actor; + BasicActor act = (BasicActor)actor; if (_actors.Contains(act)) - { _actors.Remove(act); - } - } - -/* - public override PhysicsActor AddPrim(Vector3 position, Vector3 size, Quaternion rotation) - { - return null; - } -*/ - - public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, Vector3 position, - Vector3 size, Quaternion rotation, bool isPhysical, uint localid) - { - return null; } public override void AddPhysicsActorTaint(PhysicsActor prim) -- cgit v1.1 From 49ed68e98c34c752fac407aa9359201e244df19f Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sun, 22 Apr 2012 20:28:12 +0100 Subject: refactor: simply some properties code in BasicPhysicsPlugin --- .../BasicPhysicsPlugin/BasicPhysicsActor.cs | 42 ++++------------------ .../Physics/BasicPhysicsPlugin/BasicPhysicsPrim.cs | 42 ++++------------------ 2 files changed, 12 insertions(+), 72 deletions(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs index b1a3ff9..e43136a 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs @@ -36,13 +36,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin { public class BasicActor : PhysicsActor { - private Vector3 _position; - private Vector3 _velocity; - private Vector3 _acceleration; private Vector3 _size; - private Vector3 m_rotationalVelocity; - private bool flying; - private bool iscolliding; public BasicActor(Vector3 size) { @@ -55,11 +49,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin set { return; } } - public override Vector3 RotationalVelocity - { - get { return m_rotationalVelocity; } - set { m_rotationalVelocity = value; } - } + public override Vector3 RotationalVelocity { get; set; } public override bool SetAlwaysRun { @@ -105,17 +95,9 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin set { return; } } - public override bool Flying - { - get { return flying; } - set { flying = value; } - } + public override bool Flying { get; set; } - public override bool IsColliding - { - get { return iscolliding; } - set { iscolliding = value; } - } + public override bool IsColliding { get; set; } public override bool CollidingGround { @@ -134,11 +116,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin get { return false; } } - public override Vector3 Position - { - get { return _position; } - set { _position = value; } - } + public override Vector3 Position { get; set; } public override Vector3 Size { @@ -206,11 +184,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin get { return Vector3.Zero; } } - public override Vector3 Velocity - { - get { return _velocity; } - set { _velocity = value; } - } + public override Vector3 Velocity { get; set; } public override Vector3 Torque { @@ -230,11 +204,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin set { } } - public override Vector3 Acceleration - { - get { return _acceleration; } - set { _acceleration = value; } - } + public override Vector3 Acceleration { get; set; } public override bool Kinematic { diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPrim.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPrim.cs index ba7fe1e..b89eeed 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPrim.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPrim.cs @@ -36,14 +36,8 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin { public class BasicPhysicsPrim : PhysicsActor { - private Vector3 _position; - private Vector3 _velocity; - private Vector3 _acceleration; private Vector3 _size; private PrimitiveBaseShape _shape; - private Vector3 m_rotationalVelocity; - private bool flying; - private bool iscolliding; public BasicPhysicsPrim( string name, uint localId, Vector3 position, Vector3 size, Quaternion orientation, PrimitiveBaseShape shape) @@ -62,11 +56,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin set { return; } } - public override Vector3 RotationalVelocity - { - get { return m_rotationalVelocity; } - set { m_rotationalVelocity = value; } - } + public override Vector3 RotationalVelocity { get; set; } public override bool SetAlwaysRun { @@ -112,17 +102,9 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin set { return; } } - public override bool Flying - { - get { return flying; } - set { flying = value; } - } + public override bool Flying { get; set; } - public override bool IsColliding - { - get { return iscolliding; } - set { iscolliding = value; } - } + public override bool IsColliding { get; set; } public override bool CollidingGround { @@ -141,11 +123,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin get { return false; } } - public override Vector3 Position - { - get { return _position; } - set { _position = value; } - } + public override Vector3 Position { get; set; } public override Vector3 Size { @@ -213,11 +191,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin get { return Vector3.Zero; } } - public override Vector3 Velocity - { - get { return _velocity; } - set { _velocity = value; } - } + public override Vector3 Velocity { get; set; } public override Vector3 Torque { @@ -233,11 +207,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin public override Quaternion Orientation { get; set; } - public override Vector3 Acceleration - { - get { return _acceleration; } - set { _acceleration = value; } - } + public override Vector3 Acceleration { get; set; } public override bool Kinematic { -- cgit v1.1 From 1926de5a0599051c27c065fb06da3dc536e6784a Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 30 Jun 2012 01:25:27 +0100 Subject: Remove some mono compiler warnings --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPrim.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPrim.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPrim.cs index b89eeed..47d7df3 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPrim.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPrim.cs @@ -37,7 +37,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin public class BasicPhysicsPrim : PhysicsActor { private Vector3 _size; - private PrimitiveBaseShape _shape; +// private PrimitiveBaseShape _shape; public BasicPhysicsPrim( string name, uint localId, Vector3 position, Vector3 size, Quaternion orientation, PrimitiveBaseShape shape) @@ -136,7 +136,8 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin public override PrimitiveBaseShape Shape { - set { _shape = value; } +// set { _shape = value; } + set {} } public override float Mass -- cgit v1.1 From e4cb7af98a122773e84baf9be38b8b34f02e89a4 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 13 Nov 2012 19:26:43 -0800 Subject: Updated all existing AssemblyVersions's to 0.7.5.*. Many DLLs still don't have an AssemblyInfo file. --- OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs index 063eb54..0d7cf38 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs @@ -55,4 +55,4 @@ using System.Runtime.InteropServices; // You can specify all values by your own or you can build default build and revision // numbers with the '*' character (the default): -[assembly : AssemblyVersion("0.6.5.*")] +[assembly : AssemblyVersion("0.7.5.*")] -- cgit v1.1 From aeeaa3a0a9b965dfe5d1111b178234c94de9ba9d Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Wed, 14 Nov 2012 11:09:43 -0800 Subject: Added AssemblyInfos to every dll in the OpenSim.Region namespace. --- OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs index 0d7cf38..fb9cb66 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs @@ -39,7 +39,7 @@ using System.Runtime.InteropServices; [assembly : AssemblyConfiguration("")] [assembly : AssemblyCompany("http://opensimulator.org")] [assembly : AssemblyProduct("BasicPhysicsPlugin")] -[assembly : AssemblyCopyright("Copyright (c) OpenSimulator.org Developers 2007-2009")] +[assembly : AssemblyCopyright("Copyright (c) OpenSimulator.org Developers")] [assembly : AssemblyTrademark("")] [assembly : AssemblyCulture("")] -- cgit v1.1 From eacc2561d14dbe9cba6966e3b32bfd776e044f8a Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Thu, 10 Jan 2013 17:03:19 -0800 Subject: BulletSim: add osGetPhysicsEngineType() LSL function and update the physics engines to return the name that is specified in the INI file ("physics = XXX") as the type of engine. This os function is a little different than the others in that it does not throw an exception of one is not privilaged to use it. It merely returns an empty string. --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | 2 +- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index 7ab2a03..373c7e0 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs @@ -49,7 +49,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin public PhysicsScene GetScene(string sceneIdentifier) { - return new BasicScene(sceneIdentifier); + return new BasicScene(GetName(), sceneIdentifier); } public string GetName() diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs index f5826ed..c4b9117 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs @@ -49,8 +49,10 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin //protected internal string sceneIdentifier; - public BasicScene(string _sceneIdentifier) + public BasicScene(string engineType, string _sceneIdentifier) { + EngineType = engineType; + Name = EngineType + "/" + _sceneIdentifier; //sceneIdentifier = _sceneIdentifier; } -- cgit v1.1 From 1f1da230976451d30d920c237d53c699ba96b9d9 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 5 Feb 2013 00:23:17 +0000 Subject: Bump version and assembly version numbers from 0.7.5 to 0.7.6 This is mostly Bluewall's work but I am also bumping the general version number OpenSimulator 0.7.5 remains in the release candidate stage. I'm doing this because master is significantly adding things that will not be in 0.7.5 This update should not cause issues with existing external binary DLLs because our DLLs do not have strong names and so the exact version match requirement is not in force. --- OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs index fb9cb66..6fd6f7e 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs @@ -55,4 +55,4 @@ using System.Runtime.InteropServices; // You can specify all values by your own or you can build default build and revision // numbers with the '*' character (the default): -[assembly : AssemblyVersion("0.7.5.*")] +[assembly : AssemblyVersion("0.7.6.*")] -- cgit v1.1 From 8960418e7d51a0f861e7b4cb800f007d76862c9c Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 6 Mar 2013 21:37:53 +0000 Subject: Add regression test for presence crossing between regions on the same simulator. Unlike a much earlier commented out version of this test, this is done in synchronous mode. --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs index c4b9117..0816b7b 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs @@ -102,6 +102,8 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin public override float Simulate(float timeStep) { +// Console.WriteLine("Simulating"); + float fps = 0; for (int i = 0; i < _actors.Count; ++i) { @@ -109,8 +111,11 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin Vector3 actorPosition = actor.Position; Vector3 actorVelocity = actor.Velocity; - actorPosition.X += actor.Velocity.X*timeStep; - actorPosition.Y += actor.Velocity.Y*timeStep; +// Console.WriteLine( +// "Processing actor {0}, starting pos {1}, starting vel {2}", i, actorPosition, actorVelocity); + + actorPosition.X += actor.Velocity.X * timeStep; + actorPosition.Y += actor.Velocity.Y * timeStep; if (actor.Position.Y < 0) { -- cgit v1.1 From 42bdf446585007029faf4cd21abd289487f0f797 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 4 Oct 2013 23:33:47 +0100 Subject: Bump OPenSimulator version and assembly versions up to 0.8.0 Dev --- OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs index 6fd6f7e..ffcb01e 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs @@ -55,4 +55,4 @@ using System.Runtime.InteropServices; // You can specify all values by your own or you can build default build and revision // numbers with the '*' character (the default): -[assembly : AssemblyVersion("0.7.6.*")] +[assembly : AssemblyVersion("0.8.0.*")] -- cgit v1.1 From 54cc22976868dcdc0dd0143a0134fba7392af525 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 14 Dec 2013 00:10:32 +0000 Subject: Fix TestSitAndStandWithNoSitTarget NPC and SP tests. These stopped working because current code calculates sit heights based on avatar physics rather than appearance data. Also changed BasicPhysics to not divide Z param of all set sizes by 2 - there's no obvious good reason for this and basicphysics is only used in tests --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs index e43136a..0d17e0e 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs @@ -118,14 +118,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin public override Vector3 Position { get; set; } - public override Vector3 Size - { - get { return _size; } - set { - _size = value; - _size.Z = _size.Z / 2.0f; - } - } + public override Vector3 Size { get; set; } public override PrimitiveBaseShape Shape { -- cgit v1.1 From 998d7009a65def0a4debc9369d35b63611db5b55 Mon Sep 17 00:00:00 2001 From: Oren Hurvitz Date: Tue, 22 Apr 2014 20:04:12 +0300 Subject: Eliminated many warnings --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs | 2 -- 1 file changed, 2 deletions(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs index 0d17e0e..c1a37cc 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs @@ -36,8 +36,6 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin { public class BasicActor : PhysicsActor { - private Vector3 _size; - public BasicActor(Vector3 size) { Size = size; -- cgit v1.1 From 2dbc18054e354a17519f84c0b3294094fae3b5b2 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 29 Apr 2014 19:29:16 +0100 Subject: Add regression test for NPC movement on a variable region. Extends basic physics to allow av movement on a varregion (basic physics is only really useful for regression test purposes). --- .../Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs index 0816b7b..8e40561 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs @@ -46,6 +46,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin private List _actors = new List(); private List _prims = new List(); private float[] _heightMap; + private Vector3 m_regionExtent; //protected internal string sceneIdentifier; @@ -58,6 +59,12 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin public override void Initialise(IMesher meshmerizer, IConfigSource config) { + throw new Exception("Should not be called."); + } + + public override void Initialise(IMesher meshmerizer, IConfigSource config, Vector3 regionExtent) + { + m_regionExtent = regionExtent; } public override void Dispose() {} @@ -121,23 +128,23 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin { actorPosition.Y = 0.1F; } - else if (actor.Position.Y >= Constants.RegionSize) + else if (actor.Position.Y >= m_regionExtent.Y) { - actorPosition.Y = ((int)Constants.RegionSize - 0.1f); + actorPosition.Y = (m_regionExtent.Y - 0.1f); } if (actor.Position.X < 0) { actorPosition.X = 0.1F; } - else if (actor.Position.X >= Constants.RegionSize) + else if (actor.Position.X >= m_regionExtent.X) { - actorPosition.X = ((int)Constants.RegionSize - 0.1f); + actorPosition.X = (m_regionExtent.X - 0.1f); } float terrainHeight = 0; if (_heightMap != null) - terrainHeight = _heightMap[(int)actor.Position.Y * Constants.RegionSize + (int)actor.Position.X]; + terrainHeight = _heightMap[(int)actor.Position.Y * (int)m_regionExtent.Y + (int)actor.Position.X]; float height = terrainHeight + actor.Size.Z; -- cgit v1.1 From 1b156b7fe84bf132b51ff198d6d730708f5930b7 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 22 May 2014 19:18:24 +0100 Subject: Add regression test for in-range chat between neighbouring regions from east to west. --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs | 1 + 1 file changed, 1 insertion(+) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs index 8e40561..f53adcb 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs @@ -147,6 +147,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin terrainHeight = _heightMap[(int)actor.Position.Y * (int)m_regionExtent.Y + (int)actor.Position.X]; float height = terrainHeight + actor.Size.Z; +// Console.WriteLine("height {0}, actorPosition {1}", height, actorPosition); if (actor.Flying) { -- cgit v1.1 From 5450b1b0247bb3907f60f2b3f9b0582903de4f83 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 17 Jun 2014 18:37:15 +0100 Subject: Change assembly versions to 0.8.1 --- OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs index ffcb01e..eba0675 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs @@ -55,4 +55,4 @@ using System.Runtime.InteropServices; // You can specify all values by your own or you can build default build and revision // numbers with the '*' character (the default): -[assembly : AssemblyVersion("0.8.0.*")] +[assembly : AssemblyVersion("0.8.1.*")] -- cgit v1.1 From 7a2c77e7eace93d722ef37595e9fab21d3cd266f Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey Date: Wed, 19 Nov 2014 20:06:56 +0000 Subject: If calling llStopMoveToTarget() on an in-world prim, don't send an unnecessary object update if the prim was not moving to target. This involves making PhysicsActor.PIDActive get as well as set. On physics components that don't implement this (all characters and some phys engines) we return false. --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs | 1 + OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPrim.cs | 1 + 2 files changed, 2 insertions(+) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs index c1a37cc..43fba7b 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs @@ -238,6 +238,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin public override bool PIDActive { + get { return false; } set { return; } } diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPrim.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPrim.cs index 47d7df3..dfe4c19 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPrim.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsPrim.cs @@ -251,6 +251,7 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin public override bool PIDActive { + get { return false; } set { return; } } -- cgit v1.1 From 265fe349e00b3ece59ec02e56f83bb7623e9d962 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 29 Nov 2014 00:12:11 +0000 Subject: Somewhat improve avatar region crossings by properly preserving velocity when avatar enters the new region. This commit addresses the following issues were causing velocity to be set to 0 on the new region, disrupting flight in particular * Full avatar updates contained no velocity information, which does appear to have some effect in testing. * BulletSim was always setting the velocity to 0 for the new BSCharacter. Now, physics engines take a velocity parameter when setting up characters so we can avoid this. This patch applies to both Bullet and ODE. --- OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs index f53adcb..06a205e 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs @@ -80,10 +80,11 @@ namespace OpenSim.Region.Physics.BasicPhysicsPlugin return prim; } - public override PhysicsActor AddAvatar(string avName, Vector3 position, Vector3 size, bool isFlying) + public override PhysicsActor AddAvatar(string avName, Vector3 position, Vector3 velocity, Vector3 size, bool isFlying) { BasicActor act = new BasicActor(size); act.Position = position; + act.Velocity = velocity; act.Flying = isFlying; _actors.Add(act); return act; -- cgit v1.1 From da32512ea449c2de2d4a6069f899fbd4a8bb03fa Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Wed, 29 Apr 2015 18:47:17 -0700 Subject: Updated all occurrences of AssemblyVersion("0.8.1.*") to AssemblyVersion("0.8.2.*") --- OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/Physics/BasicPhysicsPlugin') diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs index eba0675..7d054dd 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs @@ -55,4 +55,4 @@ using System.Runtime.InteropServices; // You can specify all values by your own or you can build default build and revision // numbers with the '*' character (the default): -[assembly : AssemblyVersion("0.8.1.*")] +[assembly : AssemblyVersion("0.8.2.*")] -- cgit v1.1