aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/physics/RealPhysX/RealPhysXplugin
diff options
context:
space:
mode:
authorgareth2007-03-22 10:11:15 +0000
committergareth2007-03-22 10:11:15 +0000
commit7daa3955bc3a1918e40962851f9e8d38597a245e (patch)
treebee3e1372a7eed0c1b220a8a49f7bee7d29a6b91 /src/physics/RealPhysX/RealPhysXplugin
parentLoad XML for neighbourinfo from grid (diff)
downloadopensim-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/PhysXPlugin/AssemblyInfo.cs (renamed from src/physics/RealPhysX/RealPhysXplugin/AssemblyInfo.cs)0
-rw-r--r--OpenSim.Physics/PhysXPlugin/PhysXPlugin.cs (renamed from src/physics/RealPhysX/RealPhysXplugin/RealPhysX.cs)69
-rw-r--r--src/physics/RealPhysX/RealPhysXplugin/RealPhysXplugin.csproj46
3 files changed, 65 insertions, 50 deletions
diff --git a/src/physics/RealPhysX/RealPhysXplugin/AssemblyInfo.cs b/OpenSim.Physics/PhysXPlugin/AssemblyInfo.cs
index 913aae7..913aae7 100644
--- a/src/physics/RealPhysX/RealPhysXplugin/AssemblyInfo.cs
+++ b/OpenSim.Physics/PhysXPlugin/AssemblyInfo.cs
diff --git a/src/physics/RealPhysX/RealPhysXplugin/RealPhysX.cs b/OpenSim.Physics/PhysXPlugin/PhysXPlugin.cs
index 9576a40..043c2f1 100644
--- a/src/physics/RealPhysX/RealPhysXplugin/RealPhysX.cs
+++ b/OpenSim.Physics/PhysXPlugin/PhysXPlugin.cs
@@ -52,10 +52,10 @@
52*/ 52*/
53using System; 53using System;
54using System.Collections.Generic; 54using System.Collections.Generic;
55using PhysicsSystem; 55using OpenSim.Physics.Manager;
56using PhysXWrapper; 56using PhysXWrapper;
57 57
58namespace PhysXplugin 58namespace OpenSim.Physics.PhysXPlugin
59{ 59{
60 /// <summary> 60 /// <summary>
61 /// Will be the PhysX plugin but for now will be a very basic physics engine 61 /// Will be the PhysX plugin but for now will be a very basic physics engine
@@ -105,6 +105,7 @@ namespace PhysXplugin
105 public PhysXScene() 105 public PhysXScene()
106 { 106 {
107 mySdk = NxPhysicsSDK.CreateSDK(); 107 mySdk = NxPhysicsSDK.CreateSDK();
108 Console.WriteLine("Sdk created - now creating scene");
108 scene = mySdk.CreateScene(); 109 scene = mySdk.CreateScene();
109 110
110 } 111 }
@@ -179,6 +180,7 @@ namespace PhysXplugin
179 private PhysicsVector _acceleration; 180 private PhysicsVector _acceleration;
180 private NxCharacter _character; 181 private NxCharacter _character;
181 private bool flying; 182 private bool flying;
183 private float gravityAccel;
182 184
183 public PhysXCharacter(NxCharacter character) 185 public PhysXCharacter(NxCharacter character)
184 { 186 {
@@ -224,6 +226,30 @@ namespace PhysXplugin
224 } 226 }
225 } 227 }
226 228
229 public override bool Kinematic
230 {
231 get
232 {
233 return false;
234 }
235 set
236 {
237
238 }
239 }
240
241 public override Axiom.MathLib.Quaternion Orientation
242 {
243 get
244 {
245 return Axiom.MathLib.Quaternion.Identity;
246 }
247 set
248 {
249
250 }
251 }
252
227 public override PhysicsVector Acceleration 253 public override PhysicsVector Acceleration
228 { 254 {
229 get 255 get
@@ -258,9 +284,14 @@ namespace PhysXplugin
258 } 284 }
259 else 285 else
260 { 286 {
261 vec.Z = (-9.8f + this._velocity.Z) * timeStep; 287 gravityAccel+= -9.8f;
288 vec.Z = (gravityAccel + this._velocity.Z) * timeStep;
289 }
290 int res = this._character.Move(vec);
291 if(res == 1)
292 {
293 gravityAccel = 0;
262 } 294 }
263 this._character.Move(vec);
264 } 295 }
265 296
266 public void UpdatePosition() 297 public void UpdatePosition()
@@ -332,6 +363,36 @@ namespace PhysXplugin
332 } 363 }
333 } 364 }
334 365
366 public override bool Kinematic
367 {
368 get
369 {
370 return this._prim.Kinematic;
371 }
372 set
373 {
374 this._prim.Kinematic = value;
375 }
376 }
377
378 public override Axiom.MathLib.Quaternion Orientation
379 {
380 get
381 {
382 Axiom.MathLib.Quaternion res = new Axiom.MathLib.Quaternion();
383 PhysXWrapper.Quaternion quat = this._prim.GetOrientation();
384 res.w = quat.W;
385 res.x = quat.X;
386 res.y = quat.Y;
387 res.z = quat.Z;
388 return res;
389 }
390 set
391 {
392
393 }
394 }
395
335 public override PhysicsVector Acceleration 396 public override PhysicsVector Acceleration
336 { 397 {
337 get 398 get
diff --git a/src/physics/RealPhysX/RealPhysXplugin/RealPhysXplugin.csproj b/src/physics/RealPhysX/RealPhysXplugin/RealPhysXplugin.csproj
deleted file mode 100644
index 554df5e..0000000
--- a/src/physics/RealPhysX/RealPhysXplugin/RealPhysXplugin.csproj
+++ /dev/null
@@ -1,46 +0,0 @@
1<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 <PropertyGroup>
3 <OutputType>Library</OutputType>
4 <RootNamespace>RealPhysXplugin</RootNamespace>
5 <AssemblyName>RealPhysXplugin</AssemblyName>
6 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
7 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
8 <ProjectGuid>{56C1D214-F389-4228-921A-0A3A0712C159}</ProjectGuid>
9 </PropertyGroup>
10 <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
11 <OutputPath>..\..\..\..\bin\Physics\</OutputPath>
12 <Optimize>False</Optimize>
13 <DefineConstants>DEBUG;TRACE</DefineConstants>
14 <DebugSymbols>True</DebugSymbols>
15 <DebugType>Full</DebugType>
16 <CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
17 </PropertyGroup>
18 <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
19 <OutputPath>..\..\..\..\bin\Physics\</OutputPath>
20 <Optimize>True</Optimize>
21 <DefineConstants>TRACE</DefineConstants>
22 <DebugSymbols>False</DebugSymbols>
23 <DebugType>None</DebugType>
24 <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
25 </PropertyGroup>
26 <ItemGroup>
27 <Reference Include="System" />
28 <Reference Include="System.Xml" />
29 <Reference Include="PhysX_Wrapper_Dotnet">
30 <HintPath>..\..\..\..\bin\PhysX_Wrapper_Dotnet.dll</HintPath>
31 <SpecificVersion>False</SpecificVersion>
32 <Private>False</Private>
33 </Reference>
34 </ItemGroup>
35 <ItemGroup>
36 <Compile Include="RealPhysX.cs" />
37 </ItemGroup>
38 <ItemGroup>
39 <ProjectReference Include="..\..\PhysicsManager.csproj">
40 <Project>{3C86A846-7977-4EE7-A8DC-DD487FA5DC2B}</Project>
41 <Name>PhysicsManager</Name>
42 <Private>False</Private>
43 </ProjectReference>
44 </ItemGroup>
45 <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
46</Project> \ No newline at end of file