diff options
author | Dahlia Trimble | 2008-06-30 06:08:43 +0000 |
---|---|---|
committer | Dahlia Trimble | 2008-06-30 06:08:43 +0000 |
commit | 7077cffe52122cfeed60ba90dc3c826aca1ea154 (patch) | |
tree | c0b541727b825027a987707c72f248bc1a0f1ff8 /OpenSim | |
parent | Corrects meshmerizer profile cut angle orientation for tube type prims (diff) | |
download | opensim-SC_OLD-7077cffe52122cfeed60ba90dc3c826aca1ea154.zip opensim-SC_OLD-7077cffe52122cfeed60ba90dc3c826aca1ea154.tar.gz opensim-SC_OLD-7077cffe52122cfeed60ba90dc3c826aca1ea154.tar.bz2 opensim-SC_OLD-7077cffe52122cfeed60ba90dc3c826aca1ea154.tar.xz |
Corrects Meshmerizer orientation of profile cut angles for ring type prim
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Physics/Meshing/Meshmerizer.cs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs index b770d68..005d5ca 100644 --- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs +++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs | |||
@@ -24,7 +24,7 @@ | |||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | */ | 26 | */ |
27 | //#define SPAM | 27 | #define SPAM |
28 | 28 | ||
29 | using System; | 29 | using System; |
30 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
@@ -1581,12 +1581,19 @@ namespace OpenSim.Region.Physics.Meshing | |||
1581 | #endif | 1581 | #endif |
1582 | } | 1582 | } |
1583 | else if ((primShape.ProfileCurve & 0x07) == (byte)ProfileShape.Square) | 1583 | else if ((primShape.ProfileCurve & 0x07) == (byte)ProfileShape.Square) |
1584 | { // tube cut is offset 45 degrees from other prim types | 1584 | { // tube profile cut is offset 45 degrees from other prim types |
1585 | fProfileBeginAngle += 45.0f; | 1585 | fProfileBeginAngle += 45.0f; |
1586 | fProfileEndAngle += 45.0f; | 1586 | fProfileEndAngle += 45.0f; |
1587 | if (fProfileBeginAngle < fProfileEndAngle) | 1587 | if (fProfileBeginAngle < fProfileEndAngle) |
1588 | fProfileEndAngle -= 360.0; | 1588 | fProfileEndAngle -= 360.0; |
1589 | } | 1589 | } |
1590 | else if ((primShape.ProfileCurve & 0x07) == (byte)ProfileShape.EquilateralTriangle) | ||
1591 | { // ring profile cut is offset 180 degrees from other prim types | ||
1592 | fProfileBeginAngle += 180.0f; | ||
1593 | fProfileEndAngle += 180.0f; | ||
1594 | if (fProfileBeginAngle < fProfileEndAngle) | ||
1595 | fProfileEndAngle -= 360.0; | ||
1596 | } | ||
1590 | 1597 | ||
1591 | // Note, that we don't want to cut out a triangle, even if this is a | 1598 | // Note, that we don't want to cut out a triangle, even if this is a |
1592 | // good approximation for small cuts. Indeed we want to cut out an arc | 1599 | // good approximation for small cuts. Indeed we want to cut out an arc |