aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Scene.cs
diff options
context:
space:
mode:
authorMW2007-08-23 11:18:16 +0000
committerMW2007-08-23 11:18:16 +0000
commit8264ba849f24ed201bfe38e651932cc80fd9d3dc (patch)
tree3693b83e5b6faaef762e03be9c988488737f7173 /OpenSim/Region/Environment/Scenes/Scene.cs
parentAdded danx0r's physics patch, although for now have disabled the lines in Sce... (diff)
downloadopensim-SC_OLD-8264ba849f24ed201bfe38e651932cc80fd9d3dc.zip
opensim-SC_OLD-8264ba849f24ed201bfe38e651932cc80fd9d3dc.tar.gz
opensim-SC_OLD-8264ba849f24ed201bfe38e651932cc80fd9d3dc.tar.bz2
opensim-SC_OLD-8264ba849f24ed201bfe38e651932cc80fd9d3dc.tar.xz
Added a PhysicsActor PhysActor member to SceneObjectPart, and made it so this is set when registering the prims with the physics engine.
Position changes of the prim is now updated straight away to physic engine. (note at the moment, only root prim is registered with physics engine. Think we need to decide how we are going to manage child prims and physics.) As before this is all currently disabled (in scene.cs) until its in a bit more working condition.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs26
1 files changed, 15 insertions, 11 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 7317361..20624d5 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -503,11 +503,12 @@ namespace OpenSim.Region.Environment.Scenes
503 foreach (SceneObjectGroup prim in PrimsFromDB) 503 foreach (SceneObjectGroup prim in PrimsFromDB)
504 { 504 {
505 AddEntityFromStorage(prim); 505 AddEntityFromStorage(prim);
506 // phyScene.AddPrim( 506 SceneObjectPart rootPart = prim.GetChildPart(prim.UUID);
507 // new PhysicsVector(prim.RootPart.AbsolutePosition.X, prim.RootPart.AbsolutePosition.Y, prim.RootPart.AbsolutePosition.Z), 507 // rootPart.PhysActor = phyScene.AddPrim(
508 // new PhysicsVector(prim.RootPart.Scale.X, prim.RootPart.Scale.Y, prim.RootPart.Scale.Z), 508 // new PhysicsVector(rootPart.AbsolutePosition.X, rootPart.AbsolutePosition.Y, rootPart.AbsolutePosition.Z),
509 // new Axiom.Math.Quaternion(prim.RootPart.RotationOffset.W, prim.RootPart.RotationOffset.X, 509 // new PhysicsVector(rootPart.Scale.X, rootPart.Scale.Y, rootPart.Scale.Z),
510 // prim.RootPart.RotationOffset.Y, prim.RootPart.RotationOffset.Z)); 510 // new Axiom.Math.Quaternion(rootPart.RotationOffset.W, rootPart.RotationOffset.X,
511 // rootPart.RotationOffset.Y, rootPart.RotationOffset.Z));
511 } 512 }
512 MainLog.Instance.Verbose("Loaded " + PrimsFromDB.Count.ToString() + " SceneObject(s)"); 513 MainLog.Instance.Verbose("Loaded " + PrimsFromDB.Count.ToString() + " SceneObject(s)");
513 } 514 }
@@ -545,7 +546,8 @@ namespace OpenSim.Region.Environment.Scenes
545 { 546 {
546 SceneObjectGroup sceneOb = new SceneObjectGroup(this, this.m_regionHandle, ownerID, PrimIDAllocate(), pos, shape); 547 SceneObjectGroup sceneOb = new SceneObjectGroup(this, this.m_regionHandle, ownerID, PrimIDAllocate(), pos, shape);
547 AddEntity(sceneOb); 548 AddEntity(sceneOb);
548 //phyScene.AddPrim(new PhysicsVector(pos.X, pos.Y, pos.Z), new PhysicsVector(shape.Scale.X, shape.Scale.Y, shape.Scale.Z), 549 SceneObjectPart rootPart = sceneOb.GetChildPart(sceneOb.UUID);
550 // rootPart.PhysActor =phyScene.AddPrim(new PhysicsVector(pos.X, pos.Y, pos.Z), new PhysicsVector(shape.Scale.X, shape.Scale.Y, shape.Scale.Z),
549 // new Axiom.Math.Quaternion()); 551 // new Axiom.Math.Quaternion());
550 } 552 }
551 553
@@ -622,11 +624,13 @@ namespace OpenSim.Region.Environment.Scenes
622 //if we want this to be a import method then we need new uuids for the object to avoid any clashes 624 //if we want this to be a import method then we need new uuids for the object to avoid any clashes
623 //obj.RegenerateFullIDs(); 625 //obj.RegenerateFullIDs();
624 AddEntity(obj); 626 AddEntity(obj);
625 // phyScene.AddPrim( 627
626 // new PhysicsVector(obj.RootPart.AbsolutePosition.X, obj.RootPart.AbsolutePosition.Y, obj.RootPart.AbsolutePosition.Z), 628 SceneObjectPart rootPart = obj.GetChildPart(obj.UUID);
627 // new PhysicsVector(obj.RootPart.Scale.X, obj.RootPart.Scale.Y, obj.RootPart.Scale.Z), 629 //rootPart.PhysActor = phyScene.AddPrim(
628 // new Axiom.Math.Quaternion(obj.RootPart.RotationOffset.W, obj.RootPart.RotationOffset.X, 630 // new PhysicsVector(rootPart.AbsolutePosition.X, rootPart.AbsolutePosition.Y, rootPart.AbsolutePosition.Z),
629 // obj.RootPart.RotationOffset.Y, obj.RootPart.RotationOffset.Z)); 631 // new PhysicsVector(rootPart.Scale.X, rootPart.Scale.Y, rootPart.Scale.Z),
632 // new Axiom.Math.Quaternion(rootPart.RotationOffset.W, rootPart.RotationOffset.X,
633 // rootPart.RotationOffset.Y, rootPart.RotationOffset.Z));
630 primCount++; 634 primCount++;
631 } 635 }
632 } 636 }