Update svn properties. Formatting cleanup.

This commit is contained in:
Jeff Ames
2008-05-30 08:35:57 +00:00
parent 5b0d47dddb
commit 0462510956
21 changed files with 403 additions and 449 deletions

View File

@@ -62,7 +62,6 @@ namespace OpenSim.Region.Physics.Meshing
public float pathTaperX = 0.0f;
public float pathTaperY = 0.0f;
public Mesh Extrude(Mesh m)
{
startParameter = float.MinValue;
@@ -129,8 +128,8 @@ namespace OpenSim.Region.Physics.Meshing
v.Y = v2.Y;
v.Z = v2.Z;
}
}
foreach (Vertex v in workingMinus.vertices)
{
if (v == null)
@@ -159,10 +158,8 @@ namespace OpenSim.Region.Physics.Meshing
}
result.Append(workingMinus);
result.Append(workingMiddle);
int iLastNull = 0;
for (int i = 0; i < workingMiddle.vertices.Count; i++)
@@ -228,6 +225,7 @@ namespace OpenSim.Region.Physics.Meshing
new Triangle(workingPlus.vertices[iNext], workingMiddle.vertices[i], workingMiddle.vertices[iNext]);
result.Add(tSide);
}
if (twistMid != 0)
{
foreach (Vertex v in result.vertices)
@@ -245,6 +243,7 @@ namespace OpenSim.Region.Physics.Meshing
}
return result;
}
public Mesh ExtrudeCircularPath(Mesh m)
{
//startParameter = float.MinValue;
@@ -294,8 +293,6 @@ namespace OpenSim.Region.Physics.Meshing
//System.Console.WriteLine("taperBotFactorX: " + taperBotFactorX.ToString() + " taperBotFactorY: " + taperBotFactorY.ToString()
// + " taperTopFactorX: " + taperTopFactorX.ToString() + " taperTopFactorY: " + taperTopFactorY.ToString());
do
{
float percentOfPath = 1.0f;
@@ -328,10 +325,6 @@ namespace OpenSim.Region.Physics.Meshing
//System.Console.WriteLine("Extruder: radius: " + radius.ToString() + " radiusScale: " + radiusScale.ToString());
float twist = twistBot + (twistTotal * (float)percentOfPath);
float zOffset = (float)(System.Math.Sin(angle) * (0.5f - yPathScale)) * radiusScale;
@@ -404,13 +397,6 @@ namespace OpenSim.Region.Physics.Meshing
}
lastLayer = newLayer;
// calc next angle
if (angle >= endAngle)
@@ -421,10 +407,7 @@ namespace OpenSim.Region.Physics.Meshing
if (angle > endAngle)
angle = endAngle;
}
}
while (!done);
} while (!done);
// scale the mesh to the desired size
float xScale = size.X;
@@ -432,12 +415,14 @@ namespace OpenSim.Region.Physics.Meshing
float zScale = size.Z;
foreach (Vertex v in result.vertices)
{
if (v != null)
{
v.X *= xScale;
v.Y *= yScale;
v.Z *= zScale;
}
}
return result;
}

View File

@@ -255,7 +255,7 @@ namespace OpenSim.Region.Physics.Meshing
holeHull.AddVertex(IPM);
}
//if (hshape == HollowShape.Circle && pbs.PathCurve == (byte)Extrusion.Straight)
if ( hshape == HollowShape.Circle )
if (hshape == HollowShape.Circle)
{
float hollowFactorF = (float)fhollowFactor / (float)50000;
@@ -1346,7 +1346,7 @@ namespace OpenSim.Region.Physics.Meshing
// || (primShape.ProfileCurve & 0x07) == (byte) ProfileShape.Square)
{
//Console.WriteLine("Meshmerizer thinks " + primName + " is a TORUS");
if ( hollowShape == HollowShape.Same )
if (hollowShape == HollowShape.Same)
hollowShape = HollowShape.Circle;
// build the profile shape
@@ -1381,7 +1381,7 @@ namespace OpenSim.Region.Physics.Meshing
else if ((primShape.ProfileCurve & 0x07) == (byte)ProfileShape.Square) // a ring
{
//Console.WriteLine("Meshmerizer thinks " + primName + " is a TUBE");
if ( hollowShape == HollowShape.Same )
if (hollowShape == HollowShape.Same)
hollowShape = HollowShape.Square;
outerHull.AddVertex(new Vertex(+0.5f, +0.5f, 0.0f));
@@ -1393,7 +1393,7 @@ namespace OpenSim.Region.Physics.Meshing
else if ((primShape.ProfileCurve & 0x07) == (byte)ProfileShape.EquilateralTriangle)
{
//Console.WriteLine("Meshmerizer thinks " + primName + " is a RING");
if ( hollowShape == HollowShape.Same )
if (hollowShape == HollowShape.Same)
hollowShape = HollowShape.Triangle;
outerHull.AddVertex(new Vertex(+0.255f, -0.375f, 0.0f));