remove the use of Vector3 for axis locks on the rest of engines
parent
ce5d5fc8dc
commit
deb4364f42
|
@ -211,7 +211,7 @@ namespace OpenSim.Region.PhysicsModule.BasicPhysics
|
|||
{
|
||||
}
|
||||
|
||||
public override void LockAngularMotion(Vector3 axis)
|
||||
public override void LockAngularMotion(byte axislocks)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -224,7 +224,7 @@ namespace OpenSim.Region.PhysicsModule.BasicPhysics
|
|||
{
|
||||
}
|
||||
|
||||
public override void LockAngularMotion(Vector3 axis)
|
||||
public override void LockAngularMotion(byte axislocks)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -248,7 +248,7 @@ namespace OpenSim.Region.PhysicsModule.POS
|
|||
{
|
||||
}
|
||||
|
||||
public override void LockAngularMotion(Vector3 axis)
|
||||
public override void LockAngularMotion(byte axislocks)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -250,7 +250,7 @@ namespace OpenSim.Region.PhysicsModule.POS
|
|||
{
|
||||
}
|
||||
|
||||
public override void LockAngularMotion(Vector3 axis)
|
||||
public override void LockAngularMotion(byte axislocks)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -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) { }
|
||||
|
||||
|
|
Loading…
Reference in New Issue