From deb4364f4299be39600f393e2d384c757ffa5ee6 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 21 Oct 2015 00:15:09 +0100 Subject: remove the use of Vector3 for axis locks on the rest of engines --- .../PhysicsModules/BasicPhysics/BasicPhysicsActor.cs | 2 +- .../PhysicsModules/BasicPhysics/BasicPhysicsPrim.cs | 2 +- OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs | 2 +- OpenSim/Region/PhysicsModules/BulletS/BSPrim.cs | 10 +++++----- OpenSim/Region/PhysicsModules/POS/POSCharacter.cs | 2 +- OpenSim/Region/PhysicsModules/POS/POSPrim.cs | 2 +- .../Region/PhysicsModules/SharedBase/PhysicsActor.cs | 19 +++---------------- 7 files changed, 13 insertions(+), 26 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsActor.cs b/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsActor.cs index 7ad7f6b..3944047 100644 --- a/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsActor.cs +++ b/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsActor.cs @@ -211,7 +211,7 @@ namespace OpenSim.Region.PhysicsModule.BasicPhysics { } - public override void LockAngularMotion(Vector3 axis) + public override void LockAngularMotion(byte axislocks) { } diff --git a/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsPrim.cs b/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsPrim.cs index b94f170..d2cd028 100644 --- a/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsPrim.cs +++ b/OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsPrim.cs @@ -224,7 +224,7 @@ namespace OpenSim.Region.PhysicsModule.BasicPhysics { } - public override void LockAngularMotion(Vector3 axis) + public override void LockAngularMotion(byte axislocks) { } diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs b/OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs index 83fc3a6..989b339 100644 --- a/OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs @@ -300,7 +300,7 @@ public sealed class BSCharacter : BSPhysObject } - public override void LockAngularMotion(OMV.Vector3 axis) { return; } + public override void LockAngularMotion(byte axislocks) { return; } public override OMV.Vector3 Position { get { diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSPrim.cs b/OpenSim/Region/PhysicsModules/BulletS/BSPrim.cs index 93e5e53..1d552eb 100644 --- a/OpenSim/Region/PhysicsModules/BulletS/BSPrim.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSPrim.cs @@ -280,20 +280,20 @@ public class BSPrim : BSPhysObject }); } - public override void LockAngularMotion(OMV.Vector3 axis) + public override void LockAngularMotion(byte axislocks) { - DetailLog("{0},BSPrim.LockAngularMotion,call,axis={1}", LocalID, axis); + DetailLog("{0},BSPrim.LockAngularMotion,call,axis={1}", LocalID, axislocks); ApplyAxisLimits(ExtendedPhysics.PHYS_AXIS_UNLOCK_ANGULAR, 0f, 0f); - if (axis.X != 1) + if ((axislocks & 0x02) != 0) { ApplyAxisLimits(ExtendedPhysics.PHYS_AXIS_LOCK_ANGULAR_X, 0f, 0f); } - if (axis.Y != 1) + if ((axislocks & 0x04) != 0) { ApplyAxisLimits(ExtendedPhysics.PHYS_AXIS_LOCK_ANGULAR_Y, 0f, 0f); } - if (axis.Z != 1) + if ((axislocks & 0x08) != 0) { ApplyAxisLimits(ExtendedPhysics.PHYS_AXIS_LOCK_ANGULAR_Z, 0f, 0f); } diff --git a/OpenSim/Region/PhysicsModules/POS/POSCharacter.cs b/OpenSim/Region/PhysicsModules/POS/POSCharacter.cs index b81ecfb..28d2b53 100644 --- a/OpenSim/Region/PhysicsModules/POS/POSCharacter.cs +++ b/OpenSim/Region/PhysicsModules/POS/POSCharacter.cs @@ -248,7 +248,7 @@ namespace OpenSim.Region.PhysicsModule.POS { } - public override void LockAngularMotion(Vector3 axis) + public override void LockAngularMotion(byte axislocks) { } diff --git a/OpenSim/Region/PhysicsModules/POS/POSPrim.cs b/OpenSim/Region/PhysicsModules/POS/POSPrim.cs index d1bbbae..180885d 100644 --- a/OpenSim/Region/PhysicsModules/POS/POSPrim.cs +++ b/OpenSim/Region/PhysicsModules/POS/POSPrim.cs @@ -250,7 +250,7 @@ namespace OpenSim.Region.PhysicsModule.POS { } - public override void LockAngularMotion(Vector3 axis) + public override void LockAngularMotion(byte axislocks) { } diff --git a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsActor.cs b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsActor.cs index 83f8af8..ebd2185 100644 --- a/OpenSim/Region/PhysicsModules/SharedBase/PhysicsActor.cs +++ b/OpenSim/Region/PhysicsModules/SharedBase/PhysicsActor.cs @@ -230,21 +230,8 @@ namespace OpenSim.Region.PhysicsModules.SharedBase public abstract void delink(); - public virtual void LockAngularMotion(Vector3 axis) { } - - public virtual void LockAngularMotion(byte axislocks) - { - Vector3 lrRotationAxis = Vector3.One; - if((axislocks & 0x02) != 0 ) - lrRotationAxis.X = 0f; - if((axislocks & 0x04) != 0 ) - lrRotationAxis.Y = 0f; - if((axislocks & 0x08) != 0 ) - lrRotationAxis.Z = 0f; - - LockAngularMotion(lrRotationAxis); - } - + public abstract void LockAngularMotion(byte axislocks); + public virtual void RequestPhysicsterseUpdate() { // Make a temporary copy of the event to avoid possibility of @@ -661,7 +648,7 @@ namespace OpenSim.Region.PhysicsModules.SharedBase public override void link(PhysicsActor obj) { } public override void delink() { } - public override void LockAngularMotion(Vector3 axis) { } + public override void LockAngularMotion(byte axislocks) { } public override void AddForce(Vector3 force, bool pushforce) { } public override void AddAngularForce(Vector3 force, bool pushforce) { } -- cgit v1.1