aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/UbitOdePlugin/OdeApi.cs
diff options
context:
space:
mode:
authorMelanie2012-04-13 03:03:44 +0100
committerMelanie2012-04-13 03:03:44 +0100
commit5e3a76361fa097a2c47f6d37884786ec5777590c (patch)
tree85d791855e6e3646194a572fae5f2fb3d7a84110 /OpenSim/Region/Physics/UbitOdePlugin/OdeApi.cs
parentMerge branch 'master' into careminster (diff)
parentmake llGetGeometricCenter() work as in current SL. Now this is not real geom ... (diff)
downloadopensim-SC-5e3a76361fa097a2c47f6d37884786ec5777590c.zip
opensim-SC-5e3a76361fa097a2c47f6d37884786ec5777590c.tar.gz
opensim-SC-5e3a76361fa097a2c47f6d37884786ec5777590c.tar.bz2
opensim-SC-5e3a76361fa097a2c47f6d37884786ec5777590c.tar.xz
Merge branch 'master' of ssh://melanie@3dhosting.de/var/git/careminster into careminster
Diffstat (limited to 'OpenSim/Region/Physics/UbitOdePlugin/OdeApi.cs')
-rw-r--r--OpenSim/Region/Physics/UbitOdePlugin/OdeApi.cs53
1 files changed, 49 insertions, 4 deletions
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/OdeApi.cs b/OpenSim/Region/Physics/UbitOdePlugin/OdeApi.cs
index 2b6bc59..f5129cb 100644
--- a/OpenSim/Region/Physics/UbitOdePlugin/OdeApi.cs
+++ b/OpenSim/Region/Physics/UbitOdePlugin/OdeApi.cs
@@ -107,16 +107,17 @@ namespace OdeAPI
107 ConvexClass, 107 ConvexClass,
108 GeomTransformClass, 108 GeomTransformClass,
109 TriMeshClass, 109 TriMeshClass,
110 HeightfieldClass, 110 HeightfieldClass,
111 FirstSpaceClass, 111 FirstSpaceClass,
112 SimpleSpaceClass = FirstSpaceClass, 112 SimpleSpaceClass = FirstSpaceClass,
113 HashSpaceClass, 113 HashSpaceClass,
114 QuadTreeSpaceClass, 114 QuadTreeSpaceClass,
115 LastSpaceClass = QuadTreeSpaceClass, 115 LastSpaceClass = QuadTreeSpaceClass,
116 UbitTerrainClass,
116 FirstUserClass, 117 FirstUserClass,
117 LastUserClass = FirstUserClass + MaxUserClasses - 1, 118 LastUserClass = FirstUserClass + MaxUserClasses - 1,
118 NumClasses, 119 NumClasses,
119 MaxUserClasses = 4 120 MaxUserClasses = 5
120 } 121 }
121 122
122 public enum JointType : int 123 public enum JointType : int
@@ -201,8 +202,11 @@ namespace OdeAPI
201 [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 202 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
202 public delegate void GeomDtorFn(IntPtr o); 203 public delegate void GeomDtorFn(IntPtr o);
203 204
204 [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 205 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
205 public delegate dReal HeightfieldGetHeight(IntPtr p_user_data, int x, int z); 206 public delegate dReal HeightfieldGetHeight(IntPtr p_user_data, int x, int z);
207
208 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
209 public delegate dReal UbitTerrainGetHeight(IntPtr p_user_data, int x, int z);
206 210
207 [UnmanagedFunctionPointer(CallingConvention.Cdecl)] 211 [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
208 public delegate void NearCallback(IntPtr data, IntPtr geom1, IntPtr geom2); 212 public delegate void NearCallback(IntPtr data, IntPtr geom1, IntPtr geom2);
@@ -729,6 +733,18 @@ namespace OdeAPI
729 return CreateiHeightfield(space, data, bPlaceable); 733 return CreateiHeightfield(space, data, bPlaceable);
730 } 734 }
731 735
736 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateUbitTerrain"), SuppressUnmanagedCodeSecurity]
737 public static extern IntPtr CreateiUbitTerrain(IntPtr space, IntPtr data, int bPlaceable);
738 public static IntPtr CreateUbitTerrain(IntPtr space, IntPtr data, int bPlaceable)
739 {
740 NTotalGeoms++;
741 return CreateiUbitTerrain(space, data, bPlaceable);
742 }
743
744
745
746
747
732 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateGeom"), SuppressUnmanagedCodeSecurity] 748 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dCreateGeom"), SuppressUnmanagedCodeSecurity]
733 public static extern IntPtr CreateiGeom(int classnum); 749 public static extern IntPtr CreateiGeom(int classnum);
734 public static IntPtr CreateGeom(int classnum) 750 public static IntPtr CreateGeom(int classnum)
@@ -964,6 +980,8 @@ namespace OdeAPI
964 dReal width, dReal depth, int widthSamples, int depthSamples, 980 dReal width, dReal depth, int widthSamples, int depthSamples,
965 dReal scale, dReal offset, dReal thickness, int bWrap); 981 dReal scale, dReal offset, dReal thickness, int bWrap);
966 982
983
984
967 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildDouble"), SuppressUnmanagedCodeSecurity] 985 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldDataBuildDouble"), SuppressUnmanagedCodeSecurity]
968 public static extern void GeomHeightfieldDataBuildDouble(IntPtr d, double[] pHeightData, int bCopyHeightData, 986 public static extern void GeomHeightfieldDataBuildDouble(IntPtr d, double[] pHeightData, int bCopyHeightData,
969 dReal width, dReal depth, int widthSamples, int depthSamples, 987 dReal width, dReal depth, int widthSamples, int depthSamples,
@@ -989,6 +1007,33 @@ namespace OdeAPI
989 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldSetHeightfieldData"), SuppressUnmanagedCodeSecurity] 1007 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomHeightfieldSetHeightfieldData"), SuppressUnmanagedCodeSecurity]
990 public static extern void GeomHeightfieldSetHeightfieldData(IntPtr g, IntPtr d); 1008 public static extern void GeomHeightfieldSetHeightfieldData(IntPtr g, IntPtr d);
991 1009
1010
1011 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomUbitTerrainDataBuild"), SuppressUnmanagedCodeSecurity]
1012 public static extern void GeomUbitTerrainDataBuild(IntPtr d, float[] pHeightData, int bCopyHeightData,
1013 dReal sampleSize, int widthSamples, int depthSamples,
1014 dReal offset, dReal thickness, int bWrap);
1015
1016 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomUbitTerrainDataBuild"), SuppressUnmanagedCodeSecurity]
1017 public static extern void GeomUbitTerrainDataBuild(IntPtr d, IntPtr pHeightData, int bCopyHeightData,
1018 dReal sampleSize, int widthSamples, int depthSamples,
1019 dReal thickness, int bWrap);
1020
1021 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomUbitTerrainDataCreate"), SuppressUnmanagedCodeSecurity]
1022 public static extern IntPtr GeomUbitTerrainDataCreate();
1023
1024 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomUbitTerrainDataDestroy"), SuppressUnmanagedCodeSecurity]
1025 public static extern void GeomUbitTerrainDataDestroy(IntPtr d);
1026
1027 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomUbitTerrainDataSetBounds"), SuppressUnmanagedCodeSecurity]
1028 public static extern void GeomUbitTerrainDataSetBounds(IntPtr d, dReal minHeight, dReal maxHeight);
1029
1030 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomUbitTerrainGetHeightfieldData"), SuppressUnmanagedCodeSecurity]
1031 public static extern IntPtr GeomUbitTerrainGetHeightfieldData(IntPtr g);
1032
1033 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomUbitTerrainSetHeightfieldData"), SuppressUnmanagedCodeSecurity]
1034 public static extern void GeomUbitTerrainSetHeightfieldData(IntPtr g, IntPtr d);
1035
1036
992 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomIsEnabled"), SuppressUnmanagedCodeSecurity] 1037 [DllImport("ode", CallingConvention = CallingConvention.Cdecl, EntryPoint = "dGeomIsEnabled"), SuppressUnmanagedCodeSecurity]
993 public static extern bool GeomIsEnabled(IntPtr geom); 1038 public static extern bool GeomIsEnabled(IntPtr geom);
994 1039