diff options
author | Robert Adams | 2013-01-01 09:30:49 -0800 |
---|---|---|
committer | Robert Adams | 2013-01-01 17:27:32 -0800 |
commit | 04132d3af4c8f44639ea842091f86274513e2dfd (patch) | |
tree | 8afd4aa11cb7bcf15ffd7156204f73859e762f31 /OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs | |
parent | Fixed bugs when getting the root folder. (diff) | |
download | opensim-SC-04132d3af4c8f44639ea842091f86274513e2dfd.zip opensim-SC-04132d3af4c8f44639ea842091f86274513e2dfd.tar.gz opensim-SC-04132d3af4c8f44639ea842091f86274513e2dfd.tar.bz2 opensim-SC-04132d3af4c8f44639ea842091f86274513e2dfd.tar.xz |
BulletSim: subclass Bullet[World|Body|Shape|Constraint] for unmanaged
to have pointers and managed to have objects.
Initial paste of XNA code. Commented out.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs | 37 |
1 files changed, 21 insertions, 16 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs index 064ce3c..cb8108d 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSPrim.cs | |||
@@ -300,7 +300,7 @@ public sealed class BSPrim : BSPhysObject | |||
300 | // All positions are given in world positions. | 300 | // All positions are given in world positions. |
301 | if (_position == value) | 301 | if (_position == value) |
302 | { | 302 | { |
303 | DetailLog("{0},BSPrim.setPosition,taint,positionNotChanging,pos={1},orient={2}", LocalID, _position, _orientation); | 303 | DetailLog("{0},BSPrim.setPosition,call,positionNotChanging,pos={1},orient={2}", LocalID, _position, _orientation); |
304 | return; | 304 | return; |
305 | } | 305 | } |
306 | _position = value; | 306 | _position = value; |
@@ -894,21 +894,26 @@ public sealed class BSPrim : BSPhysObject | |||
894 | // Object MUST NOT already be in the world. | 894 | // Object MUST NOT already be in the world. |
895 | // This routine exists because some assorted properties get mangled by adding to the world. | 895 | // This routine exists because some assorted properties get mangled by adding to the world. |
896 | internal void AddObjectToPhysicalWorld() | 896 | internal void AddObjectToPhysicalWorld() |
897 | { | 897 | { |
898 | if (PhysBody.HasPhysicalBody) | 898 | if (PhysBody.HasPhysicalBody) |
899 | { | 899 | { |
900 | PhysicsScene.PE.AddObjectToWorld(PhysicsScene.World, PhysBody); | 900 | PhysicsScene.PE.AddObjectToWorld(PhysicsScene.World, PhysBody); |
901 | 901 | ||
902 | // TODO: Fix this. Total kludge because adding object to world resets its gravity to default. | 902 | // TODO: Fix this. Total kludge because adding object to world resets its gravity to default. |
903 | // Replace this when the new AddObjectToWorld function is complete. | 903 | // Replace this when the new AddObjectToWorld function is complete. |
904 | PhysicsScene.PE.SetGravity(PhysBody, ComputeGravity()); | 904 | PhysicsScene.PE.SetGravity(PhysBody, ComputeGravity()); |
905 | 905 | ||
906 | // Collision filter can be set only when the object is in the world | 906 | // Collision filter can be set only when the object is in the world |
907 | if (!PhysBody.ApplyCollisionMask(PhysicsScene)) | 907 | if (!PhysBody.ApplyCollisionMask(PhysicsScene)) |
908 | { | 908 | { |
909 | m_log.ErrorFormat("{0} Failed setting object collision mask: id={1}", LogHeader, LocalID); | 909 | m_log.ErrorFormat("{0} Failed setting object collision mask: id={1}", LogHeader, LocalID); |
910 | DetailLog("{0},BSPrim.UpdatePhysicalParameters,failedSetMaskGroup,cType={1}", LocalID, PhysBody.collisionType); | 910 | DetailLog("{0},BSPrim.UpdatePhysicalParameters,failedSetMaskGroup,cType={1}", LocalID, PhysBody.collisionType); |
911 | } | 911 | } |
912 | } | ||
913 | else | ||
914 | { | ||
915 | m_log.ErrorFormat("{0} Attempt to add physical object without body. id={1}", LogHeader, LocalID); | ||
916 | DetailLog("{0},BSPrim.UpdatePhysicalParameters,addObjectWithoutBody,cType={1}", LocalID, PhysBody.collisionType); | ||
912 | } | 917 | } |
913 | } | 918 | } |
914 | 919 | ||