aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
diff options
context:
space:
mode:
authorRobert Adams2012-09-13 10:11:25 -0700
committerRobert Adams2012-09-15 15:31:39 -0700
commitd86cbe637943acde05528d0bce6dc61a77257cc0 (patch)
treeb25ce79141dc4ee18b3bb59997de64f18f3aada2 /OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
parentBulletSim: Add 'IsNativeShape2' call (diff)
downloadopensim-SC-d86cbe637943acde05528d0bce6dc61a77257cc0.zip
opensim-SC-d86cbe637943acde05528d0bce6dc61a77257cc0.tar.gz
opensim-SC-d86cbe637943acde05528d0bce6dc61a77257cc0.tar.bz2
opensim-SC-d86cbe637943acde05528d0bce6dc61a77257cc0.tar.xz
BulletSim: remove unused NeedsMeshing() code from BSScene.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSScene.cs')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSScene.cs116
1 files changed, 0 insertions, 116 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
index eea899f..9c958d5 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSScene.cs
@@ -56,7 +56,6 @@ using OpenMetaverse;
56// Do attachments need to be handled separately? Need collision events. Do not collide with VolumeDetect 56// Do attachments need to be handled separately? Need collision events. Do not collide with VolumeDetect
57// Implement LockAngularMotion 57// Implement LockAngularMotion
58// Decide if clearing forces is the right thing to do when setting position (BulletSim::SetObjectTranslation) 58// Decide if clearing forces is the right thing to do when setting position (BulletSim::SetObjectTranslation)
59// Does NeedsMeshing() really need to exclude all the different shapes?
60// Remove mesh and Hull stuff. Use mesh passed to bullet and use convexdecom from bullet. 59// Remove mesh and Hull stuff. Use mesh passed to bullet and use convexdecom from bullet.
61// Add PID movement operations. What does ScenePresence.MoveToTarget do? 60// Add PID movement operations. What does ScenePresence.MoveToTarget do?
62// Check terrain size. 128 or 127? 61// Check terrain size. 128 or 127?
@@ -666,121 +665,6 @@ public class BSScene : PhysicsScene, IPhysicsParameters
666 665
667 public override bool IsThreaded { get { return false; } } 666 public override bool IsThreaded { get { return false; } }
668 667
669 /// <summary>
670 /// Routine to figure out if we need to mesh this prim with our mesher
671 /// </summary>
672 /// <param name="pbs"></param>
673 /// <returns>true if the prim needs meshing</returns>
674 public bool NeedsMeshing(PrimitiveBaseShape pbs)
675 {
676 // most of this is redundant now as the mesher will return null if it cant mesh a prim
677 // but we still need to check for sculptie meshing being enabled so this is the most
678 // convenient place to do it for now...
679
680 // int iPropertiesNotSupportedDefault = 0;
681
682 if (pbs.SculptEntry && !ShouldMeshSculptedPrim)
683 {
684 // Render sculpties as boxes
685 return false;
686 }
687
688 // if it's a standard box or sphere with no cuts, hollows, twist or top shear, return false since Bullet
689 // can use an internal representation for the prim
690 if (!ShouldForceSimplePrimMeshing)
691 {
692 if ((pbs.ProfileShape == ProfileShape.Square && pbs.PathCurve == (byte)Extrusion.Straight)
693 || (pbs.ProfileShape == ProfileShape.HalfCircle && pbs.PathCurve == (byte)Extrusion.Curve1
694 && pbs.Scale.X == pbs.Scale.Y && pbs.Scale.Y == pbs.Scale.Z))
695 {
696
697 if (pbs.ProfileBegin == 0 && pbs.ProfileEnd == 0
698 && pbs.ProfileHollow == 0
699 && pbs.PathTwist == 0 && pbs.PathTwistBegin == 0
700 && pbs.PathBegin == 0 && pbs.PathEnd == 0
701 && pbs.PathTaperX == 0 && pbs.PathTaperY == 0
702 && pbs.PathScaleX == 100 && pbs.PathScaleY == 100
703 && pbs.PathShearX == 0 && pbs.PathShearY == 0)
704 {
705 return false;
706 }
707 }
708 }
709
710 /* TODO: verify that the mesher will now do all these shapes
711 if (pbs.ProfileHollow != 0)
712 iPropertiesNotSupportedDefault++;
713
714 if ((pbs.PathBegin != 0) || pbs.PathEnd != 0)
715 iPropertiesNotSupportedDefault++;
716
717 if ((pbs.PathTwistBegin != 0) || (pbs.PathTwist != 0))
718 iPropertiesNotSupportedDefault++;
719
720 if ((pbs.ProfileBegin != 0) || pbs.ProfileEnd != 0)
721 iPropertiesNotSupportedDefault++;
722
723 if ((pbs.PathScaleX != 100) || (pbs.PathScaleY != 100))
724 iPropertiesNotSupportedDefault++;
725
726 if ((pbs.PathShearX != 0) || (pbs.PathShearY != 0))
727 iPropertiesNotSupportedDefault++;
728
729 if (pbs.ProfileShape == ProfileShape.Circle && pbs.PathCurve == (byte)Extrusion.Straight)
730 iPropertiesNotSupportedDefault++;
731
732 if (pbs.ProfileShape == ProfileShape.HalfCircle && pbs.PathCurve == (byte)Extrusion.Curve1 && (pbs.Scale.X != pbs.Scale.Y || pbs.Scale.Y != pbs.Scale.Z || pbs.Scale.Z != pbs.Scale.X))
733 iPropertiesNotSupportedDefault++;
734
735 if (pbs.ProfileShape == ProfileShape.HalfCircle && pbs.PathCurve == (byte) Extrusion.Curve1)
736 iPropertiesNotSupportedDefault++;
737
738 // test for torus
739 if ((pbs.ProfileCurve & 0x07) == (byte)ProfileShape.Square)
740 {
741 if (pbs.PathCurve == (byte)Extrusion.Curve1)
742 {
743 iPropertiesNotSupportedDefault++;
744 }
745 }
746 else if ((pbs.ProfileCurve & 0x07) == (byte)ProfileShape.Circle)
747 {
748 if (pbs.PathCurve == (byte)Extrusion.Straight)
749 {
750 iPropertiesNotSupportedDefault++;
751 }
752 // ProfileCurve seems to combine hole shape and profile curve so we need to only compare against the lower 3 bits
753 else if (pbs.PathCurve == (byte)Extrusion.Curve1)
754 {
755 iPropertiesNotSupportedDefault++;
756 }
757 }
758 else if ((pbs.ProfileCurve & 0x07) == (byte)ProfileShape.HalfCircle)
759 {
760 if (pbs.PathCurve == (byte)Extrusion.Curve1 || pbs.PathCurve == (byte)Extrusion.Curve2)
761 {
762 iPropertiesNotSupportedDefault++;
763 }
764 }
765 else if ((pbs.ProfileCurve & 0x07) == (byte)ProfileShape.EquilateralTriangle)
766 {
767 if (pbs.PathCurve == (byte)Extrusion.Straight)
768 {
769 iPropertiesNotSupportedDefault++;
770 }
771 else if (pbs.PathCurve == (byte)Extrusion.Curve1)
772 {
773 iPropertiesNotSupportedDefault++;
774 }
775 }
776 if (iPropertiesNotSupportedDefault == 0)
777 {
778 return false;
779 }
780 */
781 return true;
782 }
783
784 // Calls to the PhysicsActors can't directly call into the physics engine 668 // Calls to the PhysicsActors can't directly call into the physics engine
785 // because it might be busy. We delay changes to a known time. 669 // because it might be busy. We delay changes to a known time.
786 // We rely on C#'s closure to save and restore the context for the delegate. 670 // We rely on C#'s closure to save and restore the context for the delegate.