diff options
Diffstat (limited to 'OpenSim/Region/Physics/Meshing/Extruder.cs')
-rw-r--r-- | OpenSim/Region/Physics/Meshing/Extruder.cs | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/OpenSim/Region/Physics/Meshing/Extruder.cs b/OpenSim/Region/Physics/Meshing/Extruder.cs index 7ef5b5b..5886c9e 100644 --- a/OpenSim/Region/Physics/Meshing/Extruder.cs +++ b/OpenSim/Region/Physics/Meshing/Extruder.cs | |||
@@ -36,6 +36,11 @@ namespace OpenSim.Region.Physics.Meshing | |||
36 | public float stopParameter; | 36 | public float stopParameter; |
37 | public PhysicsVector size; | 37 | public PhysicsVector size; |
38 | 38 | ||
39 | public float taperTopFactorX = 1f; | ||
40 | public float taperTopFactorY = 1f; | ||
41 | public float taperBotFactorX = 1f; | ||
42 | public float taperBotFactorY = 1f; | ||
43 | |||
39 | public Mesh Extrude(Mesh m) | 44 | public Mesh Extrude(Mesh m) |
40 | { | 45 | { |
41 | // Currently only works for iSteps=1; | 46 | // Currently only works for iSteps=1; |
@@ -50,8 +55,8 @@ namespace OpenSim.Region.Physics.Meshing | |||
50 | continue; | 55 | continue; |
51 | 56 | ||
52 | v.Z = +.5f; | 57 | v.Z = +.5f; |
53 | v.X *= size.X; | 58 | v.X *= (size.X * taperTopFactorX); |
54 | v.Y *= size.Y; | 59 | v.Y *= (size.Y * taperTopFactorY); |
55 | v.Z *= size.Z; | 60 | v.Z *= size.Z; |
56 | } | 61 | } |
57 | 62 | ||
@@ -61,8 +66,8 @@ namespace OpenSim.Region.Physics.Meshing | |||
61 | continue; | 66 | continue; |
62 | 67 | ||
63 | v.Z = -.5f; | 68 | v.Z = -.5f; |
64 | v.X *= size.X; | 69 | v.X *= (size.X * taperBotFactorX); |
65 | v.Y *= size.Y; | 70 | v.Y *= (size.Y * taperBotFactorY); |
66 | v.Z *= size.Z; | 71 | v.Z *= size.Z; |
67 | } | 72 | } |
68 | 73 | ||