diff options
author | Robert Adams | 2012-10-14 19:23:35 -0700 |
---|---|---|
committer | Robert Adams | 2012-10-19 10:52:06 -0700 |
commit | eaccfa6d99ac51b4963ae0fa457ff0d2b9ce65e7 (patch) | |
tree | 3fb006e93c8599a124369b2b4da16c72fea540ec /OpenSim/Region/Physics/BulletSPlugin/BSScene.cs | |
parent | BulletSim: Update BSCharacter to use API2 interface. (diff) | |
download | opensim-SC_OLD-eaccfa6d99ac51b4963ae0fa457ff0d2b9ce65e7.zip opensim-SC_OLD-eaccfa6d99ac51b4963ae0fa457ff0d2b9ce65e7.tar.gz opensim-SC_OLD-eaccfa6d99ac51b4963ae0fa457ff0d2b9ce65e7.tar.bz2 opensim-SC_OLD-eaccfa6d99ac51b4963ae0fa457ff0d2b9ce65e7.tar.xz |
BulletSim: Fix small problems with last patch: BSScene.World properly initialized and setting of C++ parameters commented out. Comments and logging added.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSScene.cs')
-rw-r--r-- | OpenSim/Region/Physics/BulletSPlugin/BSScene.cs | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs index 5158011..7998b08 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs | |||
@@ -261,10 +261,6 @@ public class BSScene : PhysicsScene, IPhysicsParameters | |||
261 | m_maxUpdatesPerFrame, m_updateArrayPinnedHandle.AddrOfPinnedObject(), | 261 | m_maxUpdatesPerFrame, m_updateArrayPinnedHandle.AddrOfPinnedObject(), |
262 | m_DebugLogCallbackHandle)); | 262 | m_DebugLogCallbackHandle)); |
263 | 263 | ||
264 | // Initialization to support the transition to a new API which puts most of the logic | ||
265 | // into the C# code so it is easier to modify and add to. | ||
266 | World = new BulletSim(WorldID, this, BulletSimAPI.GetSimHandle2(WorldID)); | ||
267 | |||
268 | Constraints = new BSConstraintCollection(World); | 264 | Constraints = new BSConstraintCollection(World); |
269 | 265 | ||
270 | TerrainManager = new BSTerrainManager(this); | 266 | TerrainManager = new BSTerrainManager(this); |
@@ -1251,10 +1247,9 @@ public class BSScene : PhysicsScene, IPhysicsParameters | |||
1251 | case PhysParameterEntry.APPLY_TO_NONE: | 1247 | case PhysParameterEntry.APPLY_TO_NONE: |
1252 | defaultLoc = val; // setting only the default value | 1248 | defaultLoc = val; // setting only the default value |
1253 | break; | 1249 | break; |
1254 | case PhysParameterEntry.APPLY_TO_ALL: | 1250 | case PhysParameterEntry.APPLY_TO_ALL: |
1255 | m_log.ErrorFormat("{0} Cannot change parameters of multiple objects. Someday it will be added.", LogHeader); | ||
1256 | /* | ||
1257 | defaultLoc = val; // setting ALL also sets the default value | 1251 | defaultLoc = val; // setting ALL also sets the default value |
1252 | /* | ||
1258 | List<uint> objectIDs = lIDs; | 1253 | List<uint> objectIDs = lIDs; |
1259 | string xparm = parm.ToLower(); | 1254 | string xparm = parm.ToLower(); |
1260 | float xval = val; | 1255 | float xval = val; |
@@ -1276,15 +1271,15 @@ public class BSScene : PhysicsScene, IPhysicsParameters | |||
1276 | // schedule the actual updating of the paramter to when the phys engine is not busy | 1271 | // schedule the actual updating of the paramter to when the phys engine is not busy |
1277 | protected void TaintedUpdateParameter(string parm, uint localID, float val) | 1272 | protected void TaintedUpdateParameter(string parm, uint localID, float val) |
1278 | { | 1273 | { |
1274 | /* Settings in the C++ code are not working at the moment. TODO: fix the settings. | ||
1279 | m_log.ErrorFormat("{0} Cannot change parameters of base objects. Someday it will be added.", LogHeader); | 1275 | m_log.ErrorFormat("{0} Cannot change parameters of base objects. Someday it will be added.", LogHeader); |
1280 | /* | ||
1281 | uint xlocalID = localID; | 1276 | uint xlocalID = localID; |
1282 | string xparm = parm.ToLower(); | 1277 | string xparm = parm.ToLower(); |
1283 | float xval = val; | 1278 | float xval = val; |
1284 | TaintedObject("BSScene.TaintedUpdateParameter", delegate() { | 1279 | TaintedObject("BSScene.TaintedUpdateParameter", delegate() { |
1285 | BulletSimAPI.UpdateParameter(WorldID, xlocalID, xparm, xval); | 1280 | BulletSimAPI.UpdateParameter(WorldID, xlocalID, xparm, xval); |
1286 | }); | 1281 | }); |
1287 | */ | 1282 | */ |
1288 | } | 1283 | } |
1289 | 1284 | ||
1290 | // Get parameter. | 1285 | // Get parameter. |