我在拆分简单的形状(如盒子)时遇到问题。我正在为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