aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODEPrim.cs91
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdePlugin.cs4
2 files changed, 90 insertions, 5 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
index bf88fc4..cd84c4d 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
@@ -134,7 +134,34 @@ namespace OpenSim.Region.Physics.OdePlugin
134 } 134 }
135 else 135 else
136 { 136 {
137 prim_geom = d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z); 137 if (pbs.ProfileShape == ProfileShape.HalfCircle && pbs.PathCurve == (byte)Extrusion.Curve1)
138 {
139 if (_size.X == _size.Y && _size.Y == _size.Z && _size.X == _size.Z)
140 {
141 prim_geom = d.CreateSphere(m_targetSpace, _size.X / 2);
142 }
143 else
144 {
145 prim_geom = d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z);
146 }
147 }
148 //else if (pbs.ProfileShape == ProfileShape.Circle && pbs.PathCurve == (byte)Extrusion.Straight)
149 //{
150 //Cyllinder
151 //if (_size.X == _size.Y)
152 //{
153 //prim_geom = d.CreateCylinder(m_targetSpace, _size.X / 2, _size.Z);
154 //}
155 //else
156 //{
157 //prim_geom = d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z);
158 //}
159 //}
160 else
161 {
162
163 prim_geom = d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z);
164 }
138 } 165 }
139 166
140 d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z); 167 d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z);
@@ -459,7 +486,35 @@ namespace OpenSim.Region.Physics.OdePlugin
459 } 486 }
460 else 487 else
461 { 488 {
462 prim_geom = d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z); 489 if (_pbs.ProfileShape == ProfileShape.HalfCircle && _pbs.PathCurve == (byte)Extrusion.Curve1)
490 {
491 if (_size.X == _size.Y && _size.Y == _size.Z && _size.X == _size.Z)
492 {
493 prim_geom = d.CreateSphere(m_targetSpace, _size.X / 2);
494 }
495 else
496 {
497 prim_geom = d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z);
498 }
499 }
500 //else if (_pbs.ProfileShape == ProfileShape.Circle && _pbs.PathCurve == (byte)Extrusion.Straight)
501 //{
502 //Cyllinder
503 //if (_size.X == _size.Y)
504 //{
505 // prim_geom = d.CreateCylinder(m_targetSpace, _size.X / 2, _size.Z);
506 //}
507 //else
508 //{
509 //prim_geom = d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z);
510 //}
511 //}
512 else
513 {
514
515 prim_geom = d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z);
516 }
517 //prim_geom = d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z);
463 d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z); 518 d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z);
464 d.Quaternion myrot = new d.Quaternion(); 519 d.Quaternion myrot = new d.Quaternion();
465 myrot.W = _orientation.w; 520 myrot.W = _orientation.w;
@@ -471,7 +526,34 @@ namespace OpenSim.Region.Physics.OdePlugin
471 } 526 }
472 else 527 else
473 { 528 {
474 prim_geom = d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z); 529 if (_pbs.ProfileShape == ProfileShape.HalfCircle && _pbs.PathCurve == (byte)Extrusion.Curve1)
530 {
531 if (_size.X == _size.Y && _size.Y == _size.Z && _size.X == _size.Z)
532 {
533 prim_geom = d.CreateSphere(m_targetSpace, _size.X / 2);
534 }
535 else
536 {
537 prim_geom = d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z);
538 }
539 }
540 //else if (_pbs.ProfileShape == ProfileShape.Circle && _pbs.PathCurve == (byte)Extrusion.Straight)
541 //{
542 //Cyllinder
543 //if (_size.X == _size.Y)
544 //{
545 //prim_geom = d.CreateCylinder(m_targetSpace, _size.X / 2, _size.Z);
546 //}
547 //else
548 //{
549 //prim_geom = d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z);
550 //}
551 //}
552 else
553 {
554
555 prim_geom = d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z);
556 }
475 d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z); 557 d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z);
476 d.Quaternion myrot = new d.Quaternion(); 558 d.Quaternion myrot = new d.Quaternion();
477 myrot.W = _orientation.w; 559 myrot.W = _orientation.w;
@@ -780,6 +862,9 @@ namespace OpenSim.Region.Physics.OdePlugin
780 { 862 {
781 m_throttleUpdates = false; 863 m_throttleUpdates = false;
782 throttleCounter = 0; 864 throttleCounter = 0;
865 m_rotationalVelocity.X = 0;
866 m_rotationalVelocity.Y = 0;
867 m_rotationalVelocity.Z = 0;
783 base.RequestPhysicsterseUpdate(); 868 base.RequestPhysicsterseUpdate();
784 m_lastUpdateSent = true; 869 m_lastUpdateSent = true;
785 } 870 }
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
index 41e195b..0563992 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
@@ -338,7 +338,7 @@ namespace OpenSim.Region.Physics.OdePlugin
338 { 338 {
339 //This is disabled at the moment only because it needs more tweaking 339 //This is disabled at the moment only because it needs more tweaking
340 //It will eventually be uncommented 340 //It will eventually be uncommented
341 341 /*
342 if (contacts[i].depth >= 1.00f) 342 if (contacts[i].depth >= 1.00f)
343 { 343 {
344 //MainLog.Instance.Debug("PHYSICS",contacts[i].depth.ToString()); 344 //MainLog.Instance.Debug("PHYSICS",contacts[i].depth.ToString());
@@ -381,7 +381,7 @@ namespace OpenSim.Region.Physics.OdePlugin
381 //contacts[i].depth = 0.0000000f; 381 //contacts[i].depth = 0.0000000f;
382 } 382 }
383 } 383 }
384 384 */
385 385
386 // If you interpenetrate a prim with another prim 386 // If you interpenetrate a prim with another prim
387 if (p1.PhysicsActorType == (int) ActorTypes.Prim && p2.PhysicsActorType == (int) ActorTypes.Prim) 387 if (p1.PhysicsActorType == (int) ActorTypes.Prim && p2.PhysicsActorType == (int) ActorTypes.Prim)