Пример #1
0
            public static Partition Create(Topology.FaceEdge edge, IVertexAttribute <Vector3> vertexPositions, Surface surface)
            {
                var prevEdge    = edge.prev;
                var vPos0       = vertexPositions[prevEdge];
                var vPos1       = vertexPositions[edge];
                var edgeVector  = vPos1 - vPos0;
                var edgeNormal  = surface.GetNormal(vPos0);
                var planeNormal = Vector3.Cross(edgeVector, edgeNormal).normalized;

                return(new Partition(planeNormal, vPos0, edge.twinIndex, edge.index));
            }