aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Physics/Meshing/Meshmerizer.cs24
1 files changed, 21 insertions, 3 deletions
diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
index db91028..9c6dff4 100644
--- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
+++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs
@@ -331,11 +331,29 @@ namespace OpenSim.Region.Physics.Meshing
331 if (hshape == HollowShape.Triangle) 331 if (hshape == HollowShape.Triangle)
332 { 332 {
333 float hollowFactorF = (float)fhollowFactor / (float)50000; 333 float hollowFactorF = (float)fhollowFactor / (float)50000;
334 Vertex IMM = new Vertex(-0.25f * hollowFactorF, -0.45f * hollowFactorF, 0.0f); 334 Vertex IMM;
335 Vertex IPM = new Vertex(+0.5f * hollowFactorF, +0f * hollowFactorF, 0.0f); 335 Vertex IPM;
336 Vertex IPP = new Vertex(-0.25f * hollowFactorF, +0.45f * hollowFactorF, 0.0f); 336 Vertex IPP;
337 337
338 if (pshape == ProfileShape.Square)
339 {
340 // corner points are at 345, 105, and 225 degrees for the triangle within a box
341
342 //IMM = new Vertex(((float)Math.Cos(345.0 * DEG_TO_RAD) * 0.5f) * hollowFactorF, ((float)Math.Sin(345.0 * DEG_TO_RAD) * 0.5f) * hollowFactorF, 0.0f);
343 //IPM = new Vertex(((float)Math.Cos(105.0 * DEG_TO_RAD) * 0.5f) * hollowFactorF, ((float)Math.Sin(105.0 * DEG_TO_RAD) * 0.5f) * hollowFactorF, 0.0f);
344 //IPP = new Vertex(((float)Math.Cos(225.0 * DEG_TO_RAD) * 0.5f) * hollowFactorF, ((float)Math.Sin(225.0 * DEG_TO_RAD) * 0.5f) * hollowFactorF, 0.0f);
338 345
346 // hard coded here for speed, the equations are in the commented out lines above
347 IMM = new Vertex(0.48296f * hollowFactorF, -0.12941f * hollowFactorF, 0.0f);
348 IPM = new Vertex(-0.12941f * hollowFactorF, 0.48296f * hollowFactorF, 0.0f);
349 IPP = new Vertex(-0.35355f * hollowFactorF, -0.35355f * hollowFactorF, 0.0f);
350 }
351 else
352 {
353 IMM = new Vertex(-0.25f * hollowFactorF, -0.45f * hollowFactorF, 0.0f);
354 IPM = new Vertex(+0.5f * hollowFactorF, +0f * hollowFactorF, 0.0f);
355 IPP = new Vertex(-0.25f * hollowFactorF, +0.45f * hollowFactorF, 0.0f);
356 }
339 357
340 holeHull = new SimpleHull(); 358 holeHull = new SimpleHull();
341 359