diff options
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs | 1107 | ||||
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSAPIXNA.cs | 39 |
2 files changed, 1146 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs b/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs new file mode 100755 index 0000000..bbfc1f8 --- /dev/null +++ b/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs | |||
@@ -0,0 +1,1107 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyrightD | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | using System; | ||
28 | using System.Collections.Generic; | ||
29 | using System.Runtime.InteropServices; | ||
30 | using System.Security; | ||
31 | using System.Text; | ||
32 | |||
33 | using OpenMetaverse; | ||
34 | |||
35 | namespace OpenSim.Region.Physics.BulletSPlugin | ||
36 | { | ||
37 | public sealed class BSAPIUnman : BulletSimAPITemplate | ||
38 | { | ||
39 | /* | ||
40 | // Initialization and simulation | ||
41 | public BulletWorld Initialize(Vector3 maxPosition, IntPtr parms, | ||
42 | int maxCollisions, IntPtr collisionArray, | ||
43 | int maxUpdates, IntPtr updateArray | ||
44 | ); | ||
45 | |||
46 | public bool UpdateParameter(BulletWorld world, uint localID, String parm, float value); | ||
47 | |||
48 | public void SetHeightMap(BulletWorld world, float[] heightmap); | ||
49 | |||
50 | public void Shutdown(BulletWorld sim); | ||
51 | |||
52 | public int PhysicsStep(BulletWorld world, float timeStep, int maxSubSteps, float fixedTimeStep, | ||
53 | out int updatedEntityCount, | ||
54 | out IntPtr updatedEntitiesPtr, | ||
55 | out int collidersCount, | ||
56 | out IntPtr collidersPtr); | ||
57 | |||
58 | public bool PushUpdate(BulletBody obj); | ||
59 | */ | ||
60 | |||
61 | // ===================================================================================== | ||
62 | // Mesh, hull, shape and body creation helper routines | ||
63 | public override BulletShape CreateMeshShape(BulletWorld world, | ||
64 | int indicesCount, int[] indices, | ||
65 | int verticesCount, float[] vertices) | ||
66 | { | ||
67 | return new BulletShape( | ||
68 | BSAPI.CreateMeshShape2(world.ptr, indicesCount, indices, verticesCount, vertices), | ||
69 | BSPhysicsShapeType.SHAPE_MESH); | ||
70 | } | ||
71 | |||
72 | public override BulletShape CreateHullShape(BulletWorld world, int hullCount, float[] hulls) | ||
73 | { | ||
74 | return new BulletShape( | ||
75 | BSAPI.CreateHullShape2(world.ptr, hullCount, hulls), | ||
76 | BSPhysicsShapeType.SHAPE_HULL); | ||
77 | } | ||
78 | |||
79 | public override BulletShape BuildHullShapeFromMesh(BulletWorld world, BulletShape meshShape) | ||
80 | { | ||
81 | return new BulletShape( | ||
82 | BSAPI.BuildHullShapeFromMesh2(world.ptr, meshShape.ptr), | ||
83 | BSPhysicsShapeType.SHAPE_HULL); | ||
84 | } | ||
85 | |||
86 | public override BulletShape BuildNativeShape( BulletWorld world, ShapeData shapeData) | ||
87 | { | ||
88 | return new BulletShape( | ||
89 | BSAPI.BuildNativeShape2(world.ptr, shapeData), | ||
90 | shapeData.Type); | ||
91 | } | ||
92 | |||
93 | public override bool IsNativeShape(BulletShape shape) | ||
94 | { | ||
95 | if (shape.HasPhysicalShape) | ||
96 | return BSAPI.IsNativeShape2(shape.ptr); | ||
97 | return false; | ||
98 | } | ||
99 | |||
100 | public override void SetShapeCollisionMargin(BulletShape shape, float margin) | ||
101 | { | ||
102 | if (shape.HasPhysicalShape) | ||
103 | BSAPI.SetShapeCollisionMargin2(shape.ptr, margin); | ||
104 | } | ||
105 | |||
106 | public override BulletShape BuildCapsuleShape(BulletWorld world, float radius, float height, Vector3 scale) | ||
107 | { | ||
108 | return new BulletShape( | ||
109 | BSAPI.BuildCapsuleShape2(world.ptr, radius, height, scale), | ||
110 | BSPhysicsShapeType.SHAPE_CAPSULE); | ||
111 | } | ||
112 | |||
113 | public override BulletShape CreateCompoundShape(BulletWorld sim, bool enableDynamicAabbTree) | ||
114 | { | ||
115 | return new BulletShape( | ||
116 | BSAPI.CreateCompoundShape2(sim.ptr, enableDynamicAabbTree), | ||
117 | BSPhysicsShapeType.SHAPE_COMPOUND); | ||
118 | |||
119 | } | ||
120 | |||
121 | public override int GetNumberOfCompoundChildren(BulletShape shape) | ||
122 | { | ||
123 | if (shape.HasPhysicalShape) | ||
124 | return BSAPI.GetNumberOfCompoundChildren2(shape.ptr); | ||
125 | return 0; | ||
126 | } | ||
127 | |||
128 | public override void AddChildShapeToCompoundShape(BulletShape cShape, BulletShape addShape, Vector3 pos, Quaternion rot) | ||
129 | { | ||
130 | BSAPI.AddChildShapeToCompoundShape2(cShape.ptr, addShape.ptr, pos, rot); | ||
131 | } | ||
132 | |||
133 | public override BulletShape GetChildShapeFromCompoundShapeIndex(BulletShape cShape, int indx) | ||
134 | { | ||
135 | return new BulletShape(BSAPI.GetChildShapeFromCompoundShapeIndex2(cShape.ptr, indx)); | ||
136 | } | ||
137 | |||
138 | public override BulletShape RemoveChildShapeFromCompoundShapeIndex(BulletShape cShape, int indx) | ||
139 | { | ||
140 | return new BulletShape(BSAPI.RemoveChildShapeFromCompoundShapeIndex2(cShape.ptr, indx)); | ||
141 | } | ||
142 | |||
143 | public override void RemoveChildShapeFromCompoundShape(BulletShape cShape, BulletShape removeShape) | ||
144 | { | ||
145 | BSAPI.RemoveChildShapeFromCompoundShape2(cShape.ptr, removeShape.ptr); | ||
146 | } | ||
147 | |||
148 | public override void RecalculateCompoundShapeLocalAabb(BulletShape cShape) | ||
149 | { | ||
150 | BSAPI.RecalculateCompoundShapeLocalAabb2(cShape.ptr); | ||
151 | } | ||
152 | |||
153 | public override BulletShape DuplicateCollisionShape(BulletWorld sim, BulletShape srcShape, uint id) | ||
154 | { | ||
155 | return new BulletShape(BSAPI.DuplicateCollisionShape2(sim.ptr, srcShape.ptr, id), srcShape.type); | ||
156 | } | ||
157 | |||
158 | public override BulletBody CreateBodyFromShapeAndInfo(BulletWorld sim, BulletShape shape, uint id, IntPtr constructionInfo) | ||
159 | { | ||
160 | return new BulletBody(id, BSAPI.CreateBodyFromShapeAndInfo2(sim.ptr, shape.ptr, id, constructionInfo)); | ||
161 | } | ||
162 | |||
163 | public override bool DeleteCollisionShape(BulletWorld world, BulletShape shape) | ||
164 | { | ||
165 | return BSAPI.DeleteCollisionShape2(world.ptr, shape.ptr); | ||
166 | } | ||
167 | |||
168 | public override int GetBodyType(BulletBody obj) | ||
169 | { | ||
170 | return BSAPI.GetBodyType2(obj.ptr); | ||
171 | } | ||
172 | |||
173 | public override BulletBody CreateBodyFromShape(BulletWorld sim, BulletShape shape, uint id, Vector3 pos, Quaternion rot) | ||
174 | { | ||
175 | return new BulletBody(id, BSAPI.CreateBodyFromShape2(sim.ptr, shape.ptr, id, pos, rot)); | ||
176 | } | ||
177 | |||
178 | public override BulletBody CreateBodyWithDefaultMotionState(BulletShape shape, uint id, Vector3 pos, Quaternion rot) | ||
179 | { | ||
180 | return new BulletBody(id, BSAPI.CreateBodyWithDefaultMotionState2(shape.ptr, id, pos, rot)); | ||
181 | } | ||
182 | |||
183 | public override BulletBody CreateGhostFromShape(BulletWorld sim, BulletShape shape, uint id, Vector3 pos, Quaternion rot) | ||
184 | { | ||
185 | return new BulletBody(id, BSAPI.CreateGhostFromShape2(sim.ptr, shape.ptr, id, pos, rot)); | ||
186 | } | ||
187 | |||
188 | public override IntPtr AllocateBodyInfo(BulletBody obj) | ||
189 | { | ||
190 | return BSAPI.AllocateBodyInfo2(obj.ptr); | ||
191 | } | ||
192 | |||
193 | public override void ReleaseBodyInfo(IntPtr obj) | ||
194 | { | ||
195 | BSAPI.ReleaseBodyInfo2(obj); | ||
196 | } | ||
197 | |||
198 | public override void DestroyObject(BulletWorld sim, BulletBody obj) | ||
199 | { | ||
200 | BSAPI.DestroyObject2(sim.ptr, obj.ptr); | ||
201 | } | ||
202 | |||
203 | /* | ||
204 | // ===================================================================================== | ||
205 | // Terrain creation and helper routines | ||
206 | public override IntPtr CreateHeightMapInfo(BulletWorld sim, uint id, Vector3 minCoords, Vector3 maxCoords, | ||
207 | [MarshalAs(UnmanagedType.LPArray)] float[] heightMap, float collisionMargin); | ||
208 | |||
209 | public override IntPtr FillHeightMapInfo(BulletWorld sim, IntPtr mapInfo, uint id, Vector3 minCoords, Vector3 maxCoords, | ||
210 | [MarshalAs(UnmanagedType.LPArray)] float[] heightMap, float collisionMargin); | ||
211 | |||
212 | public override bool ReleaseHeightMapInfo(IntPtr heightMapInfo); | ||
213 | |||
214 | public override BulletBody CreateGroundPlaneShape(uint id, float height, float collisionMargin); | ||
215 | |||
216 | public override BulletBody CreateTerrainShape(IntPtr mapInfo); | ||
217 | |||
218 | // ===================================================================================== | ||
219 | // Constraint creation and helper routines | ||
220 | public override BulletConstraint Create6DofConstraint(BulletWorld world, BulletBody obj1, BulletBody obj2, | ||
221 | Vector3 frame1loc, Quaternion frame1rot, | ||
222 | Vector3 frame2loc, Quaternion frame2rot, | ||
223 | bool useLinearReferenceFrameA, bool disableCollisionsBetweenLinkedBodies); | ||
224 | |||
225 | public override BulletConstraint Create6DofConstraintToPoint(BulletWorld world, BulletBody obj1, BulletBody obj2, | ||
226 | Vector3 joinPoint, | ||
227 | bool useLinearReferenceFrameA, bool disableCollisionsBetweenLinkedBodies); | ||
228 | |||
229 | public override BulletConstraint CreateHingeConstraint(BulletWorld world, BulletBody obj1, BulletBody obj2, | ||
230 | Vector3 pivotinA, Vector3 pivotinB, | ||
231 | Vector3 axisInA, Vector3 axisInB, | ||
232 | bool useLinearReferenceFrameA, bool disableCollisionsBetweenLinkedBodies); | ||
233 | |||
234 | public override void SetConstraintEnable(BulletConstraint constrain, float numericTrueFalse); | ||
235 | |||
236 | public override void SetConstraintNumSolverIterations(BulletConstraint constrain, float iterations); | ||
237 | |||
238 | public override bool SetFrames(BulletConstraint constrain, | ||
239 | Vector3 frameA, Quaternion frameArot, Vector3 frameB, Quaternion frameBrot); | ||
240 | |||
241 | public override bool SetLinearLimits(BulletConstraint constrain, Vector3 low, Vector3 hi); | ||
242 | |||
243 | public override bool SetAngularLimits(BulletConstraint constrain, Vector3 low, Vector3 hi); | ||
244 | |||
245 | public override bool UseFrameOffset(BulletConstraint constrain, float enable); | ||
246 | |||
247 | public override bool TranslationalLimitMotor(BulletConstraint constrain, float enable, float targetVel, float maxMotorForce); | ||
248 | |||
249 | public override bool SetBreakingImpulseThreshold(BulletConstraint constrain, float threshold); | ||
250 | |||
251 | public override bool CalculateTransforms(BulletConstraint constrain); | ||
252 | |||
253 | public override bool SetConstraintParam(BulletConstraint constrain, ConstraintParams paramIndex, float value, ConstraintParamAxis axis); | ||
254 | |||
255 | public override bool DestroyConstraint(BulletWorld world, BulletConstraint constrain); | ||
256 | |||
257 | // ===================================================================================== | ||
258 | // btCollisionWorld entries | ||
259 | public override void UpdateSingleAabb(BulletWorld world, BulletBody obj); | ||
260 | |||
261 | public override void UpdateAabbs(BulletWorld world); | ||
262 | |||
263 | public override bool GetForceUpdateAllAabbs(BulletWorld world); | ||
264 | |||
265 | public override void SetForceUpdateAllAabbs(BulletWorld world, bool force); | ||
266 | |||
267 | // ===================================================================================== | ||
268 | // btDynamicsWorld entries | ||
269 | public override bool AddObjectToWorld(BulletWorld world, BulletBody obj); | ||
270 | |||
271 | public override bool RemoveObjectFromWorld(BulletWorld world, BulletBody obj); | ||
272 | |||
273 | public override bool AddConstraintToWorld(BulletWorld world, BulletConstraint constrain, bool disableCollisionsBetweenLinkedObjects); | ||
274 | |||
275 | public override bool RemoveConstraintFromWorld(BulletWorld world, BulletConstraint constrain); | ||
276 | // ===================================================================================== | ||
277 | // btCollisionObject entries | ||
278 | public override Vector3 GetAnisotripicFriction(BulletConstraint constrain); | ||
279 | |||
280 | public override Vector3 SetAnisotripicFriction(BulletConstraint constrain, Vector3 frict); | ||
281 | |||
282 | public override bool HasAnisotripicFriction(BulletConstraint constrain); | ||
283 | |||
284 | public override void SetContactProcessingThreshold(BulletBody obj, float val); | ||
285 | |||
286 | public override float GetContactProcessingThreshold(BulletBody obj); | ||
287 | |||
288 | public override bool IsStaticObject(BulletBody obj); | ||
289 | |||
290 | public override bool IsKinematicObject(BulletBody obj); | ||
291 | |||
292 | public override bool IsStaticOrKinematicObject(BulletBody obj); | ||
293 | |||
294 | public override bool HasContactResponse(BulletBody obj); | ||
295 | |||
296 | public override void SetCollisionShape(BulletWorld sim, BulletBody obj, BulletBody shape); | ||
297 | |||
298 | public override BulletShape GetCollisionShape(BulletBody obj); | ||
299 | |||
300 | public override int GetActivationState(BulletBody obj); | ||
301 | |||
302 | public override void SetActivationState(BulletBody obj, int state); | ||
303 | |||
304 | public override void SetDeactivationTime(BulletBody obj, float dtime); | ||
305 | |||
306 | public override float GetDeactivationTime(BulletBody obj); | ||
307 | |||
308 | public override void ForceActivationState(BulletBody obj, ActivationState state); | ||
309 | |||
310 | public override void Activate(BulletBody obj, bool forceActivation); | ||
311 | |||
312 | public override bool IsActive(BulletBody obj); | ||
313 | |||
314 | public override void SetRestitution(BulletBody obj, float val); | ||
315 | |||
316 | public override float GetRestitution(BulletBody obj); | ||
317 | |||
318 | public override void SetFriction(BulletBody obj, float val); | ||
319 | |||
320 | public override float GetFriction(BulletBody obj); | ||
321 | |||
322 | public override Vector3 GetPosition(BulletBody obj); | ||
323 | |||
324 | public override Quaternion GetOrientation(BulletBody obj); | ||
325 | |||
326 | public override void SetTranslation(BulletBody obj, Vector3 position, Quaternion rotation); | ||
327 | |||
328 | public override IntPtr GetBroadphaseHandle(BulletBody obj); | ||
329 | |||
330 | public override void SetBroadphaseHandle(BulletBody obj, IntPtr handle); | ||
331 | |||
332 | public override void SetInterpolationLinearVelocity(BulletBody obj, Vector3 vel); | ||
333 | |||
334 | public override void SetInterpolationAngularVelocity(BulletBody obj, Vector3 vel); | ||
335 | |||
336 | public override void SetInterpolationVelocity(BulletBody obj, Vector3 linearVel, Vector3 angularVel); | ||
337 | |||
338 | public override float GetHitFraction(BulletBody obj); | ||
339 | |||
340 | public override void SetHitFraction(BulletBody obj, float val); | ||
341 | |||
342 | public override CollisionFlags GetCollisionFlags(BulletBody obj); | ||
343 | |||
344 | public override CollisionFlags SetCollisionFlags(BulletBody obj, CollisionFlags flags); | ||
345 | |||
346 | public override CollisionFlags AddToCollisionFlags(BulletBody obj, CollisionFlags flags); | ||
347 | |||
348 | public override CollisionFlags RemoveFromCollisionFlags(BulletBody obj, CollisionFlags flags); | ||
349 | |||
350 | public override float GetCcdMotionThreshold(BulletBody obj); | ||
351 | |||
352 | public override void SetCcdMotionThreshold(BulletBody obj, float val); | ||
353 | |||
354 | public override float GetCcdSweptSphereRadius(BulletBody obj); | ||
355 | |||
356 | public override void SetCcdSweptSphereRadius(BulletBody obj, float val); | ||
357 | |||
358 | public override IntPtr GetUserPointer(BulletBody obj); | ||
359 | |||
360 | public override void SetUserPointer(BulletBody obj, IntPtr val); | ||
361 | |||
362 | // ===================================================================================== | ||
363 | // btRigidBody entries | ||
364 | public override void ApplyGravity(BulletBody obj); | ||
365 | |||
366 | public override void SetGravity(BulletBody obj, Vector3 val); | ||
367 | |||
368 | public override Vector3 GetGravity(BulletBody obj); | ||
369 | |||
370 | public override void SetDamping(BulletBody obj, float lin_damping, float ang_damping); | ||
371 | |||
372 | public override void SetLinearDamping(BulletBody obj, float lin_damping); | ||
373 | |||
374 | public override void SetAngularDamping(BulletBody obj, float ang_damping); | ||
375 | |||
376 | public override float GetLinearDamping(BulletBody obj); | ||
377 | |||
378 | public override float GetAngularDamping(BulletBody obj); | ||
379 | |||
380 | public override float GetLinearSleepingThreshold(BulletBody obj); | ||
381 | |||
382 | |||
383 | public override void ApplyDamping(BulletBody obj, float timeStep); | ||
384 | |||
385 | public override void SetMassProps(BulletBody obj, float mass, Vector3 inertia); | ||
386 | |||
387 | public override Vector3 GetLinearFactor(BulletBody obj); | ||
388 | |||
389 | public override void SetLinearFactor(BulletBody obj, Vector3 factor); | ||
390 | |||
391 | public override void SetCenterOfMassByPosRot(BulletBody obj, Vector3 pos, Quaternion rot); | ||
392 | |||
393 | // Add a force to the object as if its mass is one. | ||
394 | public override void ApplyCentralForce(BulletBody obj, Vector3 force); | ||
395 | |||
396 | // Set the force being applied to the object as if its mass is one. | ||
397 | public override void SetObjectForce(BulletBody obj, Vector3 force); | ||
398 | |||
399 | public override Vector3 GetTotalForce(BulletBody obj); | ||
400 | |||
401 | public override Vector3 GetTotalTorque(BulletBody obj); | ||
402 | |||
403 | public override Vector3 GetInvInertiaDiagLocal(BulletBody obj); | ||
404 | |||
405 | public override void SetInvInertiaDiagLocal(BulletBody obj, Vector3 inert); | ||
406 | |||
407 | public override void SetSleepingThresholds(BulletBody obj, float lin_threshold, float ang_threshold); | ||
408 | |||
409 | public override void ApplyTorque(BulletBody obj, Vector3 torque); | ||
410 | |||
411 | // Apply force at the given point. Will add torque to the object. | ||
412 | public override void ApplyForce(BulletBody obj, Vector3 force, Vector3 pos); | ||
413 | |||
414 | // Apply impulse to the object. Same as "ApplycentralForce" but force scaled by object's mass. | ||
415 | public override void ApplyCentralImpulse(BulletBody obj, Vector3 imp); | ||
416 | |||
417 | // Apply impulse to the object's torque. Force is scaled by object's mass. | ||
418 | public override void ApplyTorqueImpulse(BulletBody obj, Vector3 imp); | ||
419 | |||
420 | // Apply impulse at the point given. For is scaled by object's mass and effects both linear and angular forces. | ||
421 | public override void ApplyImpulse(BulletBody obj, Vector3 imp, Vector3 pos); | ||
422 | |||
423 | public override void ClearForces(BulletBody obj); | ||
424 | |||
425 | public override void ClearAllForces(BulletBody obj); | ||
426 | |||
427 | public override void UpdateInertiaTensor(BulletBody obj); | ||
428 | |||
429 | public override Vector3 GetLinearVelocity(BulletBody obj); | ||
430 | |||
431 | public override Vector3 GetAngularVelocity(BulletBody obj); | ||
432 | |||
433 | public override void SetLinearVelocity(BulletBody obj, Vector3 val); | ||
434 | |||
435 | public override void SetAngularVelocity(BulletBody obj, Vector3 angularVelocity); | ||
436 | |||
437 | public override Vector3 GetVelocityInLocalPoint(BulletBody obj, Vector3 pos); | ||
438 | |||
439 | public override void Translate(BulletBody obj, Vector3 trans); | ||
440 | |||
441 | public override void UpdateDeactivation(BulletBody obj, float timeStep); | ||
442 | |||
443 | public override bool WantsSleeping(BulletBody obj); | ||
444 | |||
445 | public override void SetAngularFactor(BulletBody obj, float factor); | ||
446 | |||
447 | public override void SetAngularFactorV(BulletBody obj, Vector3 factor); | ||
448 | |||
449 | public override Vector3 GetAngularFactor(BulletBody obj); | ||
450 | |||
451 | public override bool IsInWorld(BulletBody obj); | ||
452 | |||
453 | public override void AddConstraintRef(BulletBody obj, BulletConstraint constrain); | ||
454 | |||
455 | public override void RemoveConstraintRef(BulletBody obj, BulletConstraint constrain); | ||
456 | |||
457 | public override BulletConstraint GetConstraintRef(BulletBody obj, int index); | ||
458 | |||
459 | public override int GetNumConstraintRefs(BulletBody obj); | ||
460 | |||
461 | public override bool SetCollisionGroupMask(BulletBody body, uint filter, uint mask); | ||
462 | |||
463 | // ===================================================================================== | ||
464 | // btCollisionShape entries | ||
465 | |||
466 | public override float GetAngularMotionDisc(BulletShape shape); | ||
467 | |||
468 | public override float GetContactBreakingThreshold(BulletShape shape, float defaultFactor); | ||
469 | |||
470 | public override bool IsPolyhedral(BulletShape shape); | ||
471 | |||
472 | public override bool IsConvex2d(BulletShape shape); | ||
473 | |||
474 | public override bool IsConvex(BulletShape shape); | ||
475 | |||
476 | public override bool IsNonMoving(BulletShape shape); | ||
477 | |||
478 | public override bool IsConcave(BulletShape shape); | ||
479 | |||
480 | public override bool IsCompound(BulletShape shape); | ||
481 | |||
482 | public override bool IsSoftBody(BulletShape shape); | ||
483 | |||
484 | public override bool IsInfinite(BulletShape shape); | ||
485 | |||
486 | public override void SetLocalScaling(BulletShape shape, Vector3 scale); | ||
487 | |||
488 | public override Vector3 GetLocalScaling(BulletShape shape); | ||
489 | |||
490 | public override Vector3 CalculateLocalInertia(BulletShape shape, float mass); | ||
491 | |||
492 | public override int GetShapeType(BulletShape shape); | ||
493 | |||
494 | public override void SetMargin(BulletShape shape, float val); | ||
495 | |||
496 | public override float GetMargin(BulletShape shape); | ||
497 | */ | ||
498 | |||
499 | static class BSAPI | ||
500 | { | ||
501 | // ===================================================================================== | ||
502 | // Mesh, hull, shape and body creation helper routines | ||
503 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
504 | public static extern IntPtr CreateMeshShape2(IntPtr world, | ||
505 | int indicesCount, [MarshalAs(UnmanagedType.LPArray)] int[] indices, | ||
506 | int verticesCount, [MarshalAs(UnmanagedType.LPArray)] float[] vertices ); | ||
507 | |||
508 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
509 | public static extern IntPtr CreateHullShape2(IntPtr world, | ||
510 | int hullCount, [MarshalAs(UnmanagedType.LPArray)] float[] hulls); | ||
511 | |||
512 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
513 | public static extern IntPtr BuildHullShapeFromMesh2(IntPtr world, IntPtr meshShape); | ||
514 | |||
515 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
516 | public static extern IntPtr BuildNativeShape2(IntPtr world, ShapeData shapeData); | ||
517 | |||
518 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
519 | public static extern bool IsNativeShape2(IntPtr shape); | ||
520 | |||
521 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
522 | public static extern void SetShapeCollisionMargin2(IntPtr shape, float margin); | ||
523 | |||
524 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
525 | public static extern IntPtr BuildCapsuleShape2(IntPtr world, float radius, float height, Vector3 scale); | ||
526 | |||
527 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
528 | public static extern IntPtr CreateCompoundShape2(IntPtr sim, bool enableDynamicAabbTree); | ||
529 | |||
530 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
531 | public static extern int GetNumberOfCompoundChildren2(IntPtr cShape); | ||
532 | |||
533 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
534 | public static extern void AddChildShapeToCompoundShape2(IntPtr cShape, IntPtr addShape, Vector3 pos, Quaternion rot); | ||
535 | |||
536 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
537 | public static extern IntPtr GetChildShapeFromCompoundShapeIndex2(IntPtr cShape, int indx); | ||
538 | |||
539 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
540 | public static extern IntPtr RemoveChildShapeFromCompoundShapeIndex2(IntPtr cShape, int indx); | ||
541 | |||
542 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
543 | public static extern void RemoveChildShapeFromCompoundShape2(IntPtr cShape, IntPtr removeShape); | ||
544 | |||
545 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
546 | public static extern void RecalculateCompoundShapeLocalAabb2(IntPtr cShape); | ||
547 | |||
548 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
549 | public static extern IntPtr DuplicateCollisionShape2(IntPtr sim, IntPtr srcShape, uint id); | ||
550 | |||
551 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
552 | public static extern IntPtr CreateBodyFromShapeAndInfo2(IntPtr sim, IntPtr shape, uint id, IntPtr constructionInfo); | ||
553 | |||
554 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
555 | public static extern bool DeleteCollisionShape2(IntPtr world, IntPtr shape); | ||
556 | |||
557 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
558 | public static extern int GetBodyType2(IntPtr obj); | ||
559 | |||
560 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
561 | public static extern IntPtr CreateBodyFromShape2(IntPtr sim, IntPtr shape, uint id, Vector3 pos, Quaternion rot); | ||
562 | |||
563 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
564 | public static extern IntPtr CreateBodyWithDefaultMotionState2(IntPtr shape, uint id, Vector3 pos, Quaternion rot); | ||
565 | |||
566 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
567 | public static extern IntPtr CreateGhostFromShape2(IntPtr sim, IntPtr shape, uint id, Vector3 pos, Quaternion rot); | ||
568 | |||
569 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
570 | public static extern IntPtr AllocateBodyInfo2(IntPtr obj); | ||
571 | |||
572 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
573 | public static extern void ReleaseBodyInfo2(IntPtr obj); | ||
574 | |||
575 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
576 | public static extern void DestroyObject2(IntPtr sim, IntPtr obj); | ||
577 | |||
578 | } | ||
579 | } | ||
580 | |||
581 | // =============================================================================== | ||
582 | // =============================================================================== | ||
583 | // =============================================================================== | ||
584 | // =============================================================================== | ||
585 | // =============================================================================== | ||
586 | // =============================================================================== | ||
587 | // =============================================================================== | ||
588 | // =============================================================================== | ||
589 | // =============================================================================== | ||
590 | // =============================================================================== | ||
591 | // =============================================================================== | ||
592 | // =============================================================================== | ||
593 | // =============================================================================== | ||
594 | static class BulletSimAPI { | ||
595 | // =============================================================================== | ||
596 | // Link back to the managed code for outputting log messages | ||
597 | [UnmanagedFunctionPointer(CallingConvention.Cdecl)] | ||
598 | public delegate void DebugLogCallback([MarshalAs(UnmanagedType.LPStr)]string msg); | ||
599 | |||
600 | // =============================================================================== | ||
601 | // Initialization and simulation | ||
602 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
603 | public static extern IntPtr Initialize2(Vector3 maxPosition, IntPtr parms, | ||
604 | int maxCollisions, IntPtr collisionArray, | ||
605 | int maxUpdates, IntPtr updateArray, | ||
606 | DebugLogCallback logRoutine); | ||
607 | |||
608 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
609 | public static extern bool UpdateParameter2(IntPtr world, uint localID, String parm, float value); | ||
610 | |||
611 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
612 | public static extern void SetHeightMap2(IntPtr world, float[] heightmap); | ||
613 | |||
614 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
615 | public static extern void Shutdown2(IntPtr sim); | ||
616 | |||
617 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
618 | public static extern int PhysicsStep2(IntPtr world, float timeStep, int maxSubSteps, float fixedTimeStep, | ||
619 | out int updatedEntityCount, | ||
620 | out IntPtr updatedEntitiesPtr, | ||
621 | out int collidersCount, | ||
622 | out IntPtr collidersPtr); | ||
623 | |||
624 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
625 | public static extern bool PushUpdate2(IntPtr obj); | ||
626 | |||
627 | // ===================================================================================== | ||
628 | // Terrain creation and helper routines | ||
629 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
630 | public static extern IntPtr CreateHeightMapInfo2(IntPtr sim, uint id, Vector3 minCoords, Vector3 maxCoords, | ||
631 | [MarshalAs(UnmanagedType.LPArray)] float[] heightMap, float collisionMargin); | ||
632 | |||
633 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
634 | public static extern IntPtr FillHeightMapInfo2(IntPtr sim, IntPtr mapInfo, uint id, Vector3 minCoords, Vector3 maxCoords, | ||
635 | [MarshalAs(UnmanagedType.LPArray)] float[] heightMap, float collisionMargin); | ||
636 | |||
637 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
638 | public static extern bool ReleaseHeightMapInfo2(IntPtr heightMapInfo); | ||
639 | |||
640 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
641 | public static extern IntPtr CreateGroundPlaneShape2(uint id, float height, float collisionMargin); | ||
642 | |||
643 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
644 | public static extern IntPtr CreateTerrainShape2(IntPtr mapInfo); | ||
645 | |||
646 | // ===================================================================================== | ||
647 | // Constraint creation and helper routines | ||
648 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
649 | public static extern IntPtr Create6DofConstraint2(IntPtr world, IntPtr obj1, IntPtr obj2, | ||
650 | Vector3 frame1loc, Quaternion frame1rot, | ||
651 | Vector3 frame2loc, Quaternion frame2rot, | ||
652 | bool useLinearReferenceFrameA, bool disableCollisionsBetweenLinkedBodies); | ||
653 | |||
654 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
655 | public static extern IntPtr Create6DofConstraintToPoint2(IntPtr world, IntPtr obj1, IntPtr obj2, | ||
656 | Vector3 joinPoint, | ||
657 | bool useLinearReferenceFrameA, bool disableCollisionsBetweenLinkedBodies); | ||
658 | |||
659 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
660 | public static extern IntPtr CreateHingeConstraint2(IntPtr world, IntPtr obj1, IntPtr obj2, | ||
661 | Vector3 pivotinA, Vector3 pivotinB, | ||
662 | Vector3 axisInA, Vector3 axisInB, | ||
663 | bool useLinearReferenceFrameA, bool disableCollisionsBetweenLinkedBodies); | ||
664 | |||
665 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
666 | public static extern void SetConstraintEnable2(IntPtr constrain, float numericTrueFalse); | ||
667 | |||
668 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
669 | public static extern void SetConstraintNumSolverIterations2(IntPtr constrain, float iterations); | ||
670 | |||
671 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
672 | public static extern bool SetFrames2(IntPtr constrain, | ||
673 | Vector3 frameA, Quaternion frameArot, Vector3 frameB, Quaternion frameBrot); | ||
674 | |||
675 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
676 | public static extern bool SetLinearLimits2(IntPtr constrain, Vector3 low, Vector3 hi); | ||
677 | |||
678 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
679 | public static extern bool SetAngularLimits2(IntPtr constrain, Vector3 low, Vector3 hi); | ||
680 | |||
681 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
682 | public static extern bool UseFrameOffset2(IntPtr constrain, float enable); | ||
683 | |||
684 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
685 | public static extern bool TranslationalLimitMotor2(IntPtr constrain, float enable, float targetVel, float maxMotorForce); | ||
686 | |||
687 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
688 | public static extern bool SetBreakingImpulseThreshold2(IntPtr constrain, float threshold); | ||
689 | |||
690 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
691 | public static extern bool CalculateTransforms2(IntPtr constrain); | ||
692 | |||
693 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
694 | public static extern bool SetConstraintParam2(IntPtr constrain, ConstraintParams paramIndex, float value, ConstraintParamAxis axis); | ||
695 | |||
696 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
697 | public static extern bool DestroyConstraint2(IntPtr world, IntPtr constrain); | ||
698 | |||
699 | // ===================================================================================== | ||
700 | // btCollisionWorld entries | ||
701 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
702 | public static extern void UpdateSingleAabb2(IntPtr world, IntPtr obj); | ||
703 | |||
704 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
705 | public static extern void UpdateAabbs2(IntPtr world); | ||
706 | |||
707 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
708 | public static extern bool GetForceUpdateAllAabbs2(IntPtr world); | ||
709 | |||
710 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
711 | public static extern void SetForceUpdateAllAabbs2(IntPtr world, bool force); | ||
712 | |||
713 | // ===================================================================================== | ||
714 | // btDynamicsWorld entries | ||
715 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
716 | public static extern bool AddObjectToWorld2(IntPtr world, IntPtr obj); | ||
717 | |||
718 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
719 | public static extern bool RemoveObjectFromWorld2(IntPtr world, IntPtr obj); | ||
720 | |||
721 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
722 | public static extern bool AddConstraintToWorld2(IntPtr world, IntPtr constrain, bool disableCollisionsBetweenLinkedObjects); | ||
723 | |||
724 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
725 | public static extern bool RemoveConstraintFromWorld2(IntPtr world, IntPtr constrain); | ||
726 | // ===================================================================================== | ||
727 | // btCollisionObject entries | ||
728 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
729 | public static extern Vector3 GetAnisotripicFriction2(IntPtr constrain); | ||
730 | |||
731 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
732 | public static extern Vector3 SetAnisotripicFriction2(IntPtr constrain, Vector3 frict); | ||
733 | |||
734 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
735 | public static extern bool HasAnisotripicFriction2(IntPtr constrain); | ||
736 | |||
737 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
738 | public static extern void SetContactProcessingThreshold2(IntPtr obj, float val); | ||
739 | |||
740 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
741 | public static extern float GetContactProcessingThreshold2(IntPtr obj); | ||
742 | |||
743 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
744 | public static extern bool IsStaticObject2(IntPtr obj); | ||
745 | |||
746 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
747 | public static extern bool IsKinematicObject2(IntPtr obj); | ||
748 | |||
749 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
750 | public static extern bool IsStaticOrKinematicObject2(IntPtr obj); | ||
751 | |||
752 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
753 | public static extern bool HasContactResponse2(IntPtr obj); | ||
754 | |||
755 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
756 | public static extern void SetCollisionShape2(IntPtr sim, IntPtr obj, IntPtr shape); | ||
757 | |||
758 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
759 | public static extern IntPtr GetCollisionShape2(IntPtr obj); | ||
760 | |||
761 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
762 | public static extern int GetActivationState2(IntPtr obj); | ||
763 | |||
764 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
765 | public static extern void SetActivationState2(IntPtr obj, int state); | ||
766 | |||
767 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
768 | public static extern void SetDeactivationTime2(IntPtr obj, float dtime); | ||
769 | |||
770 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
771 | public static extern float GetDeactivationTime2(IntPtr obj); | ||
772 | |||
773 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
774 | public static extern void ForceActivationState2(IntPtr obj, ActivationState state); | ||
775 | |||
776 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
777 | public static extern void Activate2(IntPtr obj, bool forceActivation); | ||
778 | |||
779 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
780 | public static extern bool IsActive2(IntPtr obj); | ||
781 | |||
782 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
783 | public static extern void SetRestitution2(IntPtr obj, float val); | ||
784 | |||
785 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
786 | public static extern float GetRestitution2(IntPtr obj); | ||
787 | |||
788 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
789 | public static extern void SetFriction2(IntPtr obj, float val); | ||
790 | |||
791 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
792 | public static extern float GetFriction2(IntPtr obj); | ||
793 | |||
794 | /* Haven't defined the type 'Transform' | ||
795 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
796 | public static extern Transform GetWorldTransform2(IntPtr obj); | ||
797 | |||
798 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
799 | public static extern void setWorldTransform2(IntPtr obj, Transform trans); | ||
800 | */ | ||
801 | |||
802 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
803 | public static extern Vector3 GetPosition2(IntPtr obj); | ||
804 | |||
805 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
806 | public static extern Quaternion GetOrientation2(IntPtr obj); | ||
807 | |||
808 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
809 | public static extern void SetTranslation2(IntPtr obj, Vector3 position, Quaternion rotation); | ||
810 | |||
811 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
812 | public static extern IntPtr GetBroadphaseHandle2(IntPtr obj); | ||
813 | |||
814 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
815 | public static extern void SetBroadphaseHandle2(IntPtr obj, IntPtr handle); | ||
816 | |||
817 | /* | ||
818 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
819 | public static extern Transform GetInterpolationWorldTransform2(IntPtr obj); | ||
820 | |||
821 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
822 | public static extern void SetInterpolationWorldTransform2(IntPtr obj, Transform trans); | ||
823 | */ | ||
824 | |||
825 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
826 | public static extern void SetInterpolationLinearVelocity2(IntPtr obj, Vector3 vel); | ||
827 | |||
828 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
829 | public static extern void SetInterpolationAngularVelocity2(IntPtr obj, Vector3 vel); | ||
830 | |||
831 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
832 | public static extern void SetInterpolationVelocity2(IntPtr obj, Vector3 linearVel, Vector3 angularVel); | ||
833 | |||
834 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
835 | public static extern float GetHitFraction2(IntPtr obj); | ||
836 | |||
837 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
838 | public static extern void SetHitFraction2(IntPtr obj, float val); | ||
839 | |||
840 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
841 | public static extern CollisionFlags GetCollisionFlags2(IntPtr obj); | ||
842 | |||
843 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
844 | public static extern CollisionFlags SetCollisionFlags2(IntPtr obj, CollisionFlags flags); | ||
845 | |||
846 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
847 | public static extern CollisionFlags AddToCollisionFlags2(IntPtr obj, CollisionFlags flags); | ||
848 | |||
849 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
850 | public static extern CollisionFlags RemoveFromCollisionFlags2(IntPtr obj, CollisionFlags flags); | ||
851 | |||
852 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
853 | public static extern float GetCcdMotionThreshold2(IntPtr obj); | ||
854 | |||
855 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
856 | public static extern void SetCcdMotionThreshold2(IntPtr obj, float val); | ||
857 | |||
858 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
859 | public static extern float GetCcdSweptSphereRadius2(IntPtr obj); | ||
860 | |||
861 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
862 | public static extern void SetCcdSweptSphereRadius2(IntPtr obj, float val); | ||
863 | |||
864 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
865 | public static extern IntPtr GetUserPointer2(IntPtr obj); | ||
866 | |||
867 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
868 | public static extern void SetUserPointer2(IntPtr obj, IntPtr val); | ||
869 | |||
870 | // ===================================================================================== | ||
871 | // btRigidBody entries | ||
872 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
873 | public static extern void ApplyGravity2(IntPtr obj); | ||
874 | |||
875 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
876 | public static extern void SetGravity2(IntPtr obj, Vector3 val); | ||
877 | |||
878 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
879 | public static extern Vector3 GetGravity2(IntPtr obj); | ||
880 | |||
881 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
882 | public static extern void SetDamping2(IntPtr obj, float lin_damping, float ang_damping); | ||
883 | |||
884 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
885 | public static extern void SetLinearDamping2(IntPtr obj, float lin_damping); | ||
886 | |||
887 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
888 | public static extern void SetAngularDamping2(IntPtr obj, float ang_damping); | ||
889 | |||
890 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
891 | public static extern float GetLinearDamping2(IntPtr obj); | ||
892 | |||
893 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
894 | public static extern float GetAngularDamping2(IntPtr obj); | ||
895 | |||
896 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
897 | public static extern float GetLinearSleepingThreshold2(IntPtr obj); | ||
898 | |||
899 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
900 | public static extern float GetAngularSleepingThreshold2(IntPtr obj); | ||
901 | |||
902 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
903 | public static extern void ApplyDamping2(IntPtr obj, float timeStep); | ||
904 | |||
905 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
906 | public static extern void SetMassProps2(IntPtr obj, float mass, Vector3 inertia); | ||
907 | |||
908 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
909 | public static extern Vector3 GetLinearFactor2(IntPtr obj); | ||
910 | |||
911 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
912 | public static extern void SetLinearFactor2(IntPtr obj, Vector3 factor); | ||
913 | |||
914 | /* | ||
915 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
916 | public static extern void SetCenterOfMassTransform2(IntPtr obj, Transform trans); | ||
917 | */ | ||
918 | |||
919 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
920 | public static extern void SetCenterOfMassByPosRot2(IntPtr obj, Vector3 pos, Quaternion rot); | ||
921 | |||
922 | // Add a force to the object as if its mass is one. | ||
923 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
924 | public static extern void ApplyCentralForce2(IntPtr obj, Vector3 force); | ||
925 | |||
926 | // Set the force being applied to the object as if its mass is one. | ||
927 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
928 | public static extern void SetObjectForce2(IntPtr obj, Vector3 force); | ||
929 | |||
930 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
931 | public static extern Vector3 GetTotalForce2(IntPtr obj); | ||
932 | |||
933 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
934 | public static extern Vector3 GetTotalTorque2(IntPtr obj); | ||
935 | |||
936 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
937 | public static extern Vector3 GetInvInertiaDiagLocal2(IntPtr obj); | ||
938 | |||
939 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
940 | public static extern void SetInvInertiaDiagLocal2(IntPtr obj, Vector3 inert); | ||
941 | |||
942 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
943 | public static extern void SetSleepingThresholds2(IntPtr obj, float lin_threshold, float ang_threshold); | ||
944 | |||
945 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
946 | public static extern void ApplyTorque2(IntPtr obj, Vector3 torque); | ||
947 | |||
948 | // Apply force at the given point. Will add torque to the object. | ||
949 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
950 | public static extern void ApplyForce2(IntPtr obj, Vector3 force, Vector3 pos); | ||
951 | |||
952 | // Apply impulse to the object. Same as "ApplycentralForce" but force scaled by object's mass. | ||
953 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
954 | public static extern void ApplyCentralImpulse2(IntPtr obj, Vector3 imp); | ||
955 | |||
956 | // Apply impulse to the object's torque. Force is scaled by object's mass. | ||
957 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
958 | public static extern void ApplyTorqueImpulse2(IntPtr obj, Vector3 imp); | ||
959 | |||
960 | // Apply impulse at the point given. For is scaled by object's mass and effects both linear and angular forces. | ||
961 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
962 | public static extern void ApplyImpulse2(IntPtr obj, Vector3 imp, Vector3 pos); | ||
963 | |||
964 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
965 | public static extern void ClearForces2(IntPtr obj); | ||
966 | |||
967 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
968 | public static extern void ClearAllForces2(IntPtr obj); | ||
969 | |||
970 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
971 | public static extern void UpdateInertiaTensor2(IntPtr obj); | ||
972 | |||
973 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
974 | public static extern Vector3 GetCenterOfMassPosition2(IntPtr obj); | ||
975 | |||
976 | /* | ||
977 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
978 | public static extern Transform GetCenterOfMassTransform2(IntPtr obj); | ||
979 | */ | ||
980 | |||
981 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
982 | public static extern Vector3 GetLinearVelocity2(IntPtr obj); | ||
983 | |||
984 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
985 | public static extern Vector3 GetAngularVelocity2(IntPtr obj); | ||
986 | |||
987 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
988 | public static extern void SetLinearVelocity2(IntPtr obj, Vector3 val); | ||
989 | |||
990 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
991 | public static extern void SetAngularVelocity2(IntPtr obj, Vector3 angularVelocity); | ||
992 | |||
993 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
994 | public static extern Vector3 GetVelocityInLocalPoint2(IntPtr obj, Vector3 pos); | ||
995 | |||
996 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
997 | public static extern void Translate2(IntPtr obj, Vector3 trans); | ||
998 | |||
999 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1000 | public static extern void UpdateDeactivation2(IntPtr obj, float timeStep); | ||
1001 | |||
1002 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1003 | public static extern bool WantsSleeping2(IntPtr obj); | ||
1004 | |||
1005 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1006 | public static extern void SetAngularFactor2(IntPtr obj, float factor); | ||
1007 | |||
1008 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1009 | public static extern void SetAngularFactorV2(IntPtr obj, Vector3 factor); | ||
1010 | |||
1011 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1012 | public static extern Vector3 GetAngularFactor2(IntPtr obj); | ||
1013 | |||
1014 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1015 | public static extern bool IsInWorld2(IntPtr obj); | ||
1016 | |||
1017 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1018 | public static extern void AddConstraintRef2(IntPtr obj, IntPtr constrain); | ||
1019 | |||
1020 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1021 | public static extern void RemoveConstraintRef2(IntPtr obj, IntPtr constrain); | ||
1022 | |||
1023 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1024 | public static extern IntPtr GetConstraintRef2(IntPtr obj, int index); | ||
1025 | |||
1026 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1027 | public static extern int GetNumConstraintRefs2(IntPtr obj); | ||
1028 | |||
1029 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1030 | public static extern bool SetCollisionGroupMask2(IntPtr body, uint filter, uint mask); | ||
1031 | |||
1032 | // ===================================================================================== | ||
1033 | // btCollisionShape entries | ||
1034 | |||
1035 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1036 | public static extern float GetAngularMotionDisc2(IntPtr shape); | ||
1037 | |||
1038 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1039 | public static extern float GetContactBreakingThreshold2(IntPtr shape, float defaultFactor); | ||
1040 | |||
1041 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1042 | public static extern bool IsPolyhedral2(IntPtr shape); | ||
1043 | |||
1044 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1045 | public static extern bool IsConvex2d2(IntPtr shape); | ||
1046 | |||
1047 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1048 | public static extern bool IsConvex2(IntPtr shape); | ||
1049 | |||
1050 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1051 | public static extern bool IsNonMoving2(IntPtr shape); | ||
1052 | |||
1053 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1054 | public static extern bool IsConcave2(IntPtr shape); | ||
1055 | |||
1056 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1057 | public static extern bool IsCompound2(IntPtr shape); | ||
1058 | |||
1059 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1060 | public static extern bool IsSoftBody2(IntPtr shape); | ||
1061 | |||
1062 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1063 | public static extern bool IsInfinite2(IntPtr shape); | ||
1064 | |||
1065 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1066 | public static extern void SetLocalScaling2(IntPtr shape, Vector3 scale); | ||
1067 | |||
1068 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1069 | public static extern Vector3 GetLocalScaling2(IntPtr shape); | ||
1070 | |||
1071 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1072 | public static extern Vector3 CalculateLocalInertia2(IntPtr shape, float mass); | ||
1073 | |||
1074 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1075 | public static extern int GetShapeType2(IntPtr shape); | ||
1076 | |||
1077 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1078 | public static extern void SetMargin2(IntPtr shape, float val); | ||
1079 | |||
1080 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1081 | public static extern float GetMargin2(IntPtr shape); | ||
1082 | |||
1083 | // ===================================================================================== | ||
1084 | // Debugging | ||
1085 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1086 | public static extern void DumpRigidBody2(IntPtr sim, IntPtr collisionObject); | ||
1087 | |||
1088 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1089 | public static extern void DumpCollisionShape2(IntPtr sim, IntPtr collisionShape); | ||
1090 | |||
1091 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1092 | public static extern void DumpMapInfo2(IntPtr sim, IntPtr manInfo); | ||
1093 | |||
1094 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1095 | public static extern void DumpConstraint2(IntPtr sim, IntPtr constrain); | ||
1096 | |||
1097 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1098 | public static extern void DumpActivationInfo2(IntPtr sim); | ||
1099 | |||
1100 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1101 | public static extern void DumpAllInfo2(IntPtr sim); | ||
1102 | |||
1103 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1104 | public static extern void DumpPhysicsStatistics2(IntPtr sim); | ||
1105 | |||
1106 | } | ||
1107 | } | ||
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSAPIXNA.cs b/OpenSim/Region/Physics/BulletSPlugin/BSAPIXNA.cs new file mode 100755 index 0000000..a56a817 --- /dev/null +++ b/OpenSim/Region/Physics/BulletSPlugin/BSAPIXNA.cs | |||
@@ -0,0 +1,39 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyrightD | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | using System; | ||
28 | using System.Collections.Generic; | ||
29 | using System.Linq; | ||
30 | using System.Text; | ||
31 | |||
32 | namespace OpenSim.Region.Physics.BulletSPlugin | ||
33 | { | ||
34 | /* | ||
35 | public sealed class BSAPIXNA : BulletSimAPITemplate | ||
36 | { | ||
37 | } | ||
38 | */ | ||
39 | } | ||