From f9ea1513d2f9eac0be12e8778abb460873b62563 Mon Sep 17 00:00:00 2001
From: gareth
Date: Tue, 13 Mar 2007 09:43:24 +0000
Subject: Rolled back all but the VS solution
---
src/physics/AssemblyInfo.cs | 52 +++++++---------
src/physics/PhysicsManager.cs | 119 ++----------------------------------
src/physics/plugins/AssemblyInfo.cs | 52 +++++++---------
3 files changed, 46 insertions(+), 177 deletions(-)
(limited to 'src/physics')
diff --git a/src/physics/AssemblyInfo.cs b/src/physics/AssemblyInfo.cs
index 57a8913..1cc3ee1 100644
--- a/src/physics/AssemblyInfo.cs
+++ b/src/physics/AssemblyInfo.cs
@@ -1,31 +1,21 @@
-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("PhysicsManager")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("PhysicsManager")]
-[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.*")]
+using System;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+// ------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Mono Runtime Version: 2.0.50727.42
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+// ------------------------------------------------------------------------------
+
+[assembly: ComVisibleAttribute(false)]
+[assembly: CLSCompliantAttribute(false)]
+[assembly: AssemblyVersionAttribute("0.1.*.191")]
+[assembly: AssemblyTitleAttribute("opensim-physicsmanager")]
+[assembly: AssemblyDescriptionAttribute("Handles physics plugins")]
+[assembly: AssemblyCopyrightAttribute("Copyright © OGS development team 2007")]
+
diff --git a/src/physics/PhysicsManager.cs b/src/physics/PhysicsManager.cs
index 1fee628..e5d5bd6 100644
--- a/src/physics/PhysicsManager.cs
+++ b/src/physics/PhysicsManager.cs
@@ -46,21 +46,15 @@ namespace PhysicsSystem
public PhysicsScene GetPhysicsScene(string engineName)
{
- if( String.IsNullOrEmpty( engineName ) )
- {
- return new NullPhysicsScene();
- }
-
- if(_plugins.ContainsKey(engineName))
+ if(_plugins.ContainsKey(engineName))
{
ServerConsole.MainConsole.Instance.WriteLine("creating "+engineName);
return _plugins[engineName].GetScene();
}
else
{
- string error = String.Format("couldn't find physicsEngine: {0}", engineName);
- ServerConsole.MainConsole.Instance.WriteLine( error );
- throw new ArgumentException( error );
+ ServerConsole.MainConsole.Instance.WriteLine("couldn't find physicsEngine: "+ engineName);
+ return null;
}
}
@@ -114,14 +108,6 @@ namespace PhysicsSystem
public abstract class PhysicsScene
{
- public static PhysicsScene Null
- {
- get
- {
- return new NullPhysicsScene();
- }
- }
-
public abstract PhysicsActor AddAvatar(PhysicsVector position);
public abstract PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size);
@@ -138,49 +124,8 @@ namespace PhysicsSystem
}
}
- public class NullPhysicsScene : PhysicsScene
- {
- private static int m_workIndicator;
-
- public override PhysicsActor AddAvatar(PhysicsVector position)
- {
- ServerConsole.MainConsole.Instance.WriteLine("NullPhysicsScene : AddAvatar({0})", position );
- return PhysicsActor.Null;
- }
-
- public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size)
- {
- ServerConsole.MainConsole.Instance.WriteLine("NullPhysicsScene : AddPrim({0},{1})", position, size );
- return PhysicsActor.Null;
- }
-
- public override void Simulate(float timeStep)
- {
- m_workIndicator = ( m_workIndicator + 1 ) % 10;
-
- ServerConsole.MainConsole.Instance.SetStatus( m_workIndicator.ToString() );
- }
-
- public override void GetResults()
- {
- ServerConsole.MainConsole.Instance.WriteLine("NullPhysicsScene : GetResults()" );
- }
-
- public override void SetTerrain(float[] heightMap)
- {
- ServerConsole.MainConsole.Instance.WriteLine("NullPhysicsScene : SetTerrain({0} items)", heightMap.Length );
- }
-
- public override bool IsThreaded
- {
- get { return false; }
- }
- }
-
public abstract class PhysicsActor
{
- public static readonly PhysicsActor Null = new NullPhysicsActor();
-
public abstract PhysicsVector Position
{
get;
@@ -208,61 +153,7 @@ namespace PhysicsSystem
public abstract void SetMomentum(PhysicsVector momentum);
}
- public class NullPhysicsActor : PhysicsActor
- {
- public override PhysicsVector Position
- {
- get
- {
- return PhysicsVector.Zero;
- }
- set
- {
- return;
- }
- }
-
- public override PhysicsVector Velocity
- {
- get
- {
- return PhysicsVector.Zero;
- }
- set
- {
- return;
- }
- }
-
- public override PhysicsVector Acceleration
- {
- get { return PhysicsVector.Zero; }
- }
-
- public override bool Flying
- {
- get
- {
- return false;
- }
- set
- {
- return;
- }
- }
-
- public override void AddForce(PhysicsVector force)
- {
- return;
- }
-
- public override void SetMomentum(PhysicsVector momentum)
- {
- return;
- }
- }
-
- public class PhysicsVector
+ public class PhysicsVector
{
public float X;
public float Y;
@@ -279,7 +170,5 @@ namespace PhysicsSystem
Y = y;
Z = z;
}
-
- public static readonly PhysicsVector Zero = new PhysicsVector(0f, 0f, 0f);
}
}
diff --git a/src/physics/plugins/AssemblyInfo.cs b/src/physics/plugins/AssemblyInfo.cs
index 0c9c06c..2c12da4 100644
--- a/src/physics/plugins/AssemblyInfo.cs
+++ b/src/physics/plugins/AssemblyInfo.cs
@@ -1,31 +1,21 @@
-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.*")]
+using System;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+// ------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Mono Runtime Version: 2.0.50727.42
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+// ------------------------------------------------------------------------------
+
+[assembly: ComVisibleAttribute(false)]
+[assembly: CLSCompliantAttribute(false)]
+[assembly: AssemblyVersionAttribute("0.1.*.191")]
+[assembly: AssemblyTitleAttribute("opensim-physicsmanager-physx")]
+[assembly: AssemblyDescriptionAttribute("PhysX plugin for OpenSim")]
+[assembly: AssemblyCopyrightAttribute("Copyright © OGS development team 2007")]
+
--
cgit v1.1