mesh - Threejs 从网格中切割相交网格
问题描述
我在拆分简单的形状(如盒子)时遇到问题。我正在为threejs 使用打字稿。我不能使用 CSG 或这种方法,因为 CSG 实际上并没有分割形状,而 polybool 我找不到打字稿版本。
let allBoxes = getAllBoxes(); // all available boxes
let size = new Vector3(6,4,3);
let newBox = getNewBox(size); //creating new threejs box by using boxgeometry
let splitBoxes = splitBoxes(newBox, allBoxes);// I want this method return array of boxes if any of already available box intersect new Box
解决方案
推荐阅读
- html - 如何确定 p 标签中子标签的 y 增量
- hibernate - 是否可以使用 Hibernate 验证注释对 DTO 类和实体进行注释?
- python - 在字符前后创建提取子串的变量
- r - 仅组合R中两列中的某些单元格
- python - 在 Python 中导入子模块失败
- python - 自定义 keras 回调和变分自动编码器损失函数中正则化项的权重 (beta) 变化
- javascript - Javascript将动态位置文本弹出到图像中
- postman - 使用邮递员在合流页面上上传 .doc 文件的问题
- javascript - 将 DOM 保存为图像,然后将其转换为要发送到 API 参数的文件对象
- git - 在 mac(m1) 终端上没有获得完整的分支名称