diff options
author | Robert Adams | 2012-12-29 21:43:43 -0800 |
---|---|---|
committer | Robert Adams | 2012-12-31 19:57:21 -0800 |
commit | 48f718f39fcd61501262878a8bcfbd98efed29d2 (patch) | |
tree | aa67dbaf54d75152f01302921bbc42226daaec8b /OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs | |
parent | BulletSim: change physical data structures to classes. Add default (diff) | |
download | opensim-SC_OLD-48f718f39fcd61501262878a8bcfbd98efed29d2.zip opensim-SC_OLD-48f718f39fcd61501262878a8bcfbd98efed29d2.tar.gz opensim-SC_OLD-48f718f39fcd61501262878a8bcfbd98efed29d2.tar.bz2 opensim-SC_OLD-48f718f39fcd61501262878a8bcfbd98efed29d2.tar.xz |
BulletSim: first round of conversion from direct BulletSimAPI interfacing by BulletSim core to using the BulletSimAPITemplate. Physical object creation and destruction first.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs b/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs index 86ccfbb..d99a50f 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs | |||
@@ -137,9 +137,9 @@ public sealed class BSTerrainManager : IDisposable | |||
137 | BulletSimAPI.CreateGroundPlaneShape2(BSScene.GROUNDPLANE_ID, 1f, | 137 | BulletSimAPI.CreateGroundPlaneShape2(BSScene.GROUNDPLANE_ID, 1f, |
138 | BSParam.TerrainCollisionMargin), | 138 | BSParam.TerrainCollisionMargin), |
139 | BSPhysicsShapeType.SHAPE_GROUNDPLANE); | 139 | BSPhysicsShapeType.SHAPE_GROUNDPLANE); |
140 | m_groundPlane = new BulletBody(BSScene.GROUNDPLANE_ID, | 140 | m_groundPlane = PhysicsScene.PE.CreateBodyWithDefaultMotionState(groundPlaneShape, |
141 | BulletSimAPI.CreateBodyWithDefaultMotionState2(groundPlaneShape.ptr, BSScene.GROUNDPLANE_ID, | 141 | BSScene.GROUNDPLANE_ID, Vector3.Zero, Quaternion.Identity); |
142 | Vector3.Zero, Quaternion.Identity)); | 142 | |
143 | BulletSimAPI.AddObjectToWorld2(PhysicsScene.World.ptr, m_groundPlane.ptr); | 143 | BulletSimAPI.AddObjectToWorld2(PhysicsScene.World.ptr, m_groundPlane.ptr); |
144 | BulletSimAPI.UpdateSingleAabb2(PhysicsScene.World.ptr, m_groundPlane.ptr); | 144 | BulletSimAPI.UpdateSingleAabb2(PhysicsScene.World.ptr, m_groundPlane.ptr); |
145 | // Ground plane does not move | 145 | // Ground plane does not move |
@@ -160,7 +160,7 @@ public sealed class BSTerrainManager : IDisposable | |||
160 | { | 160 | { |
161 | if (BulletSimAPI.RemoveObjectFromWorld2(PhysicsScene.World.ptr, m_groundPlane.ptr)) | 161 | if (BulletSimAPI.RemoveObjectFromWorld2(PhysicsScene.World.ptr, m_groundPlane.ptr)) |
162 | { | 162 | { |
163 | BulletSimAPI.DestroyObject2(PhysicsScene.World.ptr, m_groundPlane.ptr); | 163 | PhysicsScene.PE.DestroyObject(PhysicsScene.World, m_groundPlane); |
164 | } | 164 | } |
165 | m_groundPlane.Clear(); | 165 | m_groundPlane.Clear(); |
166 | } | 166 | } |