diff options
Diffstat (limited to 'OpenSim/Region/Physics/Meshing/Mesh.cs')
-rw-r--r-- | OpenSim/Region/Physics/Meshing/Mesh.cs | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/OpenSim/Region/Physics/Meshing/Mesh.cs b/OpenSim/Region/Physics/Meshing/Mesh.cs index 4630d98..16ac453 100644 --- a/OpenSim/Region/Physics/Meshing/Mesh.cs +++ b/OpenSim/Region/Physics/Meshing/Mesh.cs | |||
@@ -179,13 +179,14 @@ namespace OpenSim.Region.Physics.Meshing | |||
179 | for (int i = 0; i < count; i++) | 179 | for (int i = 0; i < count; i++) |
180 | { | 180 | { |
181 | Coord c = primMesh.coords[i]; | 181 | Coord c = primMesh.coords[i]; |
182 | int resultIndex = 3 * i; | 182 | { |
183 | result[resultIndex++] = c.X; | 183 | int resultIndex = 3 * i; |
184 | result[resultIndex++] = c.Y; | 184 | result[resultIndex] = c.X; |
185 | result[resultIndex] = c.Z; | 185 | result[resultIndex + 1] = c.Y; |
186 | result[resultIndex + 2] = c.Z; | ||
187 | } | ||
186 | 188 | ||
187 | } | 189 | } |
188 | //primMesh.coords = null; | ||
189 | pinnedVirtexes = GCHandle.Alloc(result, GCHandleType.Pinned); | 190 | pinnedVirtexes = GCHandle.Alloc(result, GCHandleType.Pinned); |
190 | } | 191 | } |
191 | return result; | 192 | return result; |
@@ -213,12 +214,15 @@ namespace OpenSim.Region.Physics.Meshing | |||
213 | for (int i = 0; i < numFaces; i++) | 214 | for (int i = 0; i < numFaces; i++) |
214 | { | 215 | { |
215 | Face f = primMesh.faces[i]; | 216 | Face f = primMesh.faces[i]; |
217 | Coord c1 = primMesh.coords[f.v1]; | ||
218 | Coord c2 = primMesh.coords[f.v2]; | ||
219 | Coord c3 = primMesh.coords[f.v3]; | ||
220 | |||
216 | int resultIndex = i * 3; | 221 | int resultIndex = i * 3; |
217 | result[resultIndex++] = f.v1; | 222 | result[resultIndex] = f.v1; |
218 | result[resultIndex++] = f.v2; | 223 | result[resultIndex + 1] = f.v2; |
219 | result[resultIndex] = f.v3; | 224 | result[resultIndex + 2] = f.v3; |
220 | } | 225 | } |
221 | //primMesh.faces = null; | ||
222 | } | 226 | } |
223 | return result; | 227 | return result; |
224 | } | 228 | } |