Esempio n. 1
0
        public static void PlaceTextureOnFaces(this Mesh mesh, int face, ImageBuffer textureToUse)
        {
            //// planar project along the normal of this face
            var faces = mesh.GetCoplanarFaces(face);

            if (faces.Any())
            {
                mesh.PlaceTextureOnFaces(faces, textureToUse, mesh.GetMaxPlaneProjection(faces, textureToUse));
            }
        }
Esempio n. 2
0
        public static IEnumerable <int> GetCoplanarFaces(this Mesh mesh, int faceIndex)
        {
            var plane = mesh.GetPlane(faceIndex);

            return(mesh.GetCoplanarFaces(plane));
        }