aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorDahlia Trimble2008-08-28 06:41:32 +0000
committerDahlia Trimble2008-08-28 06:41:32 +0000
commit49f9bd8b68243c7824c8e70de38a62bd856e468d (patch)
tree3ac9b142d31a85405787df0fb3bc58701716aeb6 /OpenSim
parentThank you, A_Biondi, for patch to porperly apply the new item name (diff)
downloadopensim-SC_OLD-49f9bd8b68243c7824c8e70de38a62bd856e468d.zip
opensim-SC_OLD-49f9bd8b68243c7824c8e70de38a62bd856e468d.tar.gz
opensim-SC_OLD-49f9bd8b68243c7824c8e70de38a62bd856e468d.tar.bz2
opensim-SC_OLD-49f9bd8b68243c7824c8e70de38a62bd856e468d.tar.xz
Added some exceptions for bad profile cut parameters
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Physics/Meshing/PrimMesher.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/Meshing/PrimMesher.cs b/OpenSim/Region/Physics/Meshing/PrimMesher.cs
index 1e4efcb..53cc443 100644
--- a/OpenSim/Region/Physics/Meshing/PrimMesher.cs
+++ b/OpenSim/Region/Physics/Meshing/PrimMesher.cs
@@ -105,6 +105,12 @@ namespace OpenSim.Region.Physics.Meshing
105 { 105 {
106 angles = new List<Angle>(); 106 angles = new List<Angle>();
107 double twoPi = System.Math.PI * 2.0; 107 double twoPi = System.Math.PI * 2.0;
108
109 if (sides < 1)
110 throw new Exception("number of sides not greater than zero");
111 if (stopAngle <= startAngle)
112 throw new Exception("stopAngle not greater than startAngle");
113
108 double stepSize = twoPi / sides; 114 double stepSize = twoPi / sides;
109 115
110 int startStep = (int) (startAngle / stepSize); 116 int startStep = (int) (startAngle / stepSize);