diff options
author | Robert Adams | 2012-09-18 08:39:52 -0700 |
---|---|---|
committer | Robert Adams | 2012-09-27 22:01:11 -0700 |
commit | ee7cda261cbbc9dcd558c35eabc070cc0bf45644 (patch) | |
tree | f30f9c9baf15ef6988983e53bf3141749eab75f9 /OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs | |
parent | Comment out unused RestPlugins text in OpenSimDefaults.ini (diff) | |
download | opensim-SC-ee7cda261cbbc9dcd558c35eabc070cc0bf45644.zip opensim-SC-ee7cda261cbbc9dcd558c35eabc070cc0bf45644.tar.gz opensim-SC-ee7cda261cbbc9dcd558c35eabc070cc0bf45644.tar.bz2 opensim-SC-ee7cda261cbbc9dcd558c35eabc070cc0bf45644.tar.xz |
BulletSim: move a bunch of common logic out of BSPrim and BSCharacter
and into the parent class BSPhysObject.
Rework collision logic to enable extra collision after done colliding.
Rename 'Scene' to 'PhysicsScene' to differentiate it from the simulator 'Scene'.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs')
-rw-r--r-- | OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs | 57 |
1 files changed, 10 insertions, 47 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs b/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs index 9221cdb..4d2d962 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BulletSimAPI.cs | |||
@@ -249,7 +249,16 @@ public enum CollisionFlags : uint | |||
249 | BS_PHYSICAL_OBJECT = 1 << 13, | 249 | BS_PHYSICAL_OBJECT = 1 << 13, |
250 | BS_TERRAIN_OBJECT = 1 << 14, | 250 | BS_TERRAIN_OBJECT = 1 << 14, |
251 | BS_NONE = 0, | 251 | BS_NONE = 0, |
252 | BS_ALL = 0xFFFFFFFF | 252 | BS_ALL = 0xFFFFFFFF, |
253 | |||
254 | // These are the collision flags switched depending on physical state. | ||
255 | // The other flags are used for other things and should not be fooled with. | ||
256 | BS_ACTIVE = CF_STATIC_OBJECT | ||
257 | | CF_KINEMATIC_OBJECT | ||
258 | | CF_NO_CONTACT_RESPONSE | ||
259 | | BS_VOLUME_DETECT_OBJECT | ||
260 | | BS_PHANTOM_OBJECT | ||
261 | | BS_PHYSICAL_OBJECT, | ||
253 | }; | 262 | }; |
254 | 263 | ||
255 | // Values for collisions groups and masks | 264 | // Values for collisions groups and masks |
@@ -270,52 +279,6 @@ public enum CollisionFilterGroups : uint | |||
270 | SolidFilter = 1 << 13, | 279 | SolidFilter = 1 << 13, |
271 | }; | 280 | }; |
272 | 281 | ||
273 | // For each type, we first clear and then set the collision flags | ||
274 | public enum ClearCollisionFlag : uint | ||
275 | { | ||
276 | Terrain = CollisionFlags.BS_ALL, | ||
277 | Phantom = CollisionFlags.BS_ALL, | ||
278 | VolumeDetect = CollisionFlags.BS_ALL, | ||
279 | PhysicalObject = CollisionFlags.BS_ALL, | ||
280 | StaticObject = CollisionFlags.BS_ALL | ||
281 | } | ||
282 | |||
283 | public enum SetCollisionFlag : uint | ||
284 | { | ||
285 | Terrain = CollisionFlags.CF_STATIC_OBJECT | ||
286 | | CollisionFlags.BS_TERRAIN_OBJECT, | ||
287 | Phantom = CollisionFlags.CF_STATIC_OBJECT | ||
288 | | CollisionFlags.BS_PHANTOM_OBJECT | ||
289 | | CollisionFlags.CF_NO_CONTACT_RESPONSE, | ||
290 | VolumeDetect = CollisionFlags.CF_STATIC_OBJECT | ||
291 | | CollisionFlags.BS_VOLUME_DETECT_OBJECT | ||
292 | | CollisionFlags.CF_NO_CONTACT_RESPONSE, | ||
293 | PhysicalObject = CollisionFlags.BS_PHYSICAL_OBJECT, | ||
294 | StaticObject = CollisionFlags.CF_STATIC_OBJECT, | ||
295 | } | ||
296 | |||
297 | // Collision filters used for different types of objects | ||
298 | public enum SetCollisionFilter : uint | ||
299 | { | ||
300 | Terrain = CollisionFilterGroups.AllFilter, | ||
301 | Phantom = CollisionFilterGroups.GroundPlaneFilter | ||
302 | | CollisionFilterGroups.TerrainFilter, | ||
303 | VolumeDetect = CollisionFilterGroups.AllFilter, | ||
304 | PhysicalObject = CollisionFilterGroups.AllFilter, | ||
305 | StaticObject = CollisionFilterGroups.AllFilter, | ||
306 | } | ||
307 | |||
308 | // Collision masks used for different types of objects | ||
309 | public enum SetCollisionMask : uint | ||
310 | { | ||
311 | Terrain = CollisionFilterGroups.AllFilter, | ||
312 | Phantom = CollisionFilterGroups.GroundPlaneFilter | ||
313 | | CollisionFilterGroups.TerrainFilter, | ||
314 | VolumeDetect = CollisionFilterGroups.AllFilter, | ||
315 | PhysicalObject = CollisionFilterGroups.AllFilter, | ||
316 | StaticObject = CollisionFilterGroups.AllFilter | ||
317 | } | ||
318 | |||
319 | // CFM controls the 'hardness' of the constraint. 0=fixed, 0..1=violatable. Default=0 | 282 | // CFM controls the 'hardness' of the constraint. 0=fixed, 0..1=violatable. Default=0 |
320 | // ERP controls amount of correction per tick. Usable range=0.1..0.8. Default=0.2. | 283 | // ERP controls amount of correction per tick. Usable range=0.1..0.8. Default=0.2. |
321 | public enum ConstraintParams : int | 284 | public enum ConstraintParams : int |