mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 09:45:47 +08:00
Massive tab and trailing space cleanup
This commit is contained in:
@@ -102,8 +102,8 @@ namespace OpenSim.Region.PhysicsModule.Meshing
|
||||
if ((triangle.v1.X == triangle.v2.X && triangle.v1.Y == triangle.v2.Y && triangle.v1.Z == triangle.v2.Z)
|
||||
|| (triangle.v1.X == triangle.v3.X && triangle.v1.Y == triangle.v3.Y && triangle.v1.Z == triangle.v3.Z)
|
||||
|| (triangle.v2.X == triangle.v3.X && triangle.v2.Y == triangle.v3.Y && triangle.v2.Z == triangle.v3.Z)
|
||||
)
|
||||
{
|
||||
)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -259,7 +259,7 @@ namespace OpenSim.Region.PhysicsModule.Meshing
|
||||
public void getVertexListAsPtrToFloatArray(out IntPtr vertices, out int vertexStride, out int vertexCount)
|
||||
{
|
||||
// A vertex is 3 floats
|
||||
|
||||
|
||||
vertexStride = 3 * sizeof(float);
|
||||
|
||||
// If there isn't an unmanaged array allocated yet, do it now
|
||||
@@ -299,7 +299,7 @@ namespace OpenSim.Region.PhysicsModule.Meshing
|
||||
{
|
||||
if (m_pinnedIndex.IsAllocated)
|
||||
return (int[])(m_pinnedIndex.Target);
|
||||
|
||||
|
||||
int[] result = getIndexListAsInt();
|
||||
m_pinnedIndex = GCHandle.Alloc(result, GCHandleType.Pinned);
|
||||
// Inform the garbage collector of this unmanaged allocation so it can schedule
|
||||
@@ -357,7 +357,7 @@ namespace OpenSim.Region.PhysicsModule.Meshing
|
||||
{
|
||||
if (m_pinnedIndex.IsAllocated || m_pinnedVertexes.IsAllocated || m_indicesPtr != IntPtr.Zero || m_verticesPtr != IntPtr.Zero)
|
||||
throw new NotSupportedException("Attempt to Append to a pinned Mesh");
|
||||
|
||||
|
||||
if (!(newMesh is Mesh))
|
||||
return;
|
||||
|
||||
@@ -370,7 +370,7 @@ namespace OpenSim.Region.PhysicsModule.Meshing
|
||||
{
|
||||
if (m_pinnedIndex.IsAllocated || m_pinnedVertexes.IsAllocated || m_indicesPtr != IntPtr.Zero || m_verticesPtr != IntPtr.Zero)
|
||||
throw new NotSupportedException("Attempt to TransformLinear a pinned Mesh");
|
||||
|
||||
|
||||
foreach (Vertex v in m_vertices.Keys)
|
||||
{
|
||||
if (v == null)
|
||||
|
||||
@@ -247,13 +247,13 @@ namespace OpenSim.Region.PhysicsModule.Meshing
|
||||
private void AddSubMesh(OSDMap subMeshData, Vector3 size, List<Coord> coords, List<Face> faces)
|
||||
{
|
||||
// Console.WriteLine("subMeshMap for {0} - {1}", primName, Util.GetFormattedXml((OSD)subMeshMap));
|
||||
|
||||
|
||||
// As per http://wiki.secondlife.com/wiki/Mesh/Mesh_Asset_Format, some Mesh Level
|
||||
// of Detail Blocks (maps) contain just a NoGeometry key to signal there is no
|
||||
// geometry for this submesh.
|
||||
if (subMeshData.ContainsKey("NoGeometry") && ((OSDBoolean)subMeshData["NoGeometry"]))
|
||||
return;
|
||||
|
||||
|
||||
OpenMetaverse.Vector3 posMax = ((OSDMap)subMeshData["PositionDomain"])["Max"].AsVector3();
|
||||
OpenMetaverse.Vector3 posMin = ((OSDMap)subMeshData["PositionDomain"])["Min"].AsVector3();
|
||||
ushort faceIndexOffset = (ushort)coords.Count;
|
||||
@@ -264,15 +264,15 @@ namespace OpenSim.Region.PhysicsModule.Meshing
|
||||
ushort uX = Utils.BytesToUInt16(posBytes, i);
|
||||
ushort uY = Utils.BytesToUInt16(posBytes, i + 2);
|
||||
ushort uZ = Utils.BytesToUInt16(posBytes, i + 4);
|
||||
|
||||
|
||||
Coord c = new Coord(
|
||||
Utils.UInt16ToFloat(uX, posMin.X, posMax.X) * size.X,
|
||||
Utils.UInt16ToFloat(uY, posMin.Y, posMax.Y) * size.Y,
|
||||
Utils.UInt16ToFloat(uZ, posMin.Z, posMax.Z) * size.Z);
|
||||
|
||||
|
||||
coords.Add(c);
|
||||
}
|
||||
|
||||
|
||||
byte[] triangleBytes = subMeshData["TriangleList"].AsBinary();
|
||||
for (int i = 0; i < triangleBytes.Length; i += 6)
|
||||
{
|
||||
@@ -436,9 +436,9 @@ namespace OpenSim.Region.PhysicsModule.Meshing
|
||||
int convexSize = convexBlock["size"].AsInteger();
|
||||
|
||||
byte[] convexBytes = new byte[convexSize];
|
||||
|
||||
|
||||
System.Buffer.BlockCopy(primShape.SculptData, convexOffset, convexBytes, 0, convexSize);
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
convexBlockOsd = DecompressOsd(convexBytes);
|
||||
@@ -449,7 +449,7 @@ namespace OpenSim.Region.PhysicsModule.Meshing
|
||||
//return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (convexBlockOsd != null && convexBlockOsd is OSDMap)
|
||||
{
|
||||
convexBlock = convexBlockOsd as OSDMap;
|
||||
@@ -762,7 +762,7 @@ namespace OpenSim.Region.PhysicsModule.Meshing
|
||||
{
|
||||
PrimMesh primMesh;
|
||||
coords = new List<Coord>();
|
||||
faces = new List<Face>();
|
||||
faces = new List<Face>();
|
||||
|
||||
float pathShearX = primShape.PathShearX < 128 ? (float)primShape.PathShearX * 0.01f : (float)(primShape.PathShearX - 256) * 0.01f;
|
||||
float pathShearY = primShape.PathShearY < 128 ? (float)primShape.PathShearY * 0.01f : (float)(primShape.PathShearY - 256) * 0.01f;
|
||||
@@ -994,7 +994,7 @@ namespace OpenSim.Region.PhysicsModule.Meshing
|
||||
if ((!isPhysical) && size.X < minSizeForComplexMesh && size.Y < minSizeForComplexMesh && size.Z < minSizeForComplexMesh)
|
||||
{
|
||||
#if SPAM
|
||||
m_log.Debug("Meshmerizer: prim " + primName + " has a size of " + size.ToString() + " which is below threshold of " +
|
||||
m_log.Debug("Meshmerizer: prim " + primName + " has a size of " + size.ToString() + " which is below threshold of " +
|
||||
minSizeForComplexMesh.ToString() + " - creating simple bounding box");
|
||||
#endif
|
||||
mesh = CreateBoundingBoxMesh(mesh);
|
||||
|
||||
@@ -445,7 +445,7 @@ namespace PrimMesher
|
||||
new Angle(1.0f, 1.0f, 0.0f)
|
||||
};
|
||||
|
||||
private static Coord[] normals4 =
|
||||
private static Coord[] normals4 =
|
||||
{
|
||||
new Coord(0.5f, 0.5f, 0.0f).Normalize(),
|
||||
new Coord(-0.5f, 0.5f, 0.0f).Normalize(),
|
||||
@@ -2066,7 +2066,7 @@ namespace PrimMesher
|
||||
/// DEPRICATED - use Extrude(PathType.Linear) instead
|
||||
/// Extrudes a profile along a straight line path. Used for prim types box, cylinder, and prism.
|
||||
/// </summary>
|
||||
///
|
||||
///
|
||||
public void ExtrudeLinear()
|
||||
{
|
||||
this.Extrude(PathType.Linear);
|
||||
@@ -2077,7 +2077,7 @@ namespace PrimMesher
|
||||
/// DEPRICATED - use Extrude(PathType.Circular) instead
|
||||
/// Extrude a profile into a circular path prim mesh. Used for prim types torus, tube, and ring.
|
||||
/// </summary>
|
||||
///
|
||||
///
|
||||
public void ExtrudeCircular()
|
||||
{
|
||||
this.Extrude(PathType.Circular);
|
||||
|
||||
@@ -163,11 +163,11 @@ namespace PrimMesher
|
||||
{
|
||||
|
||||
Bitmap scaledImage = new Bitmap(destWidth, destHeight, PixelFormat.Format24bppRgb);
|
||||
|
||||
|
||||
Color c;
|
||||
float xscale = srcImage.Width / destWidth;
|
||||
float yscale = srcImage.Height / destHeight;
|
||||
|
||||
|
||||
float sy = 0.5f;
|
||||
for (int y = 0; y < destHeight; y++)
|
||||
{
|
||||
@@ -191,7 +191,7 @@ namespace PrimMesher
|
||||
return scaledImage;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using Mono.Addins;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("OpenSim.Region.PhysicsModule.Meshing")]
|
||||
@@ -15,8 +15,8 @@ using Mono.Addins;
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
@@ -26,7 +26,7 @@ using Mono.Addins;
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user