aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/Meshing/SculptMesh.cs
diff options
context:
space:
mode:
authorMelanie2009-10-12 15:25:42 +0100
committerMelanie2009-10-12 15:25:42 +0100
commit170d2c4660028570902ffe67e162d88f37957580 (patch)
tree2fdcd9f8534f397d54d592b06893b4fb6784b350 /OpenSim/Region/Physics/Meshing/SculptMesh.cs
parentMerge branch 'master' into htb-throttle (diff)
parentOptimize ODE mesh by removing sleep. On a region with 100,000 prims and ODE e... (diff)
downloadopensim-SC_OLD-170d2c4660028570902ffe67e162d88f37957580.zip
opensim-SC_OLD-170d2c4660028570902ffe67e162d88f37957580.tar.gz
opensim-SC_OLD-170d2c4660028570902ffe67e162d88f37957580.tar.bz2
opensim-SC_OLD-170d2c4660028570902ffe67e162d88f37957580.tar.xz
Merge branch 'master' into htb-throttle
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;