public ClipOutTriangles ( FastLinkedList |
||
triangles | FastLinkedList |
|
clipLessThan | bool | |
discarded | IList |
|
return | void |
/** * Recursive version of ClipByTree. This method recursively visits each node in this * BSPTree instance and clips the triangles of each based on the geometry of @tree. * By default it will remove the portions of triangles that are completely inside the * geometry contained by @tree. * * If @clipLessThan is false, the operation is reversed and triangle portions * outside the geometry of @tree instance are removed. */ private void ClipByTree(Node node, BSPTree tree, bool clipLessThan = true, IList <Triangle> discarded = null) { if (node == null) { return; } tree.ClipOutTriangles(node.GetTriangleList(), clipLessThan, discarded); ClipByTree(node.LessThan, tree, clipLessThan, discarded); ClipByTree(node.GreaterThan, tree, clipLessThan, discarded); }
/** * Recursive version of ClipByTree. This method recursively visits each node in this * BSPTree instance and clips the triangles of each based on the geometry of @tree. * By default it will remove the portions of triangles that are completely inside the * geometry contained by @tree. * * If @clipLessThan is false, the operation is reversed and triangle portions * outside the geometry of @tree instance are removed. */ private void ClipByTree(Node node, BSPTree tree, bool clipLessThan = true, IList<Triangle> discarded = null) { if(node == null)return; tree.ClipOutTriangles (node.GetTriangleList(), clipLessThan, discarded); ClipByTree (node.LessThan, tree, clipLessThan, discarded); ClipByTree (node.GreaterThan, tree, clipLessThan, discarded); }