aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/OdePlugin/ODEPrim.cs')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODEPrim.cs22
1 files changed, 3 insertions, 19 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
index 19de4ca..b81dba7 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
@@ -3,6 +3,7 @@ using System.Collections.Generic;
3using Axiom.Math; 3using Axiom.Math;
4using Ode.NET; 4using Ode.NET;
5using OpenSim.Framework; 5using OpenSim.Framework;
6using OpenSim.Framework.Console;
6using OpenSim.Region.Physics.Manager; 7using OpenSim.Region.Physics.Manager;
7 8
8namespace OpenSim.Region.Physics.OdePlugin 9namespace OpenSim.Region.Physics.OdePlugin
@@ -47,12 +48,9 @@ namespace OpenSim.Region.Physics.OdePlugin
47 private const float MassMultiplier = 150f; // Ref: Water: 1000kg.. this iset to 500 48 private const float MassMultiplier = 150f; // Ref: Water: 1000kg.. this iset to 500
48 private int debugcounter = 0; 49 private int debugcounter = 0;
49 50
50
51 public OdePrim(String primName, OdeScene parent_scene, IntPtr targetSpace, PhysicsVector pos, PhysicsVector size, 51 public OdePrim(String primName, OdeScene parent_scene, IntPtr targetSpace, PhysicsVector pos, PhysicsVector size,
52 Quaternion rotation, IMesh mesh, PrimitiveBaseShape pbs, bool pisPhysical) 52 Quaternion rotation, IMesh mesh, PrimitiveBaseShape pbs, bool pisPhysical)
53 { 53 {
54
55
56 _velocity = new PhysicsVector(); 54 _velocity = new PhysicsVector();
57 _position = pos; 55 _position = pos;
58 m_taintposition = pos; 56 m_taintposition = pos;
@@ -98,8 +96,6 @@ namespace OpenSim.Region.Physics.OdePlugin
98 } 96 }
99 m_primName = primName; 97 m_primName = primName;
100 98
101
102
103 lock (OdeScene.OdeLock) 99 lock (OdeScene.OdeLock)
104 { 100 {
105 if (mesh != null) 101 if (mesh != null)
@@ -243,11 +239,11 @@ namespace OpenSim.Region.Physics.OdePlugin
243 int[] arrayitem = _parent_scene.calculateSpaceArrayItemFromPos(_position); 239 int[] arrayitem = _parent_scene.calculateSpaceArrayItemFromPos(_position);
244 if (primScenAvatarIn == "0") 240 if (primScenAvatarIn == "0")
245 { 241 {
246 OpenSim.Framework.Console.MainLog.Instance.Verbose("Physics", "Prim " + m_primName + " in space with no prim: " + primScenAvatarIn + ". Expected to be at: " + m_targetSpace.ToString() + " . Arr:': " + arrayitem[0].ToString() + "," + arrayitem[1].ToString()); 242 MainLog.Instance.Verbose("Physics", "Prim " + m_primName + " in space with no prim: " + primScenAvatarIn + ". Expected to be at: " + m_targetSpace.ToString() + " . Arr:': " + arrayitem[0].ToString() + "," + arrayitem[1].ToString());
247 } 243 }
248 else 244 else
249 { 245 {
250 OpenSim.Framework.Console.MainLog.Instance.Verbose("Physics", "Prim " + m_primName + " in Prim space with prim: " + primScenAvatarIn + ". Expected to be at: " + m_targetSpace.ToString() + ". Arr:" + arrayitem[0].ToString() + "," + arrayitem[1].ToString()); 246 MainLog.Instance.Verbose("Physics", "Prim " + m_primName + " in Prim space with prim: " + primScenAvatarIn + ". Expected to be at: " + m_targetSpace.ToString() + ". Arr:" + arrayitem[0].ToString() + "," + arrayitem[1].ToString());
251 } 247 }
252 m_targetSpace = _parent_scene.recalculateSpaceForGeom(prim_geom, _position, m_targetSpace); 248 m_targetSpace = _parent_scene.recalculateSpaceForGeom(prim_geom, _position, m_targetSpace);
253 d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z); 249 d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z);
@@ -361,13 +357,10 @@ namespace OpenSim.Region.Physics.OdePlugin
361 enableBody(); 357 enableBody();
362 d.BodyEnable(Body); 358 d.BodyEnable(Body);
363 } 359 }
364
365 } 360 }
366 361
367
368 _parent_scene.geom_name_map[prim_geom] = oldname; 362 _parent_scene.geom_name_map[prim_geom] = oldname;
369 363
370
371 m_taintsize = _size; 364 m_taintsize = _size;
372 } 365 }
373 public void changeshape(float timestamp) 366 public void changeshape(float timestamp)
@@ -382,9 +375,7 @@ namespace OpenSim.Region.Physics.OdePlugin
382 d.GeomDestroy(prim_geom); 375 d.GeomDestroy(prim_geom);
383 if (_mesh != null) 376 if (_mesh != null)
384 { 377 {
385
386 d.GeomBoxSetLengths(prim_geom, _size.X, _size.Y, _size.Z); 378 d.GeomBoxSetLengths(prim_geom, _size.X, _size.Y, _size.Z);
387
388 } 379 }
389 380
390 // Construction of new prim 381 // Construction of new prim
@@ -421,9 +412,6 @@ namespace OpenSim.Region.Physics.OdePlugin
421 } 412 }
422 _parent_scene.geom_name_map[prim_geom] = oldname; 413 _parent_scene.geom_name_map[prim_geom] = oldname;
423 414
424
425
426
427 m_taintshape = false; 415 m_taintshape = false;
428 } 416 }
429 public override bool IsPhysical 417 public override bool IsPhysical
@@ -470,7 +458,6 @@ namespace OpenSim.Region.Physics.OdePlugin
470 { 458 {
471 get { return _position; } 459 get { return _position; }
472 460
473
474 set 461 set
475 { 462 {
476 _position = value; 463 _position = value;
@@ -484,7 +471,6 @@ namespace OpenSim.Region.Physics.OdePlugin
484 set 471 set
485 { 472 {
486 _size = value; 473 _size = value;
487
488 } 474 }
489 } 475 }
490 476
@@ -493,7 +479,6 @@ namespace OpenSim.Region.Physics.OdePlugin
493 set 479 set
494 { 480 {
495 _pbs = value; 481 _pbs = value;
496
497 } 482 }
498 } 483 }
499 484
@@ -634,7 +619,6 @@ namespace OpenSim.Region.Physics.OdePlugin
634 base.RequestPhysicsterseUpdate(); 619 base.RequestPhysicsterseUpdate();
635 m_lastUpdateSent = true; 620 m_lastUpdateSent = true;
636 } 621 }
637
638 } 622 }
639 else 623 else
640 { 624 {