diff options
author | Teravus Ovares | 2008-02-09 05:18:52 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-02-09 05:18:52 +0000 |
commit | c9b5516ca8664786d85a6c3f48bb831476050c6e (patch) | |
tree | d3912f3f2694ee4241e389dbee33fda57bdddada /OpenSim/Region/Physics/Meshing/Extruder.cs | |
parent | * Tweaked timing of rapid mesh requests. Helps a race condition. (diff) | |
download | opensim-SC_OLD-c9b5516ca8664786d85a6c3f48bb831476050c6e.zip opensim-SC_OLD-c9b5516ca8664786d85a6c3f48bb831476050c6e.tar.gz opensim-SC_OLD-c9b5516ca8664786d85a6c3f48bb831476050c6e.tar.bz2 opensim-SC_OLD-c9b5516ca8664786d85a6c3f48bb831476050c6e.tar.xz |
* Adds Top Shear support to the Meshmerizer for the Cube prim and the Cylinder prim.
Diffstat (limited to 'OpenSim/Region/Physics/Meshing/Extruder.cs')
-rw-r--r-- | OpenSim/Region/Physics/Meshing/Extruder.cs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/Meshing/Extruder.cs b/OpenSim/Region/Physics/Meshing/Extruder.cs index 5886c9e..086261b 100644 --- a/OpenSim/Region/Physics/Meshing/Extruder.cs +++ b/OpenSim/Region/Physics/Meshing/Extruder.cs | |||
@@ -40,6 +40,8 @@ namespace OpenSim.Region.Physics.Meshing | |||
40 | public float taperTopFactorY = 1f; | 40 | public float taperTopFactorY = 1f; |
41 | public float taperBotFactorX = 1f; | 41 | public float taperBotFactorX = 1f; |
42 | public float taperBotFactorY = 1f; | 42 | public float taperBotFactorY = 1f; |
43 | public float pushX = 0f; | ||
44 | public float pushY = 0f; | ||
43 | 45 | ||
44 | public Mesh Extrude(Mesh m) | 46 | public Mesh Extrude(Mesh m) |
45 | { | 47 | { |
@@ -54,10 +56,17 @@ namespace OpenSim.Region.Physics.Meshing | |||
54 | if (v == null) | 56 | if (v == null) |
55 | continue; | 57 | continue; |
56 | 58 | ||
59 | // This is the top | ||
60 | // Set the Z + .5 to match the rest of the scale of the mesh | ||
61 | // Scale it by Size, and Taper the scaling | ||
57 | v.Z = +.5f; | 62 | v.Z = +.5f; |
58 | v.X *= (size.X * taperTopFactorX); | 63 | v.X *= (size.X * taperTopFactorX); |
59 | v.Y *= (size.Y * taperTopFactorY); | 64 | v.Y *= (size.Y * taperTopFactorY); |
60 | v.Z *= size.Z; | 65 | v.Z *= size.Z; |
66 | |||
67 | //Push the top of the object over by the Top Shear amount | ||
68 | v.X += pushX * size.X; | ||
69 | v.Y += pushY * size.X; | ||
61 | } | 70 | } |
62 | 71 | ||
63 | foreach (Vertex v in workingMinus.vertices) | 72 | foreach (Vertex v in workingMinus.vertices) |
@@ -65,6 +74,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
65 | if (v == null) | 74 | if (v == null) |
66 | continue; | 75 | continue; |
67 | 76 | ||
77 | // This is the bottom | ||
68 | v.Z = -.5f; | 78 | v.Z = -.5f; |
69 | v.X *= (size.X * taperBotFactorX); | 79 | v.X *= (size.X * taperBotFactorX); |
70 | v.Y *= (size.Y * taperBotFactorY); | 80 | v.Y *= (size.Y * taperBotFactorY); |