aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs46
1 files changed, 23 insertions, 23 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index a87bde0..70f3112 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -167,9 +167,9 @@ namespace OpenSim.Region.Framework.Scenes
167 167
168 [XmlIgnore] 168 [XmlIgnore]
169 public uint AttachmentPoint; 169 public uint AttachmentPoint;
170 170
171 [XmlIgnore] 171 [XmlIgnore]
172 public PhysicsVector RotationAxis = new PhysicsVector(1f, 1f, 1f); 172 public Vector3 RotationAxis = Vector3.One;
173 173
174 [XmlIgnore] 174 [XmlIgnore]
175 public bool VolumeDetectActive; // XmlIgnore set to avoid problems with persistance until I come to care for this 175 public bool VolumeDetectActive; // XmlIgnore set to avoid problems with persistance until I come to care for this
@@ -537,13 +537,13 @@ namespace OpenSim.Region.Framework.Scenes
537 // Root prim actually goes at Position 537 // Root prim actually goes at Position
538 if (_parentID == 0) 538 if (_parentID == 0)
539 { 539 {
540 PhysActor.Position = new PhysicsVector(value.X, value.Y, value.Z); 540 PhysActor.Position = value;
541 } 541 }
542 else 542 else
543 { 543 {
544 // To move the child prim in respect to the group position and rotation we have to calculate 544 // To move the child prim in respect to the group position and rotation we have to calculate
545 Vector3 resultingposition = GetWorldPosition(); 545 Vector3 resultingposition = GetWorldPosition();
546 PhysActor.Position = new PhysicsVector(resultingposition.X, resultingposition.Y, resultingposition.Z); 546 PhysActor.Position = resultingposition;
547 Quaternion resultingrot = GetWorldRotation(); 547 Quaternion resultingrot = GetWorldRotation();
548 PhysActor.Orientation = resultingrot; 548 PhysActor.Orientation = resultingrot;
549 } 549 }
@@ -585,7 +585,7 @@ namespace OpenSim.Region.Framework.Scenes
585 if (_parentID != 0 && PhysActor != null) 585 if (_parentID != 0 && PhysActor != null)
586 { 586 {
587 Vector3 resultingposition = GetWorldPosition(); 587 Vector3 resultingposition = GetWorldPosition();
588 PhysActor.Position = new PhysicsVector(resultingposition.X, resultingposition.Y, resultingposition.Z); 588 PhysActor.Position = resultingposition;
589 Quaternion resultingrot = GetWorldRotation(); 589 Quaternion resultingrot = GetWorldRotation();
590 PhysActor.Orientation = resultingrot; 590 PhysActor.Orientation = resultingrot;
591 591
@@ -675,7 +675,7 @@ namespace OpenSim.Region.Framework.Scenes
675 { 675 {
676 if (PhysActor.IsPhysical) 676 if (PhysActor.IsPhysical)
677 { 677 {
678 PhysActor.Velocity = new PhysicsVector(value.X, value.Y, value.Z); 678 PhysActor.Velocity = value;
679 m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor); 679 m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor);
680 } 680 }
681 } 681 }
@@ -817,7 +817,7 @@ if (m_shape != null) {
817 { 817 {
818 if (m_parentGroup.Scene.PhysicsScene != null) 818 if (m_parentGroup.Scene.PhysicsScene != null)
819 { 819 {
820 PhysActor.Size = new PhysicsVector(m_shape.Scale.X, m_shape.Scale.Y, m_shape.Scale.Z); 820 PhysActor.Size = m_shape.Scale;
821 m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor); 821 m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor);
822 } 822 }
823 } 823 }
@@ -1225,7 +1225,7 @@ if (m_shape != null) {
1225 /// <param name="localGlobalTF">true for the local frame, false for the global frame</param> 1225 /// <param name="localGlobalTF">true for the local frame, false for the global frame</param>
1226 public void ApplyImpulse(Vector3 impulsei, bool localGlobalTF) 1226 public void ApplyImpulse(Vector3 impulsei, bool localGlobalTF)
1227 { 1227 {
1228 PhysicsVector impulse = new PhysicsVector(impulsei.X, impulsei.Y, impulsei.Z); 1228 Vector3 impulse = impulsei;
1229 1229
1230 if (localGlobalTF) 1230 if (localGlobalTF)
1231 { 1231 {
@@ -1233,7 +1233,7 @@ if (m_shape != null) {
1233 Quaternion AXgrot = grot; 1233 Quaternion AXgrot = grot;
1234 Vector3 AXimpulsei = impulsei; 1234 Vector3 AXimpulsei = impulsei;
1235 Vector3 newimpulse = AXimpulsei * AXgrot; 1235 Vector3 newimpulse = AXimpulsei * AXgrot;
1236 impulse = new PhysicsVector(newimpulse.X, newimpulse.Y, newimpulse.Z); 1236 impulse = newimpulse;
1237 } 1237 }
1238 1238
1239 if (m_parentGroup != null) 1239 if (m_parentGroup != null)
@@ -1251,7 +1251,7 @@ if (m_shape != null) {
1251 /// <param name="localGlobalTF">true for the local frame, false for the global frame</param> 1251 /// <param name="localGlobalTF">true for the local frame, false for the global frame</param>
1252 public void ApplyAngularImpulse(Vector3 impulsei, bool localGlobalTF) 1252 public void ApplyAngularImpulse(Vector3 impulsei, bool localGlobalTF)
1253 { 1253 {
1254 PhysicsVector impulse = new PhysicsVector(impulsei.X, impulsei.Y, impulsei.Z); 1254 Vector3 impulse = impulsei;
1255 1255
1256 if (localGlobalTF) 1256 if (localGlobalTF)
1257 { 1257 {
@@ -1259,7 +1259,7 @@ if (m_shape != null) {
1259 Quaternion AXgrot = grot; 1259 Quaternion AXgrot = grot;
1260 Vector3 AXimpulsei = impulsei; 1260 Vector3 AXimpulsei = impulsei;
1261 Vector3 newimpulse = AXimpulsei * AXgrot; 1261 Vector3 newimpulse = AXimpulsei * AXgrot;
1262 impulse = new PhysicsVector(newimpulse.X, newimpulse.Y, newimpulse.Z); 1262 impulse = newimpulse;
1263 } 1263 }
1264 1264
1265 if (m_parentGroup != null) 1265 if (m_parentGroup != null)
@@ -1277,7 +1277,7 @@ if (m_shape != null) {
1277 /// <param name="localGlobalTF">true for the local frame, false for the global frame</param> 1277 /// <param name="localGlobalTF">true for the local frame, false for the global frame</param>
1278 public void SetAngularImpulse(Vector3 impulsei, bool localGlobalTF) 1278 public void SetAngularImpulse(Vector3 impulsei, bool localGlobalTF)
1279 { 1279 {
1280 PhysicsVector impulse = new PhysicsVector(impulsei.X, impulsei.Y, impulsei.Z); 1280 Vector3 impulse = impulsei;
1281 1281
1282 if (localGlobalTF) 1282 if (localGlobalTF)
1283 { 1283 {
@@ -1285,7 +1285,7 @@ if (m_shape != null) {
1285 Quaternion AXgrot = grot; 1285 Quaternion AXgrot = grot;
1286 Vector3 AXimpulsei = impulsei; 1286 Vector3 AXimpulsei = impulsei;
1287 Vector3 newimpulse = AXimpulsei * AXgrot; 1287 Vector3 newimpulse = AXimpulsei * AXgrot;
1288 impulse = new PhysicsVector(newimpulse.X, newimpulse.Y, newimpulse.Z); 1288 impulse = newimpulse;
1289 } 1289 }
1290 1290
1291 if (m_parentGroup != null) 1291 if (m_parentGroup != null)
@@ -1333,8 +1333,8 @@ if (m_shape != null) {
1333 PhysActor = m_parentGroup.Scene.PhysicsScene.AddPrimShape( 1333 PhysActor = m_parentGroup.Scene.PhysicsScene.AddPrimShape(
1334 Name, 1334 Name,
1335 Shape, 1335 Shape,
1336 new PhysicsVector(AbsolutePosition.X, AbsolutePosition.Y, AbsolutePosition.Z), 1336 AbsolutePosition,
1337 new PhysicsVector(Scale.X, Scale.Y, Scale.Z), 1337 Scale,
1338 RotationOffset, 1338 RotationOffset,
1339 RigidBody); 1339 RigidBody);
1340 1340
@@ -1523,7 +1523,7 @@ if (m_shape != null) {
1523 PhysicsJoint joint; 1523 PhysicsJoint joint;
1524 1524
1525 joint = m_parentGroup.Scene.PhysicsScene.RequestJointCreation(Name, jointType, 1525 joint = m_parentGroup.Scene.PhysicsScene.RequestJointCreation(Name, jointType,
1526 new PhysicsVector(AbsolutePosition.X, AbsolutePosition.Y, AbsolutePosition.Z), 1526 AbsolutePosition,
1527 this.RotationOffset, 1527 this.RotationOffset,
1528 Description, 1528 Description,
1529 bodyNames, 1529 bodyNames,
@@ -1708,12 +1708,12 @@ if (m_shape != null) {
1708 } 1708 }
1709 } 1709 }
1710 1710
1711 public PhysicsVector GetForce() 1711 public Vector3 GetForce()
1712 { 1712 {
1713 if (PhysActor != null) 1713 if (PhysActor != null)
1714 return PhysActor.Force; 1714 return PhysActor.Force;
1715 else 1715 else
1716 return new PhysicsVector(); 1716 return Vector3.Zero;
1717 } 1717 }
1718 1718
1719 public void GetProperties(IClientAPI client) 1719 public void GetProperties(IClientAPI client)
@@ -2078,7 +2078,7 @@ if (m_shape != null) {
2078 } 2078 }
2079 } 2079 }
2080 2080
2081 public void PhysicsOutOfBounds(PhysicsVector pos) 2081 public void PhysicsOutOfBounds(Vector3 pos)
2082 { 2082 {
2083 m_log.Error("[PHYSICS]: Physical Object went out of bounds."); 2083 m_log.Error("[PHYSICS]: Physical Object went out of bounds.");
2084 2084
@@ -2564,7 +2564,7 @@ if (m_shape != null) {
2564 } 2564 }
2565 } 2565 }
2566 2566
2567 public void SetForce(PhysicsVector force) 2567 public void SetForce(Vector3 force)
2568 { 2568 {
2569 if (PhysActor != null) 2569 if (PhysActor != null)
2570 { 2570 {
@@ -2588,7 +2588,7 @@ if (m_shape != null) {
2588 } 2588 }
2589 } 2589 }
2590 2590
2591 public void SetVehicleVectorParam(int param, PhysicsVector value) 2591 public void SetVehicleVectorParam(int param, Vector3 value)
2592 { 2592 {
2593 if (PhysActor != null) 2593 if (PhysActor != null)
2594 { 2594 {
@@ -3430,8 +3430,8 @@ if (m_shape != null) {
3430 PhysActor = m_parentGroup.Scene.PhysicsScene.AddPrimShape( 3430 PhysActor = m_parentGroup.Scene.PhysicsScene.AddPrimShape(
3431 Name, 3431 Name,
3432 Shape, 3432 Shape,
3433 new PhysicsVector(AbsolutePosition.X, AbsolutePosition.Y, AbsolutePosition.Z), 3433 AbsolutePosition,
3434 new PhysicsVector(Scale.X, Scale.Y, Scale.Z), 3434 Scale,
3435 RotationOffset, 3435 RotationOffset,
3436 UsePhysics); 3436 UsePhysics);
3437 3437