コード例 #1
0
        public static void SaveToPNG(this Cubemap cubemap, string path, CubeMappingType mapping = CubeMappingType.Faces4x3)
        {
            switch (mapping)
            {
            case CubeMappingType.Cylindrical:
                cubemap.SaveToCylindricalPNG(path);
                break;

            case CubeMappingType.Spherical:
                cubemap.SaveToSphericalPNG(path);
                break;

            case CubeMappingType.Faces4x3:
                cubemap.SaveTo4x3PNG(path);
                break;

            case CubeMappingType.Faces3x4:
                cubemap.SaveTo3x4PNG(path);
                break;

            case CubeMappingType.Faces6x1:
                cubemap.SaveTo6x1PNG(path);
                break;

            case CubeMappingType.Faces1x6:
                cubemap.SaveTo1x6PNG(path);
                break;
            }
        }