aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorUbitUmarov2015-10-21 00:15:09 +0100
committerUbitUmarov2015-10-21 00:15:09 +0100
commitdeb4364f4299be39600f393e2d384c757ffa5ee6 (patch)
treed9643c7b22dcfcb31bf7b55cf71e220fe3252b47 /OpenSim/Region
parent the inertia matrix inversions and body inertia changes to implement axis loc... (diff)
downloadopensim-SC_OLD-deb4364f4299be39600f393e2d384c757ffa5ee6.zip
opensim-SC_OLD-deb4364f4299be39600f393e2d384c757ffa5ee6.tar.gz
opensim-SC_OLD-deb4364f4299be39600f393e2d384c757ffa5ee6.tar.bz2
opensim-SC_OLD-deb4364f4299be39600f393e2d384c757ffa5ee6.tar.xz
remove the use of Vector3 for axis locks on the rest of engines
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsActor.cs2
-rw-r--r--OpenSim/Region/PhysicsModules/BasicPhysics/BasicPhysicsPrim.cs2
-rw-r--r--OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs2
-rw-r--r--OpenSim/Region/PhysicsModules/BulletS/BSPrim.cs10
-rw-r--r--OpenSim/Region/PhysicsModules/POS/POSCharacter.cs2
-rw-r--r--OpenSim/Region/PhysicsModules/POS/POSPrim.cs2
-rw-r--r--OpenSim/Region/PhysicsModules/SharedBase/PhysicsActor.cs19
7 files changed, 13 insertions, 26 deletions
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
211 { 211 {
212 } 212 }
213 213
214 public override void LockAngularMotion(Vector3 axis) 214 public override void LockAngularMotion(byte axislocks)
215 { 215 {
216 } 216 }
217 217
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
224 { 224 {
225 } 225 }
226 226
227 public override void LockAngularMotion(Vector3 axis) 227 public override void LockAngularMotion(byte axislocks)
228 { 228 {
229 } 229 }
230 230
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
300 } 300 }
301 301
302 302
303 public override void LockAngularMotion(OMV.Vector3 axis) { return; } 303 public override void LockAngularMotion(byte axislocks) { return; }
304 304
305 public override OMV.Vector3 Position { 305 public override OMV.Vector3 Position {
306 get { 306 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
280 }); 280 });
281 } 281 }
282 282
283 public override void LockAngularMotion(OMV.Vector3 axis) 283 public override void LockAngularMotion(byte axislocks)
284 { 284 {
285 DetailLog("{0},BSPrim.LockAngularMotion,call,axis={1}", LocalID, axis); 285 DetailLog("{0},BSPrim.LockAngularMotion,call,axis={1}", LocalID, axislocks);
286 286
287 ApplyAxisLimits(ExtendedPhysics.PHYS_AXIS_UNLOCK_ANGULAR, 0f, 0f); 287 ApplyAxisLimits(ExtendedPhysics.PHYS_AXIS_UNLOCK_ANGULAR, 0f, 0f);
288 if (axis.X != 1) 288 if ((axislocks & 0x02) != 0)
289 { 289 {
290 ApplyAxisLimits(ExtendedPhysics.PHYS_AXIS_LOCK_ANGULAR_X, 0f, 0f); 290 ApplyAxisLimits(ExtendedPhysics.PHYS_AXIS_LOCK_ANGULAR_X, 0f, 0f);
291 } 291 }
292 if (axis.Y != 1) 292 if ((axislocks & 0x04) != 0)
293 { 293 {
294 ApplyAxisLimits(ExtendedPhysics.PHYS_AXIS_LOCK_ANGULAR_Y, 0f, 0f); 294 ApplyAxisLimits(ExtendedPhysics.PHYS_AXIS_LOCK_ANGULAR_Y, 0f, 0f);
295 } 295 }
296 if (axis.Z != 1) 296 if ((axislocks & 0x08) != 0)
297 { 297 {
298 ApplyAxisLimits(ExtendedPhysics.PHYS_AXIS_LOCK_ANGULAR_Z, 0f, 0f); 298 ApplyAxisLimits(ExtendedPhysics.PHYS_AXIS_LOCK_ANGULAR_Z, 0f, 0f);
299 } 299 }
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
248 { 248 {
249 } 249 }
250 250
251 public override void LockAngularMotion(Vector3 axis) 251 public override void LockAngularMotion(byte axislocks)
252 { 252 {
253 } 253 }
254 254
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
250 { 250 {
251 } 251 }
252 252
253 public override void LockAngularMotion(Vector3 axis) 253 public override void LockAngularMotion(byte axislocks)
254 { 254 {
255 } 255 }
256 256
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
230 230
231 public abstract void delink(); 231 public abstract void delink();
232 232
233 public virtual void LockAngularMotion(Vector3 axis) { } 233 public abstract void LockAngularMotion(byte axislocks);
234 234
235 public virtual void LockAngularMotion(byte axislocks)
236 {
237 Vector3 lrRotationAxis = Vector3.One;
238 if((axislocks & 0x02) != 0 )
239 lrRotationAxis.X = 0f;
240 if((axislocks & 0x04) != 0 )
241 lrRotationAxis.Y = 0f;
242 if((axislocks & 0x08) != 0 )
243 lrRotationAxis.Z = 0f;
244
245 LockAngularMotion(lrRotationAxis);
246 }
247
248 public virtual void RequestPhysicsterseUpdate() 235 public virtual void RequestPhysicsterseUpdate()
249 { 236 {
250 // Make a temporary copy of the event to avoid possibility of 237 // Make a temporary copy of the event to avoid possibility of
@@ -661,7 +648,7 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
661 648
662 public override void link(PhysicsActor obj) { } 649 public override void link(PhysicsActor obj) { }
663 public override void delink() { } 650 public override void delink() { }
664 public override void LockAngularMotion(Vector3 axis) { } 651 public override void LockAngularMotion(byte axislocks) { }
665 public override void AddForce(Vector3 force, bool pushforce) { } 652 public override void AddForce(Vector3 force, bool pushforce) { }
666 public override void AddAngularForce(Vector3 force, bool pushforce) { } 653 public override void AddAngularForce(Vector3 force, bool pushforce) { }
667 654