Corrects Meshmerizer orientation of profile cut angles for ring type prim

0.6.0-stable
Dahlia Trimble 2008-06-30 06:08:43 +00:00
parent a944ef4947
commit 7077cffe52
1 changed files with 9 additions and 2 deletions

View File

@ -24,7 +24,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
//#define SPAM #define SPAM
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
@ -1581,12 +1581,19 @@ namespace OpenSim.Region.Physics.Meshing
#endif #endif
} }
else if ((primShape.ProfileCurve & 0x07) == (byte)ProfileShape.Square) 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; fProfileBeginAngle += 45.0f;
fProfileEndAngle += 45.0f; fProfileEndAngle += 45.0f;
if (fProfileBeginAngle < fProfileEndAngle) if (fProfileBeginAngle < fProfileEndAngle)
fProfileEndAngle -= 360.0; 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 // 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 // good approximation for small cuts. Indeed we want to cut out an arc