diff options
author | gareth | 2007-03-22 10:11:15 +0000 |
---|---|---|
committer | gareth | 2007-03-22 10:11:15 +0000 |
commit | 7daa3955bc3a1918e40962851f9e8d38597a245e (patch) | |
tree | bee3e1372a7eed0c1b220a8a49f7bee7d29a6b91 /src/physics/plugins | |
parent | Load XML for neighbourinfo from grid (diff) | |
download | opensim-SC_OLD-7daa3955bc3a1918e40962851f9e8d38597a245e.zip opensim-SC_OLD-7daa3955bc3a1918e40962851f9e8d38597a245e.tar.gz opensim-SC_OLD-7daa3955bc3a1918e40962851f9e8d38597a245e.tar.bz2 opensim-SC_OLD-7daa3955bc3a1918e40962851f9e8d38597a245e.tar.xz |
brought zircon branch into trunk
Diffstat (limited to '')
-rw-r--r-- | OpenSim.Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs (renamed from src/physics/plugins/PhysXplugin.cs) | 52 | ||||
-rw-r--r-- | src/physics/plugins/AssemblyInfo.cs | 21 | ||||
-rw-r--r-- | src/physics/plugins/BasicPhysicsplugin.csproj | 51 | ||||
-rw-r--r-- | src/physics/plugins/default.build | 51 |
4 files changed, 38 insertions, 137 deletions
diff --git a/src/physics/plugins/PhysXplugin.cs b/OpenSim.Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs index 8c09dc8..deff803 100644 --- a/src/physics/plugins/PhysXplugin.cs +++ b/OpenSim.Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs | |||
@@ -26,18 +26,18 @@ | |||
26 | */ | 26 | */ |
27 | using System; | 27 | using System; |
28 | using System.Collections.Generic; | 28 | using System.Collections.Generic; |
29 | using PhysicsSystem; | 29 | using OpenSim.Physics.Manager; |
30 | 30 | ||
31 | namespace PhysXplugin | 31 | namespace OpenSim.Physics.BasicPhysicsPlugin |
32 | { | 32 | { |
33 | /// <summary> | 33 | /// <summary> |
34 | /// Will be the PhysX plugin but for now will be a very basic physics engine | 34 | /// Will be the PhysX plugin but for now will be a very basic physics engine |
35 | /// </summary> | 35 | /// </summary> |
36 | public class PhysXPlugin : IPhysicsPlugin | 36 | public class BasicPhysicsPlugin : IPhysicsPlugin |
37 | { | 37 | { |
38 | private PhysXScene _mScene; | 38 | private BasicScene _mScene; |
39 | 39 | ||
40 | public PhysXPlugin() | 40 | public BasicPhysicsPlugin() |
41 | { | 41 | { |
42 | 42 | ||
43 | } | 43 | } |
@@ -51,14 +51,14 @@ namespace PhysXplugin | |||
51 | { | 51 | { |
52 | if(_mScene == null) | 52 | if(_mScene == null) |
53 | { | 53 | { |
54 | _mScene = new PhysXScene(); | 54 | _mScene = new BasicScene(); |
55 | } | 55 | } |
56 | return(_mScene); | 56 | return(_mScene); |
57 | } | 57 | } |
58 | 58 | ||
59 | public string GetName() | 59 | public string GetName() |
60 | { | 60 | { |
61 | return("PhysX"); | 61 | return("basicphysics"); |
62 | } | 62 | } |
63 | 63 | ||
64 | public void Dispose() | 64 | public void Dispose() |
@@ -67,19 +67,19 @@ namespace PhysXplugin | |||
67 | } | 67 | } |
68 | } | 68 | } |
69 | 69 | ||
70 | public class PhysXScene :PhysicsScene | 70 | public class BasicScene :PhysicsScene |
71 | { | 71 | { |
72 | private List<PhysXActor> _actors = new List<PhysXActor>(); | 72 | private List<BasicActor> _actors = new List<BasicActor>(); |
73 | private float[] _heightMap; | 73 | private float[] _heightMap; |
74 | 74 | ||
75 | public PhysXScene() | 75 | public BasicScene() |
76 | { | 76 | { |
77 | 77 | ||
78 | } | 78 | } |
79 | 79 | ||
80 | public override PhysicsActor AddAvatar(PhysicsVector position) | 80 | public override PhysicsActor AddAvatar(PhysicsVector position) |
81 | { | 81 | { |
82 | PhysXActor act = new PhysXActor(); | 82 | BasicActor act = new BasicActor(); |
83 | act.Position = position; | 83 | act.Position = position; |
84 | _actors.Add(act); | 84 | _actors.Add(act); |
85 | return act; | 85 | return act; |
@@ -92,7 +92,7 @@ namespace PhysXplugin | |||
92 | 92 | ||
93 | public override void Simulate(float timeStep) | 93 | public override void Simulate(float timeStep) |
94 | { | 94 | { |
95 | foreach (PhysXActor actor in _actors) | 95 | foreach (BasicActor actor in _actors) |
96 | { | 96 | { |
97 | actor.Position.X = actor.Position.X + (actor.Velocity.X * timeStep); | 97 | actor.Position.X = actor.Position.X + (actor.Velocity.X * timeStep); |
98 | actor.Position.Y = actor.Position.Y + (actor.Velocity.Y * timeStep); | 98 | actor.Position.Y = actor.Position.Y + (actor.Velocity.Y * timeStep); |
@@ -151,13 +151,13 @@ namespace PhysXplugin | |||
151 | } | 151 | } |
152 | } | 152 | } |
153 | 153 | ||
154 | public class PhysXActor : PhysicsActor | 154 | public class BasicActor : PhysicsActor |
155 | { | 155 | { |
156 | private PhysicsVector _position; | 156 | private PhysicsVector _position; |
157 | private PhysicsVector _velocity; | 157 | private PhysicsVector _velocity; |
158 | private PhysicsVector _acceleration; | 158 | private PhysicsVector _acceleration; |
159 | private bool flying; | 159 | private bool flying; |
160 | public PhysXActor() | 160 | public BasicActor() |
161 | { | 161 | { |
162 | _velocity = new PhysicsVector(); | 162 | _velocity = new PhysicsVector(); |
163 | _position = new PhysicsVector(); | 163 | _position = new PhysicsVector(); |
@@ -200,6 +200,18 @@ namespace PhysXplugin | |||
200 | } | 200 | } |
201 | } | 201 | } |
202 | 202 | ||
203 | public override Axiom.MathLib.Quaternion Orientation | ||
204 | { | ||
205 | get | ||
206 | { | ||
207 | return Axiom.MathLib.Quaternion.Identity; | ||
208 | } | ||
209 | set | ||
210 | { | ||
211 | |||
212 | } | ||
213 | } | ||
214 | |||
203 | public override PhysicsVector Acceleration | 215 | public override PhysicsVector Acceleration |
204 | { | 216 | { |
205 | get | 217 | get |
@@ -208,6 +220,18 @@ namespace PhysXplugin | |||
208 | } | 220 | } |
209 | 221 | ||
210 | } | 222 | } |
223 | |||
224 | public override bool Kinematic | ||
225 | { | ||
226 | get | ||
227 | { | ||
228 | return true; | ||
229 | } | ||
230 | set | ||
231 | { | ||
232 | |||
233 | } | ||
234 | } | ||
211 | public void SetAcceleration (PhysicsVector accel) | 235 | public void SetAcceleration (PhysicsVector accel) |
212 | { | 236 | { |
213 | this._acceleration = accel; | 237 | this._acceleration = accel; |
diff --git a/src/physics/plugins/AssemblyInfo.cs b/src/physics/plugins/AssemblyInfo.cs deleted file mode 100644 index 4cd5558..0000000 --- a/src/physics/plugins/AssemblyInfo.cs +++ /dev/null | |||
@@ -1,21 +0,0 @@ | |||
1 | using System; | ||
2 | using System.Reflection; | ||
3 | using System.Runtime.InteropServices; | ||
4 | |||
5 | // ------------------------------------------------------------------------------ | ||
6 | // <autogenerated> | ||
7 | // This code was generated by a tool. | ||
8 | // Mono Runtime Version: 2.0.50727.42 | ||
9 | // | ||
10 | // Changes to this file may cause incorrect behavior and will be lost if | ||
11 | // the code is regenerated. | ||
12 | // </autogenerated> | ||
13 | // ------------------------------------------------------------------------------ | ||
14 | |||
15 | [assembly: ComVisibleAttribute(false)] | ||
16 | [assembly: CLSCompliantAttribute(false)] | ||
17 | [assembly: AssemblyVersionAttribute("0.1.0.240")] | ||
18 | [assembly: AssemblyTitleAttribute("opensim-physicsmanager-physx")] | ||
19 | [assembly: AssemblyDescriptionAttribute("PhysX plugin for OpenSim")] | ||
20 | [assembly: AssemblyCopyrightAttribute("Copyright © OGS development team 2007")] | ||
21 | |||
diff --git a/src/physics/plugins/BasicPhysicsplugin.csproj b/src/physics/plugins/BasicPhysicsplugin.csproj deleted file mode 100644 index b3f47d3..0000000 --- a/src/physics/plugins/BasicPhysicsplugin.csproj +++ /dev/null | |||
@@ -1,51 +0,0 @@ | |||
1 | <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
2 | <PropertyGroup> | ||
3 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
4 | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
5 | <ProductVersion>8.0.50727</ProductVersion> | ||
6 | <SchemaVersion>2.0</SchemaVersion> | ||
7 | <ProjectGuid>{52BCCE7B-69EA-4AC3-9DBC-D571B96C2EA1}</ProjectGuid> | ||
8 | <OutputType>Library</OutputType> | ||
9 | <AppDesignerFolder>Properties</AppDesignerFolder> | ||
10 | <RootNamespace>BasicPhysicsplugin</RootNamespace> | ||
11 | <AssemblyName>BasicPhysicsplugin</AssemblyName> | ||
12 | </PropertyGroup> | ||
13 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
14 | <DebugSymbols>true</DebugSymbols> | ||
15 | <DebugType>full</DebugType> | ||
16 | <Optimize>false</Optimize> | ||
17 | <OutputPath>..\..\..\bin\Physics\</OutputPath> | ||
18 | <DefineConstants>DEBUG;TRACE</DefineConstants> | ||
19 | <ErrorReport>prompt</ErrorReport> | ||
20 | <WarningLevel>4</WarningLevel> | ||
21 | </PropertyGroup> | ||
22 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
23 | <DebugType>pdbonly</DebugType> | ||
24 | <Optimize>true</Optimize> | ||
25 | <OutputPath>..\..\..\bin\Physics\</OutputPath> | ||
26 | <DefineConstants>TRACE</DefineConstants> | ||
27 | <ErrorReport>prompt</ErrorReport> | ||
28 | <WarningLevel>4</WarningLevel> | ||
29 | </PropertyGroup> | ||
30 | <ItemGroup> | ||
31 | <Reference Include="Axiom.MathLib, Version=0.7.0.25497, Culture=neutral"> | ||
32 | <SpecificVersion>False</SpecificVersion> | ||
33 | <HintPath>..\..\..\bin\Axiom.MathLib.dll</HintPath> | ||
34 | <Private>False</Private> | ||
35 | </Reference> | ||
36 | <Reference Include="System" /> | ||
37 | <Reference Include="System.Data" /> | ||
38 | <Reference Include="System.Xml" /> | ||
39 | </ItemGroup> | ||
40 | <ItemGroup> | ||
41 | <Compile Include="PhysXplugin.cs" /> | ||
42 | </ItemGroup> | ||
43 | <ItemGroup> | ||
44 | <ProjectReference Include="..\PhysicsManager.csproj"> | ||
45 | <Project>{3C86A846-7977-4EE7-A8DC-DD487FA5DC2B}</Project> | ||
46 | <Name>PhysicsManager</Name> | ||
47 | <Private>False</Private> | ||
48 | </ProjectReference> | ||
49 | </ItemGroup> | ||
50 | <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> | ||
51 | </Project> \ No newline at end of file | ||
diff --git a/src/physics/plugins/default.build b/src/physics/plugins/default.build deleted file mode 100644 index 66056a5..0000000 --- a/src/physics/plugins/default.build +++ /dev/null | |||
@@ -1,51 +0,0 @@ | |||
1 | <?xml version="1.0"?> | ||
2 | <project name="OpenSim" default="build" basedir="."> | ||
3 | <description>nant buildfile for OpenSim</description> | ||
4 | <property name="debug" value="true" overwrite="false" /> | ||
5 | <target name="clean" description="remove all generated files"> | ||
6 | <delete file="../../../bin/Physics/PhysXplugin.dll" failonerror="false" /> | ||
7 | </target> | ||
8 | |||
9 | <target name="svnupdate" description="updates to latest SVN"> | ||
10 | <exec program="svn"> | ||
11 | <arg value="update" /> | ||
12 | </exec> | ||
13 | </target> | ||
14 | |||
15 | <target name="upgrade" description="updates from SVN and then builds" depends="clean,svnupdate,build"> | ||
16 | |||
17 | </target> | ||
18 | |||
19 | <target name="build" description="compiles the source code"> | ||
20 | |||
21 | <loadfile file="../../../VERSION" property="svnver"/> | ||
22 | <asminfo output="AssemblyInfo.cs" language="CSharp"> | ||
23 | <imports> | ||
24 | <import namespace="System" /> | ||
25 | <import namespace="System.Reflection" /> | ||
26 | <import namespace="System.Runtime.InteropServices" /> | ||
27 | </imports> | ||
28 | <attributes> | ||
29 | <attribute type="ComVisibleAttribute" value="false" /> | ||
30 | <attribute type="CLSCompliantAttribute" value="false" /> | ||
31 | <attribute type="AssemblyVersionAttribute" value="${svnver}" /> | ||
32 | <attribute type="AssemblyTitleAttribute" value="opensim-physicsmanager-physx" /> | ||
33 | <attribute type="AssemblyDescriptionAttribute" value="PhysX plugin for OpenSim" /> | ||
34 | <attribute type="AssemblyCopyrightAttribute" value="Copyright © OGS development team 2007"/> | ||
35 | </attributes> | ||
36 | </asminfo> | ||
37 | |||
38 | <mkdir dir="../../../bin/Physics"/> | ||
39 | |||
40 | <csc target="library" output="../../../bin/Physics/PhysXplugin.dll" debug="${debug}" verbose="true" warninglevel="4"> | ||
41 | <references basedir="../../../bin" failonempty="true"> | ||
42 | <include name="System.dll" /> | ||
43 | <include name="System.Xml.dll" /> | ||
44 | <include name="PhysicsManager.dll" /> | ||
45 | </references> | ||
46 | <sources basedir="./"> | ||
47 | <include name="*.cs" /> | ||
48 | </sources> | ||
49 | </csc> | ||
50 | </target> | ||
51 | </project> | ||