remove the use of Vector3 for axis locks on the rest of engines

avinationmerge
UbitUmarov 2015-10-21 00:15:09 +01:00
parent ce5d5fc8dc
commit deb4364f42
7 changed files with 13 additions and 26 deletions

View File

@ -211,7 +211,7 @@ namespace OpenSim.Region.PhysicsModule.BasicPhysics
{ {
} }
public override void LockAngularMotion(Vector3 axis) public override void LockAngularMotion(byte axislocks)
{ {
} }

View File

@ -224,7 +224,7 @@ namespace OpenSim.Region.PhysicsModule.BasicPhysics
{ {
} }
public override void LockAngularMotion(Vector3 axis) public override void LockAngularMotion(byte axislocks)
{ {
} }

View File

@ -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 { public override OMV.Vector3 Position {
get { get {

View File

@ -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); 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); 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); 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); ApplyAxisLimits(ExtendedPhysics.PHYS_AXIS_LOCK_ANGULAR_Z, 0f, 0f);
} }

View File

@ -248,7 +248,7 @@ namespace OpenSim.Region.PhysicsModule.POS
{ {
} }
public override void LockAngularMotion(Vector3 axis) public override void LockAngularMotion(byte axislocks)
{ {
} }

View File

@ -250,7 +250,7 @@ namespace OpenSim.Region.PhysicsModule.POS
{ {
} }
public override void LockAngularMotion(Vector3 axis) public override void LockAngularMotion(byte axislocks)
{ {
} }

View File

@ -230,20 +230,7 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
public abstract void delink(); public abstract void delink();
public virtual void LockAngularMotion(Vector3 axis) { } public abstract void LockAngularMotion(byte axislocks);
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 virtual void RequestPhysicsterseUpdate() public virtual void RequestPhysicsterseUpdate()
{ {
@ -661,7 +648,7 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
public override void link(PhysicsActor obj) { } public override void link(PhysicsActor obj) { }
public override void delink() { } 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 AddForce(Vector3 force, bool pushforce) { }
public override void AddAngularForce(Vector3 force, bool pushforce) { } public override void AddAngularForce(Vector3 force, bool pushforce) { }