com.supermap.realspace.threeddesigner

类 ModelConvertor



  • public abstract class ModelConvertor
    extends Object
    模型转换类,该类用于模型转换成指定格式的文件来存储数据
    • 构造器详细资料

      • ModelConvertor

        public ModelConvertor()
    • 方法详细资料

      • fromFile

        public static boolean fromFile(Model model,
                                       ModelFileSetting setting)
        根据指定的模型文件类型及路径创建Model对象。
        参数:
        model - 创建的Model对象。
        setting - 模型的文件类型及路径设置。目前支持导入OSGB、S3M、OFF、TERRAINZ、TINZ、DAE六种格式。
        返回:
        获取到模型数据为true,失败为false。
      • toFile

        public static boolean toFile(Model model,
                                     ModelFileSetting setting)
        将Model对象导出为指定格式的模型文件。
        参数:
        model - 指定的Model对象。
        setting - 目标模型的文件类型及路径设置,目前支持导出OSGB、S3M、GLTF、DAE、OFF、STL六种格式。

        Linux环境下不支持导出GLTF。

        返回:
        导出模型文件成功为true,失败为false。
      • toFile

        public static String toFile(ArrayList<CSGNode> csgNodes,
                                    ModelFileSetting setting)
        CSGNode转化为其他模型类型。
        参数:
        csgNodes - CSG节点集合
        setting - 目标模型的文件类型及路径设置,目前支持导出IFC、JSON。
        返回:

Copyright © 2021–2024 SuperMap. All rights reserved.