diff options
Diffstat (limited to 'OpenSim/Region/Physics/OdePlugin/ODEPrim.cs')
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 91 |
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 | } |