diff options
author | Teravus Ovares | 2008-05-09 02:00:55 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-05-09 02:00:55 +0000 |
commit | 6bb4ab0563af81a680192f2ee1c0c4f81aabcdfb (patch) | |
tree | ddd2c24bfbb0f4321da741eeac31adf682526731 /OpenSim/Region | |
parent | * Wrote a method to get the OpenJpeg data of a sculpt texture asset and save ... (diff) | |
download | opensim-SC-6bb4ab0563af81a680192f2ee1c0c4f81aabcdfb.zip opensim-SC-6bb4ab0563af81a680192f2ee1c0c4f81aabcdfb.tar.gz opensim-SC-6bb4ab0563af81a680192f2ee1c0c4f81aabcdfb.tar.bz2 opensim-SC-6bb4ab0563af81a680192f2ee1c0c4f81aabcdfb.tar.xz |
* Applying Dahlia's Triangular hole in a cube peg patch. Fixes the hollow orientation in a cube in the meshmerizer. Thanks Dahlia!
* See mantis 0001203 for more details!
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Physics/Meshing/Meshmerizer.cs | 24 |
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 | ||