aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs
diff options
context:
space:
mode:
authorRobert.Adams2011-07-22 10:22:21 -0700
committerDan Lake2011-07-22 10:23:40 -0700
commit5ffec1cd648bc8dcc333fc528707c09bb8dce27d (patch)
treea9c6be19df834d4d53eeff7dec267b75d4c7bacb /OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs
parentMerge branch 'master' into bulletsim (diff)
downloadopensim-SC_OLD-5ffec1cd648bc8dcc333fc528707c09bb8dce27d.zip
opensim-SC_OLD-5ffec1cd648bc8dcc333fc528707c09bb8dce27d.tar.gz
opensim-SC_OLD-5ffec1cd648bc8dcc333fc528707c09bb8dce27d.tar.bz2
opensim-SC_OLD-5ffec1cd648bc8dcc333fc528707c09bb8dce27d.tar.xz
Pass collisions and updates in pinned memory (saves marshaling).
Fix folding feet by using collision normals. Add constraint specification.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs18
1 files changed, 15 insertions, 3 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs b/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs
index b2bc0d7..ace8158 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs
@@ -78,7 +78,13 @@ public struct RaycastHit
78 public float Fraction; 78 public float Fraction;
79 public Vector3 Normal; 79 public Vector3 Normal;
80} 80}
81 81public struct CollisionDesc
82{
83 public uint aID;
84 public uint bID;
85 public Vector3 point;
86 public Vector3 normal;
87}
82public struct EntityProperties 88public struct EntityProperties
83{ 89{
84 public uint ID; 90 public uint ID;
@@ -92,7 +98,8 @@ public struct EntityProperties
92static class BulletSimAPI { 98static class BulletSimAPI {
93 99
94[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 100[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
95public static extern uint Initialize(Vector3 maxPosition); 101public static extern uint Initialize(Vector3 maxPosition, int maxCollisions, IntPtr collisionArray,
102 int maxUpdates, IntPtr updateArray);
96 103
97[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 104[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
98public static extern void SetHeightmap(uint worldID, [MarshalAs(UnmanagedType.LPArray)] float[] heightMap); 105public static extern void SetHeightmap(uint worldID, [MarshalAs(UnmanagedType.LPArray)] float[] heightMap);
@@ -124,7 +131,12 @@ public static extern void CreateLinkset(uint worldID, int objectCount, ShapeData
124 131
125[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 132[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
126public static extern void AddConstraint(uint worldID, uint id1, uint id2, 133public static extern void AddConstraint(uint worldID, uint id1, uint id2,
127 Vector3 frame1, Vector3 frame2, Vector3 lowLinear, Vector3 hiLinear, Vector3 lowAngular, Vector3 hiAngular); 134 Vector3 frame1, Quaternion frame1rot,
135 Vector3 frame2, Quaternion frame2rot,
136 Vector3 lowLinear, Vector3 hiLinear, Vector3 lowAngular, Vector3 hiAngular);
137
138[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
139public static extern bool RemoveConstraintByID(uint worldID, uint id1);
128 140
129[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] 141[DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity]
130public static extern bool RemoveConstraint(uint worldID, uint id1, uint id2); 142public static extern bool RemoveConstraint(uint worldID, uint id1, uint id2);