diff options
author | Robert Adams | 2013-01-11 16:36:34 -0800 |
---|---|---|
committer | Robert Adams | 2013-01-11 16:47:53 -0800 |
commit | 459fcd81c9d6e7c92738b40f1b4b4fe746699379 (patch) | |
tree | 6555a0076aa18c3634ad89ef8c3d097d67edb08b /OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs | |
parent | BulletSim: add osGetPhysicsEngineType() LSL function and update (diff) | |
download | opensim-SC_OLD-459fcd81c9d6e7c92738b40f1b4b4fe746699379.zip opensim-SC_OLD-459fcd81c9d6e7c92738b40f1b4b4fe746699379.tar.gz opensim-SC_OLD-459fcd81c9d6e7c92738b40f1b4b4fe746699379.tar.bz2 opensim-SC_OLD-459fcd81c9d6e7c92738b40f1b4b4fe746699379.tar.xz |
BulletSim: move center of gravity of linkset to its geometric center.
Necessitated allowing simulator and physical position of a body to
get out of sync since Bullet assumes that <0,0,0> is the center of mass.
Update DLLs and SOs for the UpdateChildTransform so positions of
individual prim in a linkset can be implemented.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs b/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs index 14de2eb..0fef67c 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSAPIUnman.cs | |||
@@ -327,6 +327,12 @@ public override void RemoveChildShapeFromCompoundShape(BulletShape shape, Bullet | |||
327 | BSAPICPP.RemoveChildShapeFromCompoundShape2(shapeu.ptr, removeShapeu.ptr); | 327 | BSAPICPP.RemoveChildShapeFromCompoundShape2(shapeu.ptr, removeShapeu.ptr); |
328 | } | 328 | } |
329 | 329 | ||
330 | public override void UpdateChildTransform(BulletShape pShape, int childIndex, Vector3 pos, Quaternion rot, bool shouldRecalculateLocalAabb) | ||
331 | { | ||
332 | BulletShapeUnman shapeu = pShape as BulletShapeUnman; | ||
333 | BSAPICPP.UpdateChildTransform2(shapeu.ptr, childIndex, pos, rot, shouldRecalculateLocalAabb); | ||
334 | } | ||
335 | |||
330 | public override void RecalculateCompoundShapeLocalAabb(BulletShape shape) | 336 | public override void RecalculateCompoundShapeLocalAabb(BulletShape shape) |
331 | { | 337 | { |
332 | BulletShapeUnman shapeu = shape as BulletShapeUnman; | 338 | BulletShapeUnman shapeu = shape as BulletShapeUnman; |
@@ -1357,6 +1363,9 @@ public static extern IntPtr RemoveChildShapeFromCompoundShapeIndex2(IntPtr cShap | |||
1357 | public static extern void RemoveChildShapeFromCompoundShape2(IntPtr cShape, IntPtr removeShape); | 1363 | public static extern void RemoveChildShapeFromCompoundShape2(IntPtr cShape, IntPtr removeShape); |
1358 | 1364 | ||
1359 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | 1365 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] |
1366 | public static extern void UpdateChildTransform2(IntPtr pShape, int childIndex, Vector3 pos, Quaternion rot, bool shouldRecalculateLocalAabb); | ||
1367 | |||
1368 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | ||
1360 | public static extern void RecalculateCompoundShapeLocalAabb2(IntPtr cShape); | 1369 | public static extern void RecalculateCompoundShapeLocalAabb2(IntPtr cShape); |
1361 | 1370 | ||
1362 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] | 1371 | [DllImport("BulletSim", CallingConvention = CallingConvention.Cdecl), SuppressUnmanagedCodeSecurity] |