From 3bedb59f50cf53d5b696a0ec7f99f5c4f20fd6fd Mon Sep 17 00:00:00 2001 From: Dahlia Trimble Date: Thu, 26 Mar 2009 03:10:30 +0000 Subject: make some arrays static to prevent excessive re-initialization - suggested by jhurliman --- OpenSim/Region/Physics/Meshing/PrimMesher.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Physics/Meshing/PrimMesher.cs b/OpenSim/Region/Physics/Meshing/PrimMesher.cs index 962041b..9e43994 100644 --- a/OpenSim/Region/Physics/Meshing/PrimMesher.cs +++ b/OpenSim/Region/Physics/Meshing/PrimMesher.cs @@ -384,7 +384,7 @@ namespace PrimMesher { private float iX, iY; // intersection point - private Angle[] angles3 = + private static Angle[] angles3 = { new Angle(0.0f, 1.0f, 0.0f), new Angle(0.33333333333333333f, -0.5f, 0.86602540378443871f), @@ -392,7 +392,7 @@ namespace PrimMesher new Angle(1.0f, 1.0f, 0.0f) }; - private Coord[] normals3 = + private static Coord[] normals3 = { new Coord(0.25f, 0.4330127019f, 0.0f).Normalize(), new Coord(-0.5f, 0.0f, 0.0f).Normalize(), @@ -400,7 +400,7 @@ namespace PrimMesher new Coord(0.25f, 0.4330127019f, 0.0f).Normalize() }; - private Angle[] angles4 = + private static Angle[] angles4 = { new Angle(0.0f, 1.0f, 0.0f), new Angle(0.25f, 0.0f, 1.0f), @@ -409,7 +409,7 @@ namespace PrimMesher new Angle(1.0f, 1.0f, 0.0f) }; - private Coord[] normals4 = + private static Coord[] normals4 = { new Coord(0.5f, 0.5f, 0.0f).Normalize(), new Coord(-0.5f, 0.5f, 0.0f).Normalize(), @@ -418,7 +418,7 @@ namespace PrimMesher new Coord(0.5f, 0.5f, 0.0f).Normalize() }; - private Angle[] angles24 = + private static Angle[] angles24 = { new Angle(0.0f, 1.0f, 0.0f), new Angle(0.041666666666666664f, 0.96592582628906831f, 0.25881904510252074f), -- cgit v1.1