diff options
author | Robert Adams | 2013-07-11 14:33:03 -0700 |
---|---|---|
committer | Robert Adams | 2013-07-22 10:27:15 -0700 |
commit | b4c3a791aa55390bff071b3fe4bbe70c1d252703 (patch) | |
tree | 4823ba36ddaee6f13e7b11559d9701937ecf7cf1 /OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs | |
parent | Add experimental stubs for an extension function interface on both (diff) | |
download | opensim-SC_OLD-b4c3a791aa55390bff071b3fe4bbe70c1d252703.zip opensim-SC_OLD-b4c3a791aa55390bff071b3fe4bbe70c1d252703.tar.gz opensim-SC_OLD-b4c3a791aa55390bff071b3fe4bbe70c1d252703.tar.bz2 opensim-SC_OLD-b4c3a791aa55390bff071b3fe4bbe70c1d252703.tar.xz |
BulletSim: move collision processing for linksets from BSPrimLinkable
into the linkset implementation classes.
Add HasSomeCollision attribute that remembers of any component of
a linkset has a collision.
Update vehicle code (BSDynamic) to use the HasSomeCollision in place of
IsColliding to make constraint based linksets properly notice the ground.
Add linkset functions to change physical attributes of all the members
of a linkset.
Diffstat (limited to '')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs index fc4545f..d34b797 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs | |||
@@ -353,6 +353,16 @@ public abstract class BSPhysObject : PhysicsActor | |||
353 | CollidingStep = BSScene.NotASimulationStep; | 353 | CollidingStep = BSScene.NotASimulationStep; |
354 | } | 354 | } |
355 | } | 355 | } |
356 | // Complex objects (like linksets) need to know if there is a collision on any part of | ||
357 | // their shape. 'IsColliding' has an existing definition of reporting a collision on | ||
358 | // only this specific prim or component of linksets. | ||
359 | // 'HasSomeCollision' is defined as reporting if there is a collision on any part of | ||
360 | // the complex body that this prim is the root of. | ||
361 | public virtual bool HasSomeCollision | ||
362 | { | ||
363 | get { return IsColliding; } | ||
364 | set { IsColliding = value; } | ||
365 | } | ||
356 | public override bool CollidingGround { | 366 | public override bool CollidingGround { |
357 | get { return (CollidingGroundStep == PhysScene.SimulationStep); } | 367 | get { return (CollidingGroundStep == PhysScene.SimulationStep); } |
358 | set | 368 | set |
@@ -386,6 +396,7 @@ public abstract class BSPhysObject : PhysicsActor | |||
386 | // Return 'true' if a collision was processed and should be sent up. | 396 | // Return 'true' if a collision was processed and should be sent up. |
387 | // Return 'false' if this object is not enabled/subscribed/appropriate for or has already seen this collision. | 397 | // Return 'false' if this object is not enabled/subscribed/appropriate for or has already seen this collision. |
388 | // Called at taint time from within the Step() function | 398 | // Called at taint time from within the Step() function |
399 | public delegate bool CollideCall(uint collidingWith, BSPhysObject collidee, OMV.Vector3 contactPoint, OMV.Vector3 contactNormal, float pentrationDepth); | ||
389 | public virtual bool Collide(uint collidingWith, BSPhysObject collidee, | 400 | public virtual bool Collide(uint collidingWith, BSPhysObject collidee, |
390 | OMV.Vector3 contactPoint, OMV.Vector3 contactNormal, float pentrationDepth) | 401 | OMV.Vector3 contactPoint, OMV.Vector3 contactNormal, float pentrationDepth) |
391 | { | 402 | { |