aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs
diff options
context:
space:
mode:
authorUbitUmarov2012-05-28 14:32:16 +0100
committerUbitUmarov2012-05-28 14:32:16 +0100
commit60cebe9a5b91f2683019d645f6bb243a9f7db139 (patch)
tree23f2abd2ab7000cab48264fb138519d1a238fc4f /OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs
parentMerge branch 'avination' into ubitwork (diff)
downloadopensim-SC-60cebe9a5b91f2683019d645f6bb243a9f7db139.zip
opensim-SC-60cebe9a5b91f2683019d645f6bb243a9f7db139.tar.gz
opensim-SC-60cebe9a5b91f2683019d645f6bb243a9f7db139.tar.bz2
opensim-SC-60cebe9a5b91f2683019d645f6bb243a9f7db139.tar.xz
let meshs work indenpendently of mesh_sculpted_prim config option
Diffstat (limited to 'OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs')
-rw-r--r--OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs54
1 files changed, 25 insertions, 29 deletions
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs b/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs
index d5968fc..b0bc18b 100644
--- a/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs
+++ b/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs
@@ -1675,41 +1675,43 @@ namespace OpenSim.Region.Physics.OdePlugin
1675 /// <returns></returns> 1675 /// <returns></returns>
1676 public bool needsMeshing(PrimitiveBaseShape pbs) 1676 public bool needsMeshing(PrimitiveBaseShape pbs)
1677 { 1677 {
1678 // most of this is redundant now as the mesher will return null if it cant mesh a prim
1679 // but we still need to check for sculptie meshing being enabled so this is the most
1680 // convenient place to do it for now...
1681
1682 // //if (pbs.PathCurve == (byte)Primitive.PathCurve.Circle && pbs.ProfileCurve == (byte)Primitive.ProfileCurve.Circle && pbs.PathScaleY <= 0.75f)
1683 // //m_log.Debug("needsMeshing: " + " pathCurve: " + pbs.PathCurve.ToString() + " profileCurve: " + pbs.ProfileCurve.ToString() + " pathScaleY: " + Primitive.UnpackPathScale(pbs.PathScaleY).ToString());
1684 int iPropertiesNotSupportedDefault = 0;
1685 1678
1679 // check sculpts or meshs
1686 if (pbs.SculptEntry) 1680 if (pbs.SculptEntry)
1687 { 1681 {
1688 if(!meshSculptedPrim) 1682 if (pbs.SculptType == (byte)SculptType.Mesh) // always do meshs
1683 return true;
1684
1685 if (!meshSculptedPrim)
1689 return false; 1686 return false;
1687 else
1688 return true;
1690 } 1689 }
1691 1690
1691 int iPropertiesNotSupportedDefault = 0;
1692
1693 if (forceSimplePrimMeshing)
1694 return true;
1695
1692 // if it's a standard box or sphere with no cuts, hollows, twist or top shear, return false since ODE can use an internal representation for the prim 1696 // if it's a standard box or sphere with no cuts, hollows, twist or top shear, return false since ODE can use an internal representation for the prim
1693 if (!forceSimplePrimMeshing && !pbs.SculptEntry) 1697
1694 { 1698 if ((pbs.ProfileShape == ProfileShape.Square && pbs.PathCurve == (byte)Extrusion.Straight)
1695 if ((pbs.ProfileShape == ProfileShape.Square && pbs.PathCurve == (byte)Extrusion.Straight)
1696 || (pbs.ProfileShape == ProfileShape.HalfCircle && pbs.PathCurve == (byte)Extrusion.Curve1 1699 || (pbs.ProfileShape == ProfileShape.HalfCircle && pbs.PathCurve == (byte)Extrusion.Curve1
1697 && pbs.Scale.X == pbs.Scale.Y && pbs.Scale.Y == pbs.Scale.Z)) 1700 && pbs.Scale.X == pbs.Scale.Y && pbs.Scale.Y == pbs.Scale.Z))
1698 { 1701 {
1699 1702
1700 if (pbs.ProfileBegin == 0 && pbs.ProfileEnd == 0 1703 if (pbs.ProfileBegin == 0 && pbs.ProfileEnd == 0
1701 && pbs.ProfileHollow == 0 1704 && pbs.ProfileHollow == 0
1702 && pbs.PathTwist == 0 && pbs.PathTwistBegin == 0 1705 && pbs.PathTwist == 0 && pbs.PathTwistBegin == 0
1703 && pbs.PathBegin == 0 && pbs.PathEnd == 0 1706 && pbs.PathBegin == 0 && pbs.PathEnd == 0
1704 && pbs.PathTaperX == 0 && pbs.PathTaperY == 0 1707 && pbs.PathTaperX == 0 && pbs.PathTaperY == 0
1705 && pbs.PathScaleX == 100 && pbs.PathScaleY == 100 1708 && pbs.PathScaleX == 100 && pbs.PathScaleY == 100
1706 && pbs.PathShearX == 0 && pbs.PathShearY == 0) 1709 && pbs.PathShearX == 0 && pbs.PathShearY == 0)
1707 { 1710 {
1708#if SPAM 1711#if SPAM
1709 m_log.Warn("NonMesh"); 1712 m_log.Warn("NonMesh");
1710#endif 1713#endif
1711 return false; 1714 return false;
1712 }
1713 } 1715 }
1714 } 1716 }
1715 1717
@@ -1717,9 +1719,6 @@ namespace OpenSim.Region.Physics.OdePlugin
1717 // and it's odd.. so for now just return true if asked to force meshs 1719 // and it's odd.. so for now just return true if asked to force meshs
1718 // hopefully mesher will fail if doesn't suport so things still get basic boxes 1720 // hopefully mesher will fail if doesn't suport so things still get basic boxes
1719 1721
1720 if (forceSimplePrimMeshing)
1721 return true;
1722
1723 if (pbs.ProfileHollow != 0) 1722 if (pbs.ProfileHollow != 0)
1724 iPropertiesNotSupportedDefault++; 1723 iPropertiesNotSupportedDefault++;
1725 1724
@@ -1787,9 +1786,6 @@ namespace OpenSim.Region.Physics.OdePlugin
1787 } 1786 }
1788 } 1787 }
1789 1788
1790 if (pbs.SculptEntry && meshSculptedPrim)
1791 iPropertiesNotSupportedDefault++;
1792
1793 if (iPropertiesNotSupportedDefault == 0) 1789 if (iPropertiesNotSupportedDefault == 0)
1794 { 1790 {
1795#if SPAM 1791#if SPAM