Summary
Constructor
new MeshCSG(geometry)
构造立体几何构造函数
Parameters:
Name | Type | Description |
---|---|---|
geometry |
module:model~Stretch | module:model~Mesh | 简模或者网格模型要素 |
Example
let cubeCSG = new hmap.util.MeshCSG(cubeMesh);
let sphereCSG = new hmap.util.MeshCSG(sphereMesh);
let resultCSG = cubeCSG.intersect(sphereCSG);
let resultMesh = resultCSG.toModel();
Methods
-
intersect(other) → {module:util~MeshCSG}
-
交集
Parameters:
Name Type Description other
module:util~MeshCSG 其他的MeshCSG对象
-
subtract(other_tree) → {module:util~MeshCSG}
-
差集
Parameters:
Name Type Description other_tree
module:util~MeshCSG 其他的MeshCSG对象
-
toModel(material) → {module:model~IrregularModel}
-
将立体几何对象转换成不规则网格模型
Parameters:
Name Type Description material
module:material~Material 材质
-
union(other) → {module:util~MeshCSG}
-
并集
Parameters:
Name Type Description other
module:util~MeshCSG 其他的MeshCSG对象