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 /OpenSim.Physics/BasicPhysicsPlugin | |
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/AssemblyInfo.cs | 31 | ||||
-rw-r--r-- | OpenSim.Physics/BasicPhysicsPlugin/BasicPhysicsPlugin.cs (renamed from src/physics/plugins/PhysXplugin.cs) | 52 | ||||
-rw-r--r-- | OpenSim.Physics/BasicPhysicsPlugin/OpenSim.Physics.BasicPhysicsPlugin.csproj | 90 | ||||
-rw-r--r-- | OpenSim.Physics/BasicPhysicsPlugin/OpenSim.Physics.BasicPhysicsPlugin.csproj.user | 12 | ||||
-rw-r--r-- | OpenSim.Physics/BasicPhysicsPlugin/OpenSim.Physics.BasicPhysicsPlugin.dll.build | 42 |
5 files changed, 213 insertions, 14 deletions
diff --git a/OpenSim.Physics/BasicPhysicsPlugin/AssemblyInfo.cs b/OpenSim.Physics/BasicPhysicsPlugin/AssemblyInfo.cs new file mode 100644 index 0000000..0c9c06c --- /dev/null +++ b/OpenSim.Physics/BasicPhysicsPlugin/AssemblyInfo.cs | |||
@@ -0,0 +1,31 @@ | |||
1 | using System.Reflection; | ||
2 | using System.Runtime.CompilerServices; | ||
3 | using System.Runtime.InteropServices; | ||
4 | |||
5 | // Information about this assembly is defined by the following | ||
6 | // attributes. | ||
7 | // | ||
8 | // change them to the information which is associated with the assembly | ||
9 | // you compile. | ||
10 | |||
11 | [assembly: AssemblyTitle("PhysXplugin")] | ||
12 | [assembly: AssemblyDescription("")] | ||
13 | [assembly: AssemblyConfiguration("")] | ||
14 | [assembly: AssemblyCompany("")] | ||
15 | [assembly: AssemblyProduct("PhysXplugin")] | ||
16 | [assembly: AssemblyCopyright("")] | ||
17 | [assembly: AssemblyTrademark("")] | ||
18 | [assembly: AssemblyCulture("")] | ||
19 | |||
20 | // This sets the default COM visibility of types in the assembly to invisible. | ||
21 | // If you need to expose a type to COM, use [ComVisible(true)] on that type. | ||
22 | [assembly: ComVisible(false)] | ||
23 | |||
24 | // The assembly version has following format : | ||
25 | // | ||
26 | // Major.Minor.Build.Revision | ||
27 | // | ||
28 | // You can specify all values by your own or you can build default build and revision | ||
29 | // numbers with the '*' character (the default): | ||
30 | |||
31 | [assembly: AssemblyVersion("1.0.*")] | ||
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/OpenSim.Physics/BasicPhysicsPlugin/OpenSim.Physics.BasicPhysicsPlugin.csproj b/OpenSim.Physics/BasicPhysicsPlugin/OpenSim.Physics.BasicPhysicsPlugin.csproj new file mode 100644 index 0000000..dbfebd3 --- /dev/null +++ b/OpenSim.Physics/BasicPhysicsPlugin/OpenSim.Physics.BasicPhysicsPlugin.csproj | |||
@@ -0,0 +1,90 @@ | |||
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>{00594B9E-29A5-4B9C-AEBD-0AD08C73CFE8}</ProjectGuid> | ||
7 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
8 | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
9 | <ApplicationIcon></ApplicationIcon> | ||
10 | <AssemblyKeyContainerName> | ||
11 | </AssemblyKeyContainerName> | ||
12 | <AssemblyName>OpenSim.Physics.BasicPhysicsPlugin</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.BasicPhysicsPlugin</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\Physics\</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\Physics\</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="System" > | ||
62 | <HintPath>\System.dll</HintPath> | ||
63 | </Reference> | ||
64 | <Reference Include="Axiom.MathLib.dll" > | ||
65 | <HintPath>\Axiom.MathLib.dll.dll</HintPath> | ||
66 | </Reference> | ||
67 | </ItemGroup> | ||
68 | <ItemGroup> | ||
69 | <ProjectReference Include="..\Manager\OpenSim.Physics.Manager.csproj"> | ||
70 | <Name>OpenSim.Physics.Manager</Name> | ||
71 | <Project>{58360A80-9333-4E0F-8F83-3CF937E51633}</Project> | ||
72 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> | ||
73 | </ProjectReference> | ||
74 | </ItemGroup> | ||
75 | <ItemGroup> | ||
76 | <Compile Include="AssemblyInfo.cs"> | ||
77 | <SubType>Code</SubType> | ||
78 | </Compile> | ||
79 | <Compile Include="BasicPhysicsPlugin.cs"> | ||
80 | <SubType>Code</SubType> | ||
81 | </Compile> | ||
82 | </ItemGroup> | ||
83 | <Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" /> | ||
84 | <PropertyGroup> | ||
85 | <PreBuildEvent> | ||
86 | </PreBuildEvent> | ||
87 | <PostBuildEvent> | ||
88 | </PostBuildEvent> | ||
89 | </PropertyGroup> | ||
90 | </Project> | ||
diff --git a/OpenSim.Physics/BasicPhysicsPlugin/OpenSim.Physics.BasicPhysicsPlugin.csproj.user b/OpenSim.Physics/BasicPhysicsPlugin/OpenSim.Physics.BasicPhysicsPlugin.csproj.user new file mode 100644 index 0000000..13e65a8 --- /dev/null +++ b/OpenSim.Physics/BasicPhysicsPlugin/OpenSim.Physics.BasicPhysicsPlugin.csproj.user | |||
@@ -0,0 +1,12 @@ | |||
1 | <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
2 | <PropertyGroup> | ||
3 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
4 | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
5 | <ReferencePath>C:\Documents and Settings\Stefan\My Documents\Projects\source\opensim\branches\zircon\bin\</ReferencePath> | ||
6 | <LastOpenVersion>8.0.50727</LastOpenVersion> | ||
7 | <ProjectView>ProjectFiles</ProjectView> | ||
8 | <ProjectTrust>0</ProjectTrust> | ||
9 | </PropertyGroup> | ||
10 | <PropertyGroup Condition = " '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' " /> | ||
11 | <PropertyGroup Condition = " '$(Configuration)|$(Platform)' == 'Release|AnyCPU' " /> | ||
12 | </Project> | ||
diff --git a/OpenSim.Physics/BasicPhysicsPlugin/OpenSim.Physics.BasicPhysicsPlugin.dll.build b/OpenSim.Physics/BasicPhysicsPlugin/OpenSim.Physics.BasicPhysicsPlugin.dll.build new file mode 100644 index 0000000..f146733 --- /dev/null +++ b/OpenSim.Physics/BasicPhysicsPlugin/OpenSim.Physics.BasicPhysicsPlugin.dll.build | |||
@@ -0,0 +1,42 @@ | |||
1 | <?xml version="1.0" ?> | ||
2 | <project name="OpenSim.Physics.BasicPhysicsPlugin" 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.BasicPhysicsPlugin" dynamicprefix="true" > | ||
12 | </resources> | ||
13 | <sources failonempty="true"> | ||
14 | <include name="AssemblyInfo.cs" /> | ||
15 | <include name="BasicPhysicsPlugin.cs" /> | ||
16 | </sources> | ||
17 | <references basedir="${project::get-base-directory()}"> | ||
18 | <lib> | ||
19 | <include name="${project::get-base-directory()}" /> | ||
20 | <include name="${project::get-base-directory()}/${build.dir}" /> | ||
21 | </lib> | ||
22 | <include name="System.dll" /> | ||
23 | <include name="../../bin/Axiom.MathLib.dll" /> | ||
24 | <include name="../Manager/${build.dir}/OpenSim.Physics.Manager.dll" /> | ||
25 | </references> | ||
26 | </csc> | ||
27 | <echo message="Copying from [${project::get-base-directory()}/${build.dir}/] to [${project::get-base-directory()}/../../bin/Physics/" /> | ||
28 | <mkdir dir="${project::get-base-directory()}/../../bin/Physics/"/> | ||
29 | <copy todir="${project::get-base-directory()}/../../bin/Physics/"> | ||
30 | <fileset basedir="${project::get-base-directory()}/${build.dir}/" > | ||
31 | <include name="*.dll"/> | ||
32 | <include name="*.exe"/> | ||
33 | </fileset> | ||
34 | </copy> | ||
35 | </target> | ||
36 | <target name="clean"> | ||
37 | <delete dir="${bin.dir}" failonerror="false" /> | ||
38 | <delete dir="${obj.dir}" failonerror="false" /> | ||
39 | </target> | ||
40 | <target name="doc" description="Creates documentation."> | ||
41 | </target> | ||
42 | </project> | ||