diff options
author | Adam Frisby | 2007-07-11 08:02:47 +0000 |
---|---|---|
committer | Adam Frisby | 2007-07-11 08:02:47 +0000 |
commit | 5c7ffdde0b9642a42e8f5987e06eb01220ff7776 (patch) | |
tree | 4b825dc642cb6eb9a060e54bf8d69288fbee4904 /OpenSim/OpenSim.Physics/Manager | |
parent | Who would have known that the only way of specifying utf-8 without preamble, ... (diff) | |
download | opensim-SC_OLD-5c7ffdde0b9642a42e8f5987e06eb01220ff7776.zip opensim-SC_OLD-5c7ffdde0b9642a42e8f5987e06eb01220ff7776.tar.gz opensim-SC_OLD-5c7ffdde0b9642a42e8f5987e06eb01220ff7776.tar.bz2 opensim-SC_OLD-5c7ffdde0b9642a42e8f5987e06eb01220ff7776.tar.xz |
* Wiping trunk in prep for Sugilite
Diffstat (limited to '')
-rw-r--r-- | OpenSim/OpenSim.Physics/Manager/AssemblyInfo.cs | 58 | ||||
-rw-r--r-- | OpenSim/OpenSim.Physics/Manager/OpenSim.Physics.Manager.csproj | 112 | ||||
-rw-r--r-- | OpenSim/OpenSim.Physics/Manager/OpenSim.Physics.Manager.dll.build | 47 | ||||
-rw-r--r-- | OpenSim/OpenSim.Physics/Manager/PhysicsActor.cs | 162 | ||||
-rw-r--r-- | OpenSim/OpenSim.Physics/Manager/PhysicsManager.cs | 117 | ||||
-rw-r--r-- | OpenSim/OpenSim.Physics/Manager/PhysicsScene.cs | 114 | ||||
-rw-r--r-- | OpenSim/OpenSim.Physics/Manager/PhysicsVector.cs | 55 |
7 files changed, 0 insertions, 665 deletions
diff --git a/OpenSim/OpenSim.Physics/Manager/AssemblyInfo.cs b/OpenSim/OpenSim.Physics/Manager/AssemblyInfo.cs deleted file mode 100644 index 132f64a..0000000 --- a/OpenSim/OpenSim.Physics/Manager/AssemblyInfo.cs +++ /dev/null | |||
@@ -1,58 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | * | ||
27 | */ | ||
28 | using System.Reflection; | ||
29 | using System.Runtime.CompilerServices; | ||
30 | using System.Runtime.InteropServices; | ||
31 | |||
32 | // Information about this assembly is defined by the following | ||
33 | // attributes. | ||
34 | // | ||
35 | // change them to the information which is associated with the assembly | ||
36 | // you compile. | ||
37 | |||
38 | [assembly: AssemblyTitle("PhysicsManager")] | ||
39 | [assembly: AssemblyDescription("")] | ||
40 | [assembly: AssemblyConfiguration("")] | ||
41 | [assembly: AssemblyCompany("")] | ||
42 | [assembly: AssemblyProduct("PhysicsManager")] | ||
43 | [assembly: AssemblyCopyright("")] | ||
44 | [assembly: AssemblyTrademark("")] | ||
45 | [assembly: AssemblyCulture("")] | ||
46 | |||
47 | // This sets the default COM visibility of types in the assembly to invisible. | ||
48 | // If you need to expose a type to COM, use [ComVisible(true)] on that type. | ||
49 | [assembly: ComVisible(false)] | ||
50 | |||
51 | // The assembly version has following format : | ||
52 | // | ||
53 | // Major.Minor.Build.Revision | ||
54 | // | ||
55 | // You can specify all values by your own or you can build default build and revision | ||
56 | // numbers with the '*' character (the default): | ||
57 | |||
58 | [assembly: AssemblyVersion("1.0.*")] | ||
diff --git a/OpenSim/OpenSim.Physics/Manager/OpenSim.Physics.Manager.csproj b/OpenSim/OpenSim.Physics/Manager/OpenSim.Physics.Manager.csproj deleted file mode 100644 index 347a649..0000000 --- a/OpenSim/OpenSim.Physics/Manager/OpenSim.Physics.Manager.csproj +++ /dev/null | |||
@@ -1,112 +0,0 @@ | |||
1 | <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
2 | <PropertyGroup> | ||
3 | <ProjectType>Local</ProjectType> | ||
4 | <ProductVersion>8.0.50727</ProductVersion> | ||
5 | <SchemaVersion>2.0</SchemaVersion> | ||
6 | <ProjectGuid>{8BE16150-0000-0000-0000-000000000000}</ProjectGuid> | ||
7 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
8 | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
9 | <ApplicationIcon></ApplicationIcon> | ||
10 | <AssemblyKeyContainerName> | ||
11 | </AssemblyKeyContainerName> | ||
12 | <AssemblyName>OpenSim.Physics.Manager</AssemblyName> | ||
13 | <DefaultClientScript>JScript</DefaultClientScript> | ||
14 | <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout> | ||
15 | <DefaultTargetSchema>IE50</DefaultTargetSchema> | ||
16 | <DelaySign>false</DelaySign> | ||
17 | <OutputType>Library</OutputType> | ||
18 | <AppDesignerFolder></AppDesignerFolder> | ||
19 | <RootNamespace>OpenSim.Physics.Manager</RootNamespace> | ||
20 | <StartupObject></StartupObject> | ||
21 | <FileUpgradeFlags> | ||
22 | </FileUpgradeFlags> | ||
23 | </PropertyGroup> | ||
24 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
25 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> | ||
26 | <BaseAddress>285212672</BaseAddress> | ||
27 | <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> | ||
28 | <ConfigurationOverrideFile> | ||
29 | </ConfigurationOverrideFile> | ||
30 | <DefineConstants>TRACE;DEBUG</DefineConstants> | ||
31 | <DocumentationFile></DocumentationFile> | ||
32 | <DebugSymbols>True</DebugSymbols> | ||
33 | <FileAlignment>4096</FileAlignment> | ||
34 | <Optimize>False</Optimize> | ||
35 | <OutputPath>..\..\..\bin\</OutputPath> | ||
36 | <RegisterForComInterop>False</RegisterForComInterop> | ||
37 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | ||
38 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | ||
39 | <WarningLevel>4</WarningLevel> | ||
40 | <NoWarn></NoWarn> | ||
41 | </PropertyGroup> | ||
42 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
43 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> | ||
44 | <BaseAddress>285212672</BaseAddress> | ||
45 | <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow> | ||
46 | <ConfigurationOverrideFile> | ||
47 | </ConfigurationOverrideFile> | ||
48 | <DefineConstants>TRACE</DefineConstants> | ||
49 | <DocumentationFile></DocumentationFile> | ||
50 | <DebugSymbols>False</DebugSymbols> | ||
51 | <FileAlignment>4096</FileAlignment> | ||
52 | <Optimize>True</Optimize> | ||
53 | <OutputPath>..\..\..\bin\</OutputPath> | ||
54 | <RegisterForComInterop>False</RegisterForComInterop> | ||
55 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | ||
56 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | ||
57 | <WarningLevel>4</WarningLevel> | ||
58 | <NoWarn></NoWarn> | ||
59 | </PropertyGroup> | ||
60 | <ItemGroup> | ||
61 | <Reference Include="Axiom.MathLib.dll" > | ||
62 | <HintPath>..\..\..\bin\Axiom.MathLib.dll</HintPath> | ||
63 | <Private>False</Private> | ||
64 | </Reference> | ||
65 | <Reference Include="System" > | ||
66 | <HintPath>System.dll</HintPath> | ||
67 | <Private>False</Private> | ||
68 | </Reference> | ||
69 | <Reference Include="System.Xml" > | ||
70 | <HintPath>System.Xml.dll</HintPath> | ||
71 | <Private>False</Private> | ||
72 | </Reference> | ||
73 | </ItemGroup> | ||
74 | <ItemGroup> | ||
75 | <ProjectReference Include="..\..\..\Common\OpenSim.Framework\OpenSim.Framework.csproj"> | ||
76 | <Name>OpenSim.Framework</Name> | ||
77 | <Project>{8ACA2445-0000-0000-0000-000000000000}</Project> | ||
78 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> | ||
79 | <Private>False</Private> | ||
80 | </ProjectReference> | ||
81 | <ProjectReference Include="..\..\..\Common\OpenSim.Framework.Console\OpenSim.Framework.Console.csproj"> | ||
82 | <Name>OpenSim.Framework.Console</Name> | ||
83 | <Project>{A7CD0630-0000-0000-0000-000000000000}</Project> | ||
84 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> | ||
85 | <Private>False</Private> | ||
86 | </ProjectReference> | ||
87 | </ItemGroup> | ||
88 | <ItemGroup> | ||
89 | <Compile Include="AssemblyInfo.cs"> | ||
90 | <SubType>Code</SubType> | ||
91 | </Compile> | ||
92 | <Compile Include="PhysicsActor.cs"> | ||
93 | <SubType>Code</SubType> | ||
94 | </Compile> | ||
95 | <Compile Include="PhysicsManager.cs"> | ||
96 | <SubType>Code</SubType> | ||
97 | </Compile> | ||
98 | <Compile Include="PhysicsScene.cs"> | ||
99 | <SubType>Code</SubType> | ||
100 | </Compile> | ||
101 | <Compile Include="PhysicsVector.cs"> | ||
102 | <SubType>Code</SubType> | ||
103 | </Compile> | ||
104 | </ItemGroup> | ||
105 | <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" /> | ||
106 | <PropertyGroup> | ||
107 | <PreBuildEvent> | ||
108 | </PreBuildEvent> | ||
109 | <PostBuildEvent> | ||
110 | </PostBuildEvent> | ||
111 | </PropertyGroup> | ||
112 | </Project> | ||
diff --git a/OpenSim/OpenSim.Physics/Manager/OpenSim.Physics.Manager.dll.build b/OpenSim/OpenSim.Physics/Manager/OpenSim.Physics.Manager.dll.build deleted file mode 100644 index fc3e1e6..0000000 --- a/OpenSim/OpenSim.Physics/Manager/OpenSim.Physics.Manager.dll.build +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | <?xml version="1.0" ?> | ||
2 | <project name="OpenSim.Physics.Manager" default="build"> | ||
3 | <target name="build"> | ||
4 | <echo message="Build Directory is ${project::get-base-directory()}/${build.dir}" /> | ||
5 | <mkdir dir="${project::get-base-directory()}/${build.dir}" /> | ||
6 | <copy todir="${project::get-base-directory()}/${build.dir}"> | ||
7 | <fileset basedir="${project::get-base-directory()}"> | ||
8 | </fileset> | ||
9 | </copy> | ||
10 | <csc target="library" debug="${build.debug}" unsafe="False" define="TRACE;DEBUG" output="${project::get-base-directory()}/${build.dir}/${project::get-name()}.dll"> | ||
11 | <resources prefix="OpenSim.Physics.Manager" dynamicprefix="true" > | ||
12 | </resources> | ||
13 | <sources failonempty="true"> | ||
14 | <include name="AssemblyInfo.cs" /> | ||
15 | <include name="PhysicsActor.cs" /> | ||
16 | <include name="PhysicsManager.cs" /> | ||
17 | <include name="PhysicsScene.cs" /> | ||
18 | <include name="PhysicsVector.cs" /> | ||
19 | </sources> | ||
20 | <references basedir="${project::get-base-directory()}"> | ||
21 | <lib> | ||
22 | <include name="${project::get-base-directory()}" /> | ||
23 | <include name="${project::get-base-directory()}/${build.dir}" /> | ||
24 | </lib> | ||
25 | <include name="../../../bin/Axiom.MathLib.dll" /> | ||
26 | <include name="../../../bin/OpenSim.Framework.dll" /> | ||
27 | <include name="../../../bin/OpenSim.Framework.Console.dll" /> | ||
28 | <include name="System.dll" /> | ||
29 | <include name="System.Xml.dll" /> | ||
30 | </references> | ||
31 | </csc> | ||
32 | <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../../bin/" /> | ||
33 | <mkdir dir="${project::get-base-directory()}/../../../bin/"/> | ||
34 | <copy todir="${project::get-base-directory()}/../../../bin/"> | ||
35 | <fileset basedir="${project::get-base-directory()}/${build.dir}/" > | ||
36 | <include name="*.dll"/> | ||
37 | <include name="*.exe"/> | ||
38 | </fileset> | ||
39 | </copy> | ||
40 | </target> | ||
41 | <target name="clean"> | ||
42 | <delete dir="${bin.dir}" failonerror="false" /> | ||
43 | <delete dir="${obj.dir}" failonerror="false" /> | ||
44 | </target> | ||
45 | <target name="doc" description="Creates documentation."> | ||
46 | </target> | ||
47 | </project> | ||
diff --git a/OpenSim/OpenSim.Physics/Manager/PhysicsActor.cs b/OpenSim/OpenSim.Physics/Manager/PhysicsActor.cs deleted file mode 100644 index 9ff94c4..0000000 --- a/OpenSim/OpenSim.Physics/Manager/PhysicsActor.cs +++ /dev/null | |||
@@ -1,162 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | * | ||
27 | */ | ||
28 | |||
29 | using System; | ||
30 | using System.Collections.Generic; | ||
31 | using System.Text; | ||
32 | |||
33 | namespace OpenSim.Physics.Manager | ||
34 | { | ||
35 | public abstract class PhysicsActor | ||
36 | { | ||
37 | public static PhysicsActor Null | ||
38 | { | ||
39 | get | ||
40 | { | ||
41 | return new NullPhysicsActor(); | ||
42 | } | ||
43 | } | ||
44 | |||
45 | public abstract PhysicsVector Position | ||
46 | { | ||
47 | get; | ||
48 | set; | ||
49 | } | ||
50 | |||
51 | public abstract PhysicsVector Velocity | ||
52 | { | ||
53 | get; | ||
54 | set; | ||
55 | } | ||
56 | |||
57 | public abstract PhysicsVector Acceleration | ||
58 | { | ||
59 | get; | ||
60 | } | ||
61 | |||
62 | public abstract Axiom.MathLib.Quaternion Orientation | ||
63 | { | ||
64 | get; | ||
65 | set; | ||
66 | } | ||
67 | |||
68 | public abstract bool Flying | ||
69 | { | ||
70 | get; | ||
71 | set; | ||
72 | } | ||
73 | |||
74 | public abstract bool Kinematic | ||
75 | { | ||
76 | get; | ||
77 | set; | ||
78 | } | ||
79 | |||
80 | public abstract void AddForce(PhysicsVector force); | ||
81 | |||
82 | public abstract void SetMomentum(PhysicsVector momentum); | ||
83 | } | ||
84 | |||
85 | public class NullPhysicsActor : PhysicsActor | ||
86 | { | ||
87 | public override PhysicsVector Position | ||
88 | { | ||
89 | get | ||
90 | { | ||
91 | return PhysicsVector.Zero; | ||
92 | } | ||
93 | set | ||
94 | { | ||
95 | return; | ||
96 | } | ||
97 | } | ||
98 | |||
99 | public override PhysicsVector Velocity | ||
100 | { | ||
101 | get | ||
102 | { | ||
103 | return PhysicsVector.Zero; | ||
104 | } | ||
105 | set | ||
106 | { | ||
107 | return; | ||
108 | } | ||
109 | } | ||
110 | |||
111 | public override Axiom.MathLib.Quaternion Orientation | ||
112 | { | ||
113 | get | ||
114 | { | ||
115 | return Axiom.MathLib.Quaternion.Identity; | ||
116 | } | ||
117 | set | ||
118 | { | ||
119 | |||
120 | } | ||
121 | } | ||
122 | |||
123 | public override PhysicsVector Acceleration | ||
124 | { | ||
125 | get { return PhysicsVector.Zero; } | ||
126 | } | ||
127 | |||
128 | public override bool Flying | ||
129 | { | ||
130 | get | ||
131 | { | ||
132 | return false; | ||
133 | } | ||
134 | set | ||
135 | { | ||
136 | return; | ||
137 | } | ||
138 | } | ||
139 | |||
140 | public override bool Kinematic | ||
141 | { | ||
142 | get | ||
143 | { | ||
144 | return true; | ||
145 | } | ||
146 | set | ||
147 | { | ||
148 | return; | ||
149 | } | ||
150 | } | ||
151 | |||
152 | public override void AddForce(PhysicsVector force) | ||
153 | { | ||
154 | return; | ||
155 | } | ||
156 | |||
157 | public override void SetMomentum(PhysicsVector momentum) | ||
158 | { | ||
159 | return; | ||
160 | } | ||
161 | } | ||
162 | } | ||
diff --git a/OpenSim/OpenSim.Physics/Manager/PhysicsManager.cs b/OpenSim/OpenSim.Physics/Manager/PhysicsManager.cs deleted file mode 100644 index f85c098..0000000 --- a/OpenSim/OpenSim.Physics/Manager/PhysicsManager.cs +++ /dev/null | |||
@@ -1,117 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | * | ||
27 | */ | ||
28 | using System; | ||
29 | using System.Collections.Generic; | ||
30 | using System.Collections; | ||
31 | using System.IO; | ||
32 | using System.Reflection; | ||
33 | using Axiom.MathLib; | ||
34 | using OpenSim.Framework.Console; | ||
35 | |||
36 | namespace OpenSim.Physics.Manager | ||
37 | { | ||
38 | /// <summary> | ||
39 | /// Description of MyClass. | ||
40 | /// </summary> | ||
41 | public class PhysicsManager | ||
42 | { | ||
43 | private Dictionary<string, IPhysicsPlugin> _plugins=new Dictionary<string, IPhysicsPlugin>(); | ||
44 | |||
45 | public PhysicsManager() | ||
46 | { | ||
47 | |||
48 | } | ||
49 | |||
50 | public PhysicsScene GetPhysicsScene(string engineName) | ||
51 | { | ||
52 | if (String.IsNullOrEmpty(engineName)) | ||
53 | { | ||
54 | return new NullPhysicsScene(); | ||
55 | } | ||
56 | |||
57 | if(_plugins.ContainsKey(engineName)) | ||
58 | { | ||
59 | MainConsole.Instance.Notice("creating "+engineName); | ||
60 | return _plugins[engineName].GetScene(); | ||
61 | } | ||
62 | else | ||
63 | { | ||
64 | MainConsole.Instance.Warn("couldn't find physicsEngine: {0}",engineName); | ||
65 | throw new ArgumentException(String.Format("couldn't find physicsEngine: {0}",engineName)); | ||
66 | } | ||
67 | } | ||
68 | |||
69 | public void LoadPlugins() | ||
70 | { | ||
71 | string path = Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory ,"Physics"); | ||
72 | string[] pluginFiles = Directory.GetFiles(path, "*.dll"); | ||
73 | |||
74 | |||
75 | for(int i= 0; i<pluginFiles.Length; i++) | ||
76 | { | ||
77 | this.AddPlugin(pluginFiles[i]); | ||
78 | } | ||
79 | } | ||
80 | |||
81 | private void AddPlugin(string FileName) | ||
82 | { | ||
83 | Assembly pluginAssembly = Assembly.LoadFrom(FileName); | ||
84 | |||
85 | foreach (Type pluginType in pluginAssembly.GetTypes()) | ||
86 | { | ||
87 | if (pluginType.IsPublic) | ||
88 | { | ||
89 | if (!pluginType.IsAbstract) | ||
90 | { | ||
91 | Type typeInterface = pluginType.GetInterface("IPhysicsPlugin", true); | ||
92 | |||
93 | if (typeInterface != null) | ||
94 | { | ||
95 | IPhysicsPlugin plug = (IPhysicsPlugin)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); | ||
96 | plug.Init(); | ||
97 | this._plugins.Add(plug.GetName(),plug); | ||
98 | |||
99 | } | ||
100 | |||
101 | typeInterface = null; | ||
102 | } | ||
103 | } | ||
104 | } | ||
105 | |||
106 | pluginAssembly = null; | ||
107 | } | ||
108 | } | ||
109 | |||
110 | public interface IPhysicsPlugin | ||
111 | { | ||
112 | bool Init(); | ||
113 | PhysicsScene GetScene(); | ||
114 | string GetName(); | ||
115 | void Dispose(); | ||
116 | } | ||
117 | } | ||
diff --git a/OpenSim/OpenSim.Physics/Manager/PhysicsScene.cs b/OpenSim/OpenSim.Physics/Manager/PhysicsScene.cs deleted file mode 100644 index 8128457..0000000 --- a/OpenSim/OpenSim.Physics/Manager/PhysicsScene.cs +++ /dev/null | |||
@@ -1,114 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | * | ||
27 | */ | ||
28 | |||
29 | using System; | ||
30 | using System.Collections.Generic; | ||
31 | using System.Text; | ||
32 | using OpenSim.Framework.Console; | ||
33 | |||
34 | namespace OpenSim.Physics.Manager | ||
35 | { | ||
36 | public abstract class PhysicsScene | ||
37 | { | ||
38 | public static PhysicsScene Null | ||
39 | { | ||
40 | get | ||
41 | { | ||
42 | return new NullPhysicsScene(); | ||
43 | } | ||
44 | } | ||
45 | |||
46 | public abstract PhysicsActor AddAvatar(PhysicsVector position); | ||
47 | |||
48 | public abstract void RemoveAvatar(PhysicsActor actor); | ||
49 | |||
50 | public abstract PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size); | ||
51 | |||
52 | public abstract void Simulate(float timeStep); | ||
53 | |||
54 | public abstract void GetResults(); | ||
55 | |||
56 | public abstract void SetTerrain(float[] heightMap); | ||
57 | |||
58 | public abstract void DeleteTerrain(); | ||
59 | |||
60 | public abstract bool IsThreaded | ||
61 | { | ||
62 | get; | ||
63 | } | ||
64 | } | ||
65 | |||
66 | public class NullPhysicsScene : PhysicsScene | ||
67 | { | ||
68 | private static int m_workIndicator; | ||
69 | |||
70 | public override PhysicsActor AddAvatar(PhysicsVector position) | ||
71 | { | ||
72 | MainConsole.Instance.Verbose("NullPhysicsScene : AddAvatar({0})", position); | ||
73 | return PhysicsActor.Null; | ||
74 | } | ||
75 | |||
76 | public override void RemoveAvatar(PhysicsActor actor) | ||
77 | { | ||
78 | |||
79 | } | ||
80 | |||
81 | public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size) | ||
82 | { | ||
83 | MainConsole.Instance.Verbose( "NullPhysicsScene : AddPrim({0},{1})", position, size); | ||
84 | return PhysicsActor.Null; | ||
85 | } | ||
86 | |||
87 | public override void Simulate(float timeStep) | ||
88 | { | ||
89 | m_workIndicator = (m_workIndicator + 1) % 10; | ||
90 | |||
91 | //OpenSim.Framework.Console.MainConsole.Instance.SetStatus(m_workIndicator.ToString()); | ||
92 | } | ||
93 | |||
94 | public override void GetResults() | ||
95 | { | ||
96 | MainConsole.Instance.Verbose( "NullPhysicsScene : GetResults()"); | ||
97 | } | ||
98 | |||
99 | public override void SetTerrain(float[] heightMap) | ||
100 | { | ||
101 | MainConsole.Instance.Verbose( "NullPhysicsScene : SetTerrain({0} items)", heightMap.Length); | ||
102 | } | ||
103 | |||
104 | public override void DeleteTerrain() | ||
105 | { | ||
106 | |||
107 | } | ||
108 | |||
109 | public override bool IsThreaded | ||
110 | { | ||
111 | get { return false; } | ||
112 | } | ||
113 | } | ||
114 | } | ||
diff --git a/OpenSim/OpenSim.Physics/Manager/PhysicsVector.cs b/OpenSim/OpenSim.Physics/Manager/PhysicsVector.cs deleted file mode 100644 index 8f3514f..0000000 --- a/OpenSim/OpenSim.Physics/Manager/PhysicsVector.cs +++ /dev/null | |||
@@ -1,55 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://www.openmetaverse.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | * | ||
27 | */ | ||
28 | |||
29 | using System; | ||
30 | using System.Collections.Generic; | ||
31 | using System.Text; | ||
32 | |||
33 | namespace OpenSim.Physics.Manager | ||
34 | { | ||
35 | public class PhysicsVector | ||
36 | { | ||
37 | public float X; | ||
38 | public float Y; | ||
39 | public float Z; | ||
40 | |||
41 | public PhysicsVector() | ||
42 | { | ||
43 | |||
44 | } | ||
45 | |||
46 | public PhysicsVector(float x, float y, float z) | ||
47 | { | ||
48 | X = x; | ||
49 | Y = y; | ||
50 | Z = z; | ||
51 | } | ||
52 | |||
53 | public static readonly PhysicsVector Zero = new PhysicsVector(0f, 0f, 0f); | ||
54 | } | ||
55 | } | ||