From 918f887c0c10fda33633548f3601bdf07d74edfd Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Thu, 29 May 2008 20:20:50 +0000 Subject: * Applying Dahlia's interim path curve patch. it adds initial support for some tori/ring parameters. Thanks Dahlia! * Some situations do not match the client's render of the tori, we know and are working on it. This is an initial support patch, so expect it to not be exact. * Some tapers are acting slightly odd. Will fix. --- OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'OpenSim/Region/Physics/OdePlugin') diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index e43a1ac..5078f03 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs @@ -36,6 +36,7 @@ using Nini.Config; using Ode.NET; using OpenSim.Framework; using OpenSim.Region.Physics.Manager; +using libsecondlife; //using OpenSim.Region.Physics.OdePlugin.Meshing; @@ -1512,6 +1513,8 @@ namespace OpenSim.Region.Physics.OdePlugin /// public bool needsMeshing(PrimitiveBaseShape pbs) { + //if (pbs.PathCurve == (byte)LLObject.PathCurve.Circle && pbs.ProfileCurve == (byte)LLObject.ProfileCurve.Circle && pbs.PathScaleY <= 0.75f) + //Console.WriteLine("needsMeshing: " + " pathCurve: " + pbs.PathCurve.ToString() + " profileCurve: " + pbs.ProfileCurve.ToString() + " pathScaleY: " + LLObject.UnpackPathScale(pbs.PathScaleY).ToString()); if (pbs.SculptEntry && !meshSculptedPrim) { return false; @@ -1537,6 +1540,22 @@ namespace OpenSim.Region.Physics.OdePlugin 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)) return true; + // test for torus + if (pbs.PathCurve == (byte)LLObject.PathCurve.Circle + && (pbs.ProfileCurve & 0x07) == (byte)LLObject.ProfileCurve.Circle + && LLObject.UnpackPathScale(pbs.PathScaleY) <= 0.75f) + return true; + + // test for tube + if (pbs.PathCurve == (byte)LLObject.PathCurve.Circle + && (pbs.ProfileCurve & 0x07) == (byte)LLObject.ProfileCurve.EqualTriangle) + return true; + + // test for ring + if (pbs.PathCurve == (byte)LLObject.PathCurve.Circle + && (pbs.ProfileCurve & 0x07) == (byte)LLObject.ProfileCurve.EqualTriangle) + return true; + if (pbs.ProfileShape == ProfileShape.EquilateralTriangle) return true; -- cgit v1.1