예제 #1
0
        // Token: 0x0600005D RID: 93 RVA: 0x000033C0 File Offset: 0x000015C0
        public TriangleMesh CreateSurfaceLines()
        {
            Dictionary <uint, ushort>       dictionary   = new Dictionary <uint, ushort>();
            List <TriangleMesh.EdgeLine>    edgeLines    = new List <TriangleMesh.EdgeLine>();
            List <TriangleMesh.SurfaceLine> surfaceLines = new List <TriangleMesh.SurfaceLine>();
            List <TriangleMesh.Line>        list         = new List <TriangleMesh.Line>();

            foreach (TriangleMesh.Triangle triangle in this.Triangles)
            {
                ushort v  = triangle.V0;
                ushort v2 = triangle.V1;
                ushort v3 = triangle.V2;
                TriangleMesh.Corner corner  = this.Corners[(int)v];
                TriangleMesh.Corner corner2 = this.Corners[(int)v2];
                TriangleMesh.Corner corner3 = this.Corners[(int)v3];
                TriangleMesh.AddHalfEdge(corner.VertexIndex, corner2.VertexIndex, corner.NormalIndex, this.Normals, dictionary, edgeLines, surfaceLines);
                TriangleMesh.AddHalfEdge(corner2.VertexIndex, corner3.VertexIndex, corner2.NormalIndex, this.Normals, dictionary, edgeLines, surfaceLines);
                TriangleMesh.AddHalfEdge(corner3.VertexIndex, corner.VertexIndex, corner3.NormalIndex, this.Normals, dictionary, edgeLines, surfaceLines);
            }
            foreach (uint num in dictionary.Keys)
            {
                ushort v4 = (ushort)(num & 65535u);
                ushort v5 = (ushort)(num >> 16);
                list.Add(new TriangleMesh.Line(v4, v5));
            }
            return(new TriangleMesh(this.Origin, this.Normals, this.Vertices, edgeLines, surfaceLines, list, this.Corners, this.Triangles, this.ReferenceLines, this.ReferenceLineRadius));
        }