mirror of
https://github.com/opensim/opensim.git
synced 2026-08-12 20:41:29 +08:00
* Optimized usings (the 'LL ate my scripts' commit)
* added some licensing info
This commit is contained in:
@@ -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.
|
||||
//
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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.
|
||||
//
|
||||
|
||||
@@ -25,15 +25,13 @@
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Axiom.MathLib;
|
||||
|
||||
namespace OpenSim.Physics.Manager
|
||||
{
|
||||
public delegate void PositionUpdate(PhysicsVector position);
|
||||
public delegate void VelocityUpdate(PhysicsVector velocity);
|
||||
public delegate void OrientationUpdate(Axiom.MathLib.Quaternion orientation);
|
||||
public delegate void OrientationUpdate(Quaternion orientation);
|
||||
|
||||
public abstract class PhysicsActor
|
||||
{
|
||||
@@ -66,7 +64,7 @@ namespace OpenSim.Physics.Manager
|
||||
get;
|
||||
}
|
||||
|
||||
public abstract Axiom.MathLib.Quaternion Orientation
|
||||
public abstract Quaternion Orientation
|
||||
{
|
||||
get;
|
||||
set;
|
||||
@@ -115,11 +113,11 @@ namespace OpenSim.Physics.Manager
|
||||
}
|
||||
}
|
||||
|
||||
public override Axiom.MathLib.Quaternion Orientation
|
||||
public override Quaternion Orientation
|
||||
{
|
||||
get
|
||||
{
|
||||
return Axiom.MathLib.Quaternion.Identity;
|
||||
return Quaternion.Identity;
|
||||
}
|
||||
set
|
||||
{
|
||||
|
||||
@@ -27,10 +27,8 @@
|
||||
*/
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using Axiom.MathLib;
|
||||
using OpenSim.Framework.Console;
|
||||
|
||||
namespace OpenSim.Physics.Manager
|
||||
@@ -56,19 +54,19 @@ namespace OpenSim.Physics.Manager
|
||||
|
||||
if(_plugins.ContainsKey(engineName))
|
||||
{
|
||||
OpenSim.Framework.Console.MainLog.Instance.WriteLine(LogPriority.LOW,"creating "+engineName);
|
||||
MainLog.Instance.WriteLine(LogPriority.LOW,"creating "+engineName);
|
||||
return _plugins[engineName].GetScene();
|
||||
}
|
||||
else
|
||||
{
|
||||
OpenSim.Framework.Console.MainLog.Instance.WriteLine(LogPriority.MEDIUM,"couldn't find physicsEngine: {0}",engineName);
|
||||
MainLog.Instance.WriteLine(LogPriority.MEDIUM,"couldn't find physicsEngine: {0}",engineName);
|
||||
throw new ArgumentException(String.Format("couldn't find physicsEngine: {0}",engineName));
|
||||
}
|
||||
}
|
||||
|
||||
public void LoadPlugins()
|
||||
{
|
||||
string path = Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory ,"Physics");
|
||||
string path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory ,"Physics");
|
||||
string[] pluginFiles = Directory.GetFiles(path, "*.dll");
|
||||
|
||||
|
||||
|
||||
@@ -25,9 +25,6 @@
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using OpenSim.Framework.Console;
|
||||
|
||||
namespace OpenSim.Physics.Manager
|
||||
@@ -67,7 +64,7 @@ namespace OpenSim.Physics.Manager
|
||||
|
||||
public override PhysicsActor AddAvatar(PhysicsVector position)
|
||||
{
|
||||
OpenSim.Framework.Console.MainLog.Instance.Verbose("NullPhysicsScene : AddAvatar({0})", position);
|
||||
MainLog.Instance.Verbose("NullPhysicsScene : AddAvatar({0})", position);
|
||||
return PhysicsActor.Null;
|
||||
}
|
||||
|
||||
@@ -78,7 +75,7 @@ namespace OpenSim.Physics.Manager
|
||||
|
||||
public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size)
|
||||
{
|
||||
OpenSim.Framework.Console.MainLog.Instance.Verbose("NullPhysicsScene : AddPrim({0},{1})", position, size);
|
||||
MainLog.Instance.Verbose("NullPhysicsScene : AddPrim({0},{1})", position, size);
|
||||
return PhysicsActor.Null;
|
||||
}
|
||||
|
||||
@@ -91,12 +88,12 @@ namespace OpenSim.Physics.Manager
|
||||
|
||||
public override void GetResults()
|
||||
{
|
||||
OpenSim.Framework.Console.MainLog.Instance.Verbose("NullPhysicsScene : GetResults()");
|
||||
MainLog.Instance.Verbose("NullPhysicsScene : GetResults()");
|
||||
}
|
||||
|
||||
public override void SetTerrain(float[] heightMap)
|
||||
{
|
||||
OpenSim.Framework.Console.MainLog.Instance.Verbose("NullPhysicsScene : SetTerrain({0} items)", heightMap.Length);
|
||||
MainLog.Instance.Verbose("NullPhysicsScene : SetTerrain({0} items)", heightMap.Length);
|
||||
}
|
||||
|
||||
public override void DeleteTerrain()
|
||||
|
||||
@@ -25,10 +25,6 @@
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace OpenSim.Physics.Manager
|
||||
{
|
||||
public class PhysicsVector
|
||||
|
||||
@@ -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.
|
||||
//
|
||||
|
||||
@@ -27,8 +27,9 @@
|
||||
*/
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using OpenSim.Physics.Manager;
|
||||
using Axiom.MathLib;
|
||||
using Ode.NET;
|
||||
using OpenSim.Physics.Manager;
|
||||
|
||||
namespace OpenSim.Region.Physics.OdePlugin
|
||||
{
|
||||
@@ -194,13 +195,13 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||
LandGeom = d.CreateHeightfield(space, HeightmapData, 1);
|
||||
d.Matrix3 R = new d.Matrix3();
|
||||
|
||||
Axiom.MathLib.Quaternion q1 =Axiom.MathLib.Quaternion.FromAngleAxis(1.5707f, new Axiom.MathLib.Vector3(1,0,0));
|
||||
Axiom.MathLib.Quaternion q2 =Axiom.MathLib.Quaternion.FromAngleAxis(1.5707f, new Axiom.MathLib.Vector3(0,1,0));
|
||||
Quaternion q1 =Quaternion.FromAngleAxis(1.5707f, new Vector3(1,0,0));
|
||||
Quaternion q2 =Quaternion.FromAngleAxis(1.5707f, new Vector3(0,1,0));
|
||||
//Axiom.MathLib.Quaternion q3 = Axiom.MathLib.Quaternion.FromAngleAxis(3.14f, new Axiom.MathLib.Vector3(0, 0, 1));
|
||||
|
||||
q1 = q1 * q2;
|
||||
//q1 = q1 * q3;
|
||||
Axiom.MathLib.Vector3 v3 = new Axiom.MathLib.Vector3();
|
||||
Vector3 v3 = new Vector3();
|
||||
float angle = 0;
|
||||
q1.ToAngleAxis(ref angle, ref v3);
|
||||
|
||||
@@ -287,11 +288,11 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||
}
|
||||
}
|
||||
|
||||
public override Axiom.MathLib.Quaternion Orientation
|
||||
public override Quaternion Orientation
|
||||
{
|
||||
get
|
||||
{
|
||||
return Axiom.MathLib.Quaternion.Identity;
|
||||
return Quaternion.Identity;
|
||||
}
|
||||
set
|
||||
{
|
||||
@@ -414,11 +415,11 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||
}
|
||||
}
|
||||
|
||||
public override Axiom.MathLib.Quaternion Orientation
|
||||
public override Quaternion Orientation
|
||||
{
|
||||
get
|
||||
{
|
||||
Axiom.MathLib.Quaternion res = new Axiom.MathLib.Quaternion();
|
||||
Quaternion res = new Quaternion();
|
||||
return res;
|
||||
}
|
||||
set
|
||||
|
||||
@@ -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.
|
||||
//
|
||||
|
||||
@@ -29,6 +29,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using OpenSim.Physics.Manager;
|
||||
using PhysXWrapper;
|
||||
using Quaternion=Axiom.MathLib.Quaternion;
|
||||
|
||||
namespace OpenSim.Region.Physics.PhysXPlugin
|
||||
{
|
||||
@@ -240,11 +241,11 @@ namespace OpenSim.Region.Physics.PhysXPlugin
|
||||
}
|
||||
}
|
||||
|
||||
public override Axiom.MathLib.Quaternion Orientation
|
||||
public override Quaternion Orientation
|
||||
{
|
||||
get
|
||||
{
|
||||
return Axiom.MathLib.Quaternion.Identity;
|
||||
return Quaternion.Identity;
|
||||
}
|
||||
set
|
||||
{
|
||||
@@ -377,11 +378,11 @@ namespace OpenSim.Region.Physics.PhysXPlugin
|
||||
}
|
||||
}
|
||||
|
||||
public override Axiom.MathLib.Quaternion Orientation
|
||||
public override Quaternion Orientation
|
||||
{
|
||||
get
|
||||
{
|
||||
Axiom.MathLib.Quaternion res = new Axiom.MathLib.Quaternion();
|
||||
Quaternion res = new Quaternion();
|
||||
PhysXWrapper.Quaternion quat = this._prim.GetOrientation();
|
||||
res.w = quat.W;
|
||||
res.x = quat.X;
|
||||
|
||||
Reference in New Issue
Block a user