From fa5fef33a9fd754e62f1d61b1be6cf61b58a03ef Mon Sep 17 00:00:00 2001 From: Dahlia Trimble Date: Sun, 15 Mar 2009 09:05:35 +0000 Subject: fixed propagation of normalized sculpt mesh vertex normals --- OpenSim/Region/Physics/Meshing/SculptMesh.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Physics/Meshing/SculptMesh.cs') diff --git a/OpenSim/Region/Physics/Meshing/SculptMesh.cs b/OpenSim/Region/Physics/Meshing/SculptMesh.cs index 06584b2..534dd4d 100644 --- a/OpenSim/Region/Physics/Meshing/SculptMesh.cs +++ b/OpenSim/Region/Physics/Meshing/SculptMesh.cs @@ -369,9 +369,9 @@ namespace PrimMesher this.normals[face.v3] += surfaceNormal; } - int numCoords = this.coords.Count; - for (int i = 0; i < numCoords; i++) - this.coords[i].Normalize(); + int numNormals = this.normals.Count; + for (int i = 0; i < numNormals; i++) + this.normals[i] = this.normals[i].Normalize(); if (sculptType != SculptType.plane) { // blend the vertex normals at the cylinder seam -- cgit v1.1