aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
diff options
context:
space:
mode:
authorTeravus Ovares2008-01-19 22:51:16 +0000
committerTeravus Ovares2008-01-19 22:51:16 +0000
commit4f9c7288cd7ad2967d8f8bb8514dfcf166133474 (patch)
tree9e0b43fd1efa9e8a8633f9af25bc1eba0178db2c /OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
parentMost is back in its original state :) Hope I didn't break anything... *looks ... (diff)
downloadopensim-SC-4f9c7288cd7ad2967d8f8bb8514dfcf166133474.zip
opensim-SC-4f9c7288cd7ad2967d8f8bb8514dfcf166133474.tar.gz
opensim-SC-4f9c7288cd7ad2967d8f8bb8514dfcf166133474.tar.bz2
opensim-SC-4f9c7288cd7ad2967d8f8bb8514dfcf166133474.tar.xz
* Announcing the alternative prim early adoption program.. Adding regular spheres to the physical prim mix.
* Be advised.. these are not ellipsoids.. these are spheres.
Diffstat (limited to 'OpenSim/Region/Physics/OdePlugin/ODEPrim.cs')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODEPrim.cs91
1 files changed, 88 insertions, 3 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 }