diff options
author | lbsa71 | 2007-12-27 21:41:48 +0000 |
---|---|---|
committer | lbsa71 | 2007-12-27 21:41:48 +0000 |
commit | efd90b56b761219af6425b1c7a2cdd3b6ffb4de2 (patch) | |
tree | bf5b897e1e3c13211e3e2fc61d30508b94c928c0 /OpenSim/Region/Physics/Meshing/Extruder.cs | |
parent | * removed always true if (diff) | |
download | opensim-SC-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.zip opensim-SC-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.tar.gz opensim-SC-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.tar.bz2 opensim-SC-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.tar.xz |
* Optimized usings
* shortened references
* Removed redundant 'this'
* Normalized EOF
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Physics/Meshing/Extruder.cs | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/OpenSim/Region/Physics/Meshing/Extruder.cs b/OpenSim/Region/Physics/Meshing/Extruder.cs index eecac5a..7ef5b5b 100644 --- a/OpenSim/Region/Physics/Meshing/Extruder.cs +++ b/OpenSim/Region/Physics/Meshing/Extruder.cs | |||
@@ -26,24 +26,22 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | using System; | 29 | using OpenSim.Region.Physics.Manager; |
30 | using System.Collections.Generic; | ||
31 | using System.Text; | ||
32 | 30 | ||
33 | namespace OpenSim.Region.Physics.Meshing | 31 | namespace OpenSim.Region.Physics.Meshing |
34 | { | 32 | { |
35 | class Extruder | 33 | internal class Extruder |
36 | { | 34 | { |
37 | public float startParameter; | 35 | public float startParameter; |
38 | public float stopParameter; | 36 | public float stopParameter; |
39 | public Manager.PhysicsVector size; | 37 | public PhysicsVector size; |
40 | 38 | ||
41 | public Mesh Extrude(Mesh m) | 39 | public Mesh Extrude(Mesh m) |
42 | { | 40 | { |
43 | // Currently only works for iSteps=1; | 41 | // Currently only works for iSteps=1; |
44 | Mesh result = new Mesh(); | 42 | Mesh result = new Mesh(); |
45 | 43 | ||
46 | Mesh workingPlus = m.Clone(); | 44 | Mesh workingPlus = m.Clone(); |
47 | Mesh workingMinus = m.Clone(); | 45 | Mesh workingMinus = m.Clone(); |
48 | 46 | ||
49 | foreach (Vertex v in workingPlus.vertices) | 47 | foreach (Vertex v in workingPlus.vertices) |
@@ -80,14 +78,14 @@ namespace OpenSim.Region.Physics.Meshing | |||
80 | for (int i = 0; i < workingPlus.vertices.Count; i++) | 78 | for (int i = 0; i < workingPlus.vertices.Count; i++) |
81 | { | 79 | { |
82 | int iNext = (i + 1); | 80 | int iNext = (i + 1); |
83 | 81 | ||
84 | if (workingPlus.vertices[i] == null) // Can't make a simplex here | 82 | if (workingPlus.vertices[i] == null) // Can't make a simplex here |
85 | { | 83 | { |
86 | iLastNull = i+1; | 84 | iLastNull = i + 1; |
87 | continue; | 85 | continue; |
88 | } | 86 | } |
89 | 87 | ||
90 | if (i == workingPlus.vertices.Count-1) // End of list | 88 | if (i == workingPlus.vertices.Count - 1) // End of list |
91 | { | 89 | { |
92 | iNext = iLastNull; | 90 | iNext = iLastNull; |
93 | } | 91 | } |
@@ -101,11 +99,12 @@ namespace OpenSim.Region.Physics.Meshing | |||
101 | tSide = new Triangle(workingPlus.vertices[i], workingMinus.vertices[i], workingPlus.vertices[iNext]); | 99 | tSide = new Triangle(workingPlus.vertices[i], workingMinus.vertices[i], workingPlus.vertices[iNext]); |
102 | result.Add(tSide); | 100 | result.Add(tSide); |
103 | 101 | ||
104 | tSide = new Triangle(workingPlus.vertices[iNext], workingMinus.vertices[i], workingMinus.vertices[iNext]); | 102 | tSide = |
103 | new Triangle(workingPlus.vertices[iNext], workingMinus.vertices[i], workingMinus.vertices[iNext]); | ||
105 | result.Add(tSide); | 104 | result.Add(tSide); |
106 | } | 105 | } |
107 | 106 | ||
108 | return result; | 107 | return result; |
109 | } | 108 | } |
110 | } | 109 | } |
111 | } | 110 | } \ No newline at end of file |