public static void PlaceTexture(this Mesh mesh, ImageBuffer textureToUse, Matrix4X4 textureCoordinateMapping) { for (int i = 0; i < mesh.Faces.Count; i++) { mesh.PlaceTextureOnFace(i, textureToUse, textureCoordinateMapping, false); } mesh.MarkAsChanged(); }
public static void PlaceTextureOnFace(this Mesh mesh, int face, ImageBuffer textureToUse) { //// planer project along the normal of this face mesh.PlaceTextureOnFace(face, textureToUse, mesh.GetMaxPlaneProjection(face, textureToUse)); }