diff options
author | Justin Clark-Casey (justincc) | 2013-01-24 00:03:44 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-01-24 00:03:44 +0000 |
commit | 55c6753b13d4c8cd69cc986db5f6e321b8e65bb7 (patch) | |
tree | 70ae7a976ba9be4e7e8d1cb98d3a6e61e4dfb7d4 /OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs | |
parent | Add information on ScriptStopStrategy to [XEngine] in OpenSimDefaults.ini and... (diff) | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC_OLD-55c6753b13d4c8cd69cc986db5f6e321b8e65bb7.zip opensim-SC_OLD-55c6753b13d4c8cd69cc986db5f6e321b8e65bb7.tar.gz opensim-SC_OLD-55c6753b13d4c8cd69cc986db5f6e321b8e65bb7.tar.bz2 opensim-SC_OLD-55c6753b13d4c8cd69cc986db5f6e321b8e65bb7.tar.xz |
Merge branch 'master' into cooptermination
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs index 821f470..027c786 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs | |||
@@ -55,6 +55,16 @@ namespace OpenSim.Region.Physics.BulletSPlugin | |||
55 | * BS.ApplyCentralForce BS.ApplyTorque | 55 | * BS.ApplyCentralForce BS.ApplyTorque |
56 | */ | 56 | */ |
57 | 57 | ||
58 | // Flags used to denote which properties updates when making UpdateProperties calls to linksets, etc. | ||
59 | public enum UpdatedProperties : uint | ||
60 | { | ||
61 | Position = 1 << 0, | ||
62 | Orientation = 1 << 1, | ||
63 | Velocity = 1 << 2, | ||
64 | Acceleration = 1 << 3, | ||
65 | RotationalVelocity = 1 << 4, | ||
66 | EntPropUpdates = Position | Orientation | Velocity | Acceleration | RotationalVelocity, | ||
67 | } | ||
58 | public abstract class BSPhysObject : PhysicsActor | 68 | public abstract class BSPhysObject : PhysicsActor |
59 | { | 69 | { |
60 | protected BSPhysObject() | 70 | protected BSPhysObject() |
@@ -139,6 +149,11 @@ public abstract class BSPhysObject : PhysicsActor | |||
139 | public abstract bool IsStatic { get; } | 149 | public abstract bool IsStatic { get; } |
140 | public abstract bool IsSelected { get; } | 150 | public abstract bool IsSelected { get; } |
141 | 151 | ||
152 | // It can be confusing for an actor to know if it should move or update an object | ||
153 | // depeneding on the setting of 'selected', 'physical, ... | ||
154 | // This flag is the true test -- if true, the object is being acted on in the physical world | ||
155 | public abstract bool IsPhysicallyActive { get; } | ||
156 | |||
142 | // Materialness | 157 | // Materialness |
143 | public MaterialAttributes.Material Material { get; private set; } | 158 | public MaterialAttributes.Material Material { get; private set; } |
144 | public override void SetMaterial(int material) | 159 | public override void SetMaterial(int material) |
@@ -302,8 +317,9 @@ public abstract class BSPhysObject : PhysicsActor | |||
302 | public virtual bool SendCollisions() | 317 | public virtual bool SendCollisions() |
303 | { | 318 | { |
304 | bool ret = true; | 319 | bool ret = true; |
320 | |||
305 | // If the 'no collision' call, force it to happen right now so quick collision_end | 321 | // If the 'no collision' call, force it to happen right now so quick collision_end |
306 | bool force = (CollisionCollection.Count == 0); | 322 | bool force = (CollisionCollection.Count == 0 && CollisionsLastTick.Count != 0); |
307 | 323 | ||
308 | // throttle the collisions to the number of milliseconds specified in the subscription | 324 | // throttle the collisions to the number of milliseconds specified in the subscription |
309 | if (force || (PhysicsScene.SimulationNowTime >= NextCollisionOkTime)) | 325 | if (force || (PhysicsScene.SimulationNowTime >= NextCollisionOkTime)) |
@@ -318,7 +334,7 @@ public abstract class BSPhysObject : PhysicsActor | |||
318 | ret = false; | 334 | ret = false; |
319 | } | 335 | } |
320 | 336 | ||
321 | // DetailLog("{0},{1}.SendCollisionUpdate,call,numCollisions={2}", LocalID, TypeName, CollisionCollection.Count); | 337 | DetailLog("{0},{1}.SendCollisionUpdate,call,numCollisions={2}", LocalID, TypeName, CollisionCollection.Count); |
322 | base.SendCollisionUpdate(CollisionCollection); | 338 | base.SendCollisionUpdate(CollisionCollection); |
323 | 339 | ||
324 | // Remember the collisions from this tick for some collision specific processing. | 340 | // Remember the collisions from this tick for some collision specific processing. |