コード例 #1
0
        public static List <Line> MayaMeshEdges(MFnMesh mayaMesh)
        {
            List <Line> edges = new List <Line>(mayaMesh.numEdges);

            int[] edgId = new int[2];
            var   verts = getMeshVerticies(mayaMesh);


            for (int i = 0; i < mayaMesh.numEdges; i++)
            {
                mayaMesh.getEdgeVertices(i, edgId);
                edges.Add(Line.ByStartPointEndPoint(verts[edgId[0]], verts[edgId[1]]));
            }

            return(edges);
        }
コード例 #2
0
        public static int CombineOverLappingEdge(MFnMesh mesh, float threshold)
        {
            int edgeCount = mesh.numEdges;

            for (int i = 0; i < edgeCount; i++)
            {
                int[] edgeVerts = new int[2];
                mesh.getEdgeVertices(i, edgeVerts);
                MPoint a = new MPoint(), b = new MPoint();
                mesh.getPoint(edgeVerts[0], a);
                mesh.getPoint(edgeVerts[1], b);
                Debug.LogVector(a, "pointA");
                Debug.LogVector(b, "pointB");
            }



            return(0);
        }