From 7077cffe52122cfeed60ba90dc3c826aca1ea154 Mon Sep 17 00:00:00 2001 From: Dahlia Trimble Date: Mon, 30 Jun 2008 06:08:43 +0000 Subject: [PATCH] Corrects Meshmerizer orientation of profile cut angles for ring type prim --- OpenSim/Region/Physics/Meshing/Meshmerizer.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs index b770d68fff..005d5ca2e3 100644 --- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs +++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs @@ -24,7 +24,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -//#define SPAM +#define SPAM using System; using System.Collections.Generic; @@ -1581,12 +1581,19 @@ namespace OpenSim.Region.Physics.Meshing #endif } else if ((primShape.ProfileCurve & 0x07) == (byte)ProfileShape.Square) - { // tube cut is offset 45 degrees from other prim types + { // tube profile cut is offset 45 degrees from other prim types fProfileBeginAngle += 45.0f; fProfileEndAngle += 45.0f; if (fProfileBeginAngle < fProfileEndAngle) fProfileEndAngle -= 360.0; } + else if ((primShape.ProfileCurve & 0x07) == (byte)ProfileShape.EquilateralTriangle) + { // ring profile cut is offset 180 degrees from other prim types + fProfileBeginAngle += 180.0f; + fProfileEndAngle += 180.0f; + if (fProfileBeginAngle < fProfileEndAngle) + fProfileEndAngle -= 360.0; + } // Note, that we don't want to cut out a triangle, even if this is a // good approximation for small cuts. Indeed we want to cut out an arc