aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/Meshing/SculptMesh.cs
diff options
context:
space:
mode:
authordahlia2009-10-11 02:12:17 -0700
committerdahlia2009-10-11 02:12:17 -0700
commit7b4183d7a05079be975c954584ad6215e573755a (patch)
tree04576efc69a20ba6edb290e842795707e7afe2fa /OpenSim/Region/Physics/Meshing/SculptMesh.cs
parentdisambiguate System.Path (preparation for new PrimMesher) (diff)
downloadopensim-SC-7b4183d7a05079be975c954584ad6215e573755a.zip
opensim-SC-7b4183d7a05079be975c954584ad6215e573755a.tar.gz
opensim-SC-7b4183d7a05079be975c954584ad6215e573755a.tar.bz2
opensim-SC-7b4183d7a05079be975c954584ad6215e573755a.tar.xz
sync PrimMesher with r46
Diffstat (limited to 'OpenSim/Region/Physics/Meshing/SculptMesh.cs')
-rw-r--r--OpenSim/Region/Physics/Meshing/SculptMesh.cs14
1 files changed, 11 insertions, 3 deletions
diff --git a/OpenSim/Region/Physics/Meshing/SculptMesh.cs b/OpenSim/Region/Physics/Meshing/SculptMesh.cs
index bd63aef..f1dd586 100644
--- a/OpenSim/Region/Physics/Meshing/SculptMesh.cs
+++ b/OpenSim/Region/Physics/Meshing/SculptMesh.cs
@@ -436,9 +436,9 @@ namespace PrimMesher
436 { 436 {
437 Face face = this.faces[i]; 437 Face face = this.faces[i];
438 Coord surfaceNormal = face.SurfaceNormal(this.coords); 438 Coord surfaceNormal = face.SurfaceNormal(this.coords);
439 this.normals[face.v1] += surfaceNormal; 439 this.normals[face.n1] += surfaceNormal;
440 this.normals[face.v2] += surfaceNormal; 440 this.normals[face.n2] += surfaceNormal;
441 this.normals[face.v3] += surfaceNormal; 441 this.normals[face.n3] += surfaceNormal;
442 } 442 }
443 443
444 int numNormals = this.normals.Count; 444 int numNormals = this.normals.Count;
@@ -462,6 +462,10 @@ namespace PrimMesher
462 vf.v2 = this.coords[face.v2]; 462 vf.v2 = this.coords[face.v2];
463 vf.v3 = this.coords[face.v3]; 463 vf.v3 = this.coords[face.v3];
464 464
465 vf.coordIndex1 = face.v1;
466 vf.coordIndex2 = face.v2;
467 vf.coordIndex3 = face.v3;
468
465 vf.n1 = this.normals[face.n1]; 469 vf.n1 = this.normals[face.n1];
466 vf.n2 = this.normals[face.n2]; 470 vf.n2 = this.normals[face.n2];
467 vf.n3 = this.normals[face.n3]; 471 vf.n3 = this.normals[face.n3];
@@ -520,6 +524,10 @@ namespace PrimMesher
520 for (i = 0; i < numVerts; i++) 524 for (i = 0; i < numVerts; i++)
521 this.coords[i] *= q; 525 this.coords[i] *= q;
522 526
527 int numNormals = this.normals.Count;
528 for (i = 0; i < numNormals; i++)
529 this.normals[i] *= q;
530
523 if (this.viewerFaces != null) 531 if (this.viewerFaces != null)
524 { 532 {
525 int numViewerFaces = this.viewerFaces.Count; 533 int numViewerFaces = this.viewerFaces.Count;