aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/ode-0.9/contrib/Ode.NET/Drawstuff
diff options
context:
space:
mode:
authordan miller2007-10-19 05:20:48 +0000
committerdan miller2007-10-19 05:20:48 +0000
commitd48ea5bb797037069d641da41da0f195f0124491 (patch)
tree40ff433d94859d629aac933d5ec73b382f62ba1a /libraries/ode-0.9/contrib/Ode.NET/Drawstuff
parentdont ask (diff)
downloadopensim-SC_OLD-d48ea5bb797037069d641da41da0f195f0124491.zip
opensim-SC_OLD-d48ea5bb797037069d641da41da0f195f0124491.tar.gz
opensim-SC_OLD-d48ea5bb797037069d641da41da0f195f0124491.tar.bz2
opensim-SC_OLD-d48ea5bb797037069d641da41da0f195f0124491.tar.xz
one more for the gipper
Diffstat (limited to 'libraries/ode-0.9/contrib/Ode.NET/Drawstuff')
-rw-r--r--libraries/ode-0.9/contrib/Ode.NET/Drawstuff/AssemblyInfo.cs18
-rw-r--r--libraries/ode-0.9/contrib/Ode.NET/Drawstuff/Drawstuff.cs58
-rw-r--r--libraries/ode-0.9/contrib/Ode.NET/Drawstuff/premake.lua19
3 files changed, 95 insertions, 0 deletions
diff --git a/libraries/ode-0.9/contrib/Ode.NET/Drawstuff/AssemblyInfo.cs b/libraries/ode-0.9/contrib/Ode.NET/Drawstuff/AssemblyInfo.cs
new file mode 100644
index 0000000..8d2b86a
--- /dev/null
+++ b/libraries/ode-0.9/contrib/Ode.NET/Drawstuff/AssemblyInfo.cs
@@ -0,0 +1,18 @@
1using System;
2using System.Reflection;
3using System.Runtime.CompilerServices;
4using System.Runtime.InteropServices;
5
6[assembly: AssemblyTitle("Drawstuff.NET")]
7[assembly: AssemblyDescription("")]
8[assembly: AssemblyConfiguration("")]
9[assembly: AssemblyCompany("")]
10[assembly: AssemblyProduct("Ode.NET")]
11[assembly: AssemblyCopyright("")]
12[assembly: AssemblyTrademark("")]
13[assembly: AssemblyCulture("")]
14[assembly: ComVisible(false)]
15[assembly: Guid("b2a39dd4-dd67-4e8a-af70-d3b412da8850")]
16[assembly: AssemblyVersion("0.7.0.0")]
17[assembly: AssemblyFileVersion("0.7.0.0")]
18[assembly: CLSCompliantAttribute(true)]
diff --git a/libraries/ode-0.9/contrib/Ode.NET/Drawstuff/Drawstuff.cs b/libraries/ode-0.9/contrib/Ode.NET/Drawstuff/Drawstuff.cs
new file mode 100644
index 0000000..aa84966
--- /dev/null
+++ b/libraries/ode-0.9/contrib/Ode.NET/Drawstuff/Drawstuff.cs
@@ -0,0 +1,58 @@
1using System;
2using System.Runtime.InteropServices;
3using Ode.NET;
4
5namespace Drawstuff.NET
6{
7#if dDOUBLE
8 using dReal = System.Double;
9#else
10 using dReal = System.Single;
11#endif
12
13 public static class ds
14 {
15 public const int VERSION = 2;
16
17 public enum Texture
18 {
19 None,
20 Wood
21 }
22
23 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
24 public delegate void CallbackFunction(int arg);
25
26 [StructLayout(LayoutKind.Sequential)]
27 public struct Functions
28 {
29 public int version;
30 public CallbackFunction start;
31 public CallbackFunction step;
32 public CallbackFunction command;
33 public CallbackFunction stop;
34 public string path_to_textures;
35 }
36
37 [DllImport("drawstuff", EntryPoint="dsDrawBox")]
38 public static extern void DrawBox(ref d.Vector3 pos, ref d.Matrix3 R, ref d.Vector3 sides);
39
40 [DllImport("drawstuff", EntryPoint = "dsDrawCapsule")]
41 public static extern void DrawCapsule(ref d.Vector3 pos, ref d.Matrix3 R, dReal length, dReal radius);
42
43 [DllImport("drawstuff", EntryPoint = "dsDrawConvex")]
44 public static extern void DrawConvex(ref d.Vector3 pos, ref d.Matrix3 R, dReal[] planes, int planeCount, dReal[] points, int pointCount, int[] polygons);
45
46 [DllImport("drawstuff", EntryPoint="dsSetColor")]
47 public static extern void SetColor(float red, float green, float blue);
48
49 [DllImport("drawstuff", EntryPoint="dsSetTexture")]
50 public static extern void SetTexture(Texture texture);
51
52 [DllImport("drawstuff", EntryPoint="dsSetViewpoint")]
53 public static extern void SetViewpoint(ref d.Vector3 xyz, ref d.Vector3 hpr);
54
55 [DllImport("drawstuff", EntryPoint="dsSimulationLoop")]
56 public static extern void SimulationLoop(int argc, string[] argv, int window_width, int window_height, ref Functions fn);
57 }
58}
diff --git a/libraries/ode-0.9/contrib/Ode.NET/Drawstuff/premake.lua b/libraries/ode-0.9/contrib/Ode.NET/Drawstuff/premake.lua
new file mode 100644
index 0000000..d777ffb
--- /dev/null
+++ b/libraries/ode-0.9/contrib/Ode.NET/Drawstuff/premake.lua
@@ -0,0 +1,19 @@
1package.name = "Drawstuff.NET"
2package.kind = "dll"
3package.language = "c#"
4
5if (options["with-doubles"]) then
6 package.defines = { "dDOUBLE" }
7else
8 package.defines = { "dSINGLE " }
9end
10
11package.links = {
12 "System",
13 "Ode.NET"
14}
15
16package.files = {
17 "AssemblyInfo.cs",
18 "Drawstuff.cs"
19}