1. calculateMinDistance

计算两个构件之间的最小距离。

1.1. 参数说明:

名称 说明 类型 是否必填 示例
componentKey 构件key 字符串 string "M123_456"
componentKey2 第二个构件key 字符串 string "M123_456"
返回值说明 类型 示例
返回结果的对象 object NULL
object.start THREE.Vector3 NULL
object.end THREE.Vector3 NULL
object.minDistance Number NULL

1.2. 调用方式:

/**
 * 计算两个构件之间的最小距离,返回的信息包括:
 *  start :起点坐标
 *  end : 终点坐标
 *  minDistance : 最小距离
 * @method calculateMinDistance
 * @param {string} componentKey 构件key
 * @param {string} componentKey2 第二个构件key
 * @return {Object} - 最小距离信息
 */
viewer3D.calculateMinDistance({
    x: 0,
    y: 0
});
版权所有@盈嘉互联(北京)科技有限公司 京ICP备15051988号-9 Copyright © 2021 all right reserved,powered by Gitbook该文件修订时间: 2021-12-20 09:59:48

results matching ""

    No results matching ""