diff options
Diffstat (limited to 'OpenSim/Region/Physics')
4 files changed, 18 insertions, 35 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs index 8edcd20..4133107 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs | |||
@@ -269,6 +269,7 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters | |||
269 | BSParam.SetParameterConfigurationValues(this, pConfig); | 269 | BSParam.SetParameterConfigurationValues(this, pConfig); |
270 | 270 | ||
271 | // Very detailed logging for physics debugging | 271 | // Very detailed logging for physics debugging |
272 | // TODO: the boolean values can be moved to the normal parameter processing. | ||
272 | m_physicsLoggingEnabled = pConfig.GetBoolean("PhysicsLoggingEnabled", false); | 273 | m_physicsLoggingEnabled = pConfig.GetBoolean("PhysicsLoggingEnabled", false); |
273 | m_physicsLoggingDir = pConfig.GetString("PhysicsLoggingDir", "."); | 274 | m_physicsLoggingDir = pConfig.GetString("PhysicsLoggingDir", "."); |
274 | m_physicsLoggingPrefix = pConfig.GetString("PhysicsLoggingPrefix", "physics-%REGIONNAME%-"); | 275 | m_physicsLoggingPrefix = pConfig.GetString("PhysicsLoggingPrefix", "physics-%REGIONNAME%-"); |
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs b/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs index afe5bca..eb4d039 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs | |||
@@ -250,20 +250,20 @@ public enum CollisionFilterGroups : uint | |||
250 | // filter/mask definition below. This way collision interactions | 250 | // filter/mask definition below. This way collision interactions |
251 | // are more easily found and debugged. | 251 | // are more easily found and debugged. |
252 | BNoneGroup = 0, | 252 | BNoneGroup = 0, |
253 | BDefaultGroup = 1 << 0, | 253 | BDefaultGroup = 1 << 0, // 0001 |
254 | BStaticGroup = 1 << 1, | 254 | BStaticGroup = 1 << 1, // 0002 |
255 | BKinematicGroup = 1 << 2, | 255 | BKinematicGroup = 1 << 2, // 0004 |
256 | BDebrisGroup = 1 << 3, | 256 | BDebrisGroup = 1 << 3, // 0008 |
257 | BSensorTrigger = 1 << 4, | 257 | BSensorTrigger = 1 << 4, // 0010 |
258 | BCharacterGroup = 1 << 5, | 258 | BCharacterGroup = 1 << 5, // 0020 |
259 | BAllGroup = 0xFFFFFFFF, | 259 | BAllGroup = 0x000FFFFF, |
260 | // Filter groups defined by BulletSim | 260 | // Filter groups defined by BulletSim |
261 | BGroundPlaneGroup = 1 << 10, | 261 | BGroundPlaneGroup = 1 << 10, // 0400 |
262 | BTerrainGroup = 1 << 11, | 262 | BTerrainGroup = 1 << 11, // 0800 |
263 | BRaycastGroup = 1 << 12, | 263 | BRaycastGroup = 1 << 12, // 1000 |
264 | BSolidGroup = 1 << 13, | 264 | BSolidGroup = 1 << 13, // 2000 |
265 | // BLinksetGroup = xx // a linkset proper is either static or dynamic | 265 | // BLinksetGroup = xx // a linkset proper is either static or dynamic |
266 | BLinksetChildGroup = 1 << 14, | 266 | BLinksetChildGroup = 1 << 14, // 4000 |
267 | }; | 267 | }; |
268 | 268 | ||
269 | // CFM controls the 'hardness' of the constraint. 0=fixed, 0..1=violatable. Default=0 | 269 | // CFM controls the 'hardness' of the constraint. 0=fixed, 0..1=violatable. Default=0 |
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BulletSimData.cs b/OpenSim/Region/Physics/BulletSPlugin/BulletSimData.cs index 36d38d4..5ad6746 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BulletSimData.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BulletSimData.cs | |||
@@ -72,12 +72,12 @@ public struct BulletBody | |||
72 | public bool HasPhysicalBody { get { return ptr != IntPtr.Zero; } } | 72 | public bool HasPhysicalBody { get { return ptr != IntPtr.Zero; } } |
73 | 73 | ||
74 | // Apply the specificed collision mask into the physical world | 74 | // Apply the specificed collision mask into the physical world |
75 | public void ApplyCollisionMask() | 75 | public bool ApplyCollisionMask() |
76 | { | 76 | { |
77 | // Should assert the body has been added to the physical world. | 77 | // Should assert the body has been added to the physical world. |
78 | // (The collision masks are stored in the collision proxy cache which only exists for | 78 | // (The collision masks are stored in the collision proxy cache which only exists for |
79 | // a collision body that is in the world.) | 79 | // a collision body that is in the world.) |
80 | BulletSimAPI.SetCollisionGroupMask2(ptr, | 80 | return BulletSimAPI.SetCollisionGroupMask2(ptr, |
81 | BulletSimData.CollisionTypeMasks[collisionType].group, | 81 | BulletSimData.CollisionTypeMasks[collisionType].group, |
82 | BulletSimData.CollisionTypeMasks[collisionType].mask); | 82 | BulletSimData.CollisionTypeMasks[collisionType].mask); |
83 | } | 83 | } |
@@ -207,26 +207,6 @@ public struct CollisionTypeFilterGroup | |||
207 | public uint mask; | 207 | public uint mask; |
208 | }; | 208 | }; |
209 | 209 | ||
210 | /* NOTE: old definitions kept for reference. Delete when things are working. | ||
211 | // The collsion filters and masked are defined in one place -- don't want them scattered | ||
212 | AvatarGroup = BCharacterGroup, | ||
213 | AvatarMask = BAllGroup, | ||
214 | ObjectGroup = BSolidGroup, | ||
215 | ObjectMask = BAllGroup, | ||
216 | StaticObjectGroup = BStaticGroup, | ||
217 | StaticObjectMask = AvatarGroup | ObjectGroup, // static things don't interact with much | ||
218 | LinksetGroup = BLinksetGroup, | ||
219 | LinksetMask = BAllGroup, | ||
220 | LinksetChildGroup = BLinksetChildGroup, | ||
221 | LinksetChildMask = BNoneGroup, // Linkset children disappear from the world | ||
222 | VolumeDetectGroup = BSensorTrigger, | ||
223 | VolumeDetectMask = ~BSensorTrigger, | ||
224 | TerrainGroup = BTerrainGroup, | ||
225 | TerrainMask = BAllGroup & ~BStaticGroup, // static objects on the ground don't collide | ||
226 | GroundPlaneGroup = BGroundPlaneGroup, | ||
227 | GroundPlaneMask = BAllGroup | ||
228 | */ | ||
229 | |||
230 | public static class BulletSimData | 210 | public static class BulletSimData |
231 | { | 211 | { |
232 | 212 | ||
@@ -269,8 +249,9 @@ public static Dictionary<CollisionType, CollisionTypeFilterGroup> CollisionTypeM | |||
269 | }, | 249 | }, |
270 | { CollisionType.LinksetChild, | 250 | { CollisionType.LinksetChild, |
271 | new CollisionTypeFilterGroup(CollisionType.LinksetChild, | 251 | new CollisionTypeFilterGroup(CollisionType.LinksetChild, |
272 | (uint)CollisionFilterGroups.BTerrainGroup, | 252 | (uint)CollisionFilterGroups.BLinksetChildGroup, |
273 | (uint)(CollisionFilterGroups.BNoneGroup)) | 253 | (uint)(CollisionFilterGroups.BNoneGroup)) |
254 | // (uint)(CollisionFilterGroups.BCharacterGroup | CollisionFilterGroups.BSolidGroup)) | ||
274 | }, | 255 | }, |
275 | }; | 256 | }; |
276 | 257 | ||
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BulletSimTODO.txt b/OpenSim/Region/Physics/BulletSPlugin/BulletSimTODO.txt index 16131cd..f805836 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BulletSimTODO.txt +++ b/OpenSim/Region/Physics/BulletSPlugin/BulletSimTODO.txt | |||
@@ -194,6 +194,7 @@ Should taints check for existance or activeness of target? | |||
194 | actually gone when the taint happens. Crashes don't happen because the taint closure | 194 | actually gone when the taint happens. Crashes don't happen because the taint closure |
195 | keeps the object from being freed, but that is just an accident. | 195 | keeps the object from being freed, but that is just an accident. |
196 | Possibly have and 'active' flag that is checked by the taint processor? | 196 | Possibly have and 'active' flag that is checked by the taint processor? |
197 | Parameters for physics logging should be moved from BSScene to BSParam (at least boolean ones) | ||
197 | 198 | ||
198 | THREADING | 199 | THREADING |
199 | ================================================= | 200 | ================================================= |