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/BSTerrainHeightmap.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/BSTerrainHeightmap.cs')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSTerrainHeightmap.cs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSTerrainHeightmap.cs b/OpenSim/Region/Physics/BulletSPlugin/BSTerrainHeightmap.cs index 07a9fd8..a2c085e 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSTerrainHeightmap.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSTerrainHeightmap.cs | |||
@@ -105,9 +105,8 @@ public sealed class BSTerrainHeightmap : BSTerrainPhys | |||
105 | centerPos.Y = m_mapInfo.minCoords.Y + (m_mapInfo.sizeY / 2f); | 105 | centerPos.Y = m_mapInfo.minCoords.Y + (m_mapInfo.sizeY / 2f); |
106 | centerPos.Z = m_mapInfo.minZ + ((m_mapInfo.maxZ - m_mapInfo.minZ) / 2f); | 106 | centerPos.Z = m_mapInfo.minZ + ((m_mapInfo.maxZ - m_mapInfo.minZ) / 2f); |
107 | 107 | ||
108 | m_mapInfo.terrainBody = new BulletBody(m_mapInfo.ID, | 108 | m_mapInfo.terrainBody = PhysicsScene.PE.CreateBodyWithDefaultMotionState(m_mapInfo.terrainShape, |
109 | BulletSimAPI.CreateBodyWithDefaultMotionState2(m_mapInfo.terrainShape.ptr, | 109 | m_mapInfo.ID, centerPos, Quaternion.Identity); |
110 | m_mapInfo.ID, centerPos, Quaternion.Identity)); | ||
111 | 110 | ||
112 | // Set current terrain attributes | 111 | // Set current terrain attributes |
113 | BulletSimAPI.SetFriction2(m_mapInfo.terrainBody.ptr, BSParam.TerrainFriction); | 112 | BulletSimAPI.SetFriction2(m_mapInfo.terrainBody.ptr, BSParam.TerrainFriction); |
@@ -139,7 +138,7 @@ public sealed class BSTerrainHeightmap : BSTerrainPhys | |||
139 | { | 138 | { |
140 | BulletSimAPI.RemoveObjectFromWorld2(PhysicsScene.World.ptr, m_mapInfo.terrainBody.ptr); | 139 | BulletSimAPI.RemoveObjectFromWorld2(PhysicsScene.World.ptr, m_mapInfo.terrainBody.ptr); |
141 | // Frees both the body and the shape. | 140 | // Frees both the body and the shape. |
142 | BulletSimAPI.DestroyObject2(PhysicsScene.World.ptr, m_mapInfo.terrainBody.ptr); | 141 | PhysicsScene.PE.DestroyObject(PhysicsScene.World, m_mapInfo.terrainBody); |
143 | BulletSimAPI.ReleaseHeightMapInfo2(m_mapInfo.Ptr); | 142 | BulletSimAPI.ReleaseHeightMapInfo2(m_mapInfo.Ptr); |
144 | } | 143 | } |
145 | } | 144 | } |