public void Clip(GameObject targetGameObject, Vector3 anchorPoint, Vector3 normalDirection) { WMesh slicedMesh, remainedMesh; if (ClipByPlane(clipPlane, Target.GetWMesh(), out slicedMesh, out remainedMesh)) { CreateNewObject("Sliced", slicedMesh.ToUnityMesh("Sliced", Target), Target.GetPosition(), Target.SlicedMaterial); CreateNewObject("Remained", remainedMesh.ToUnityMesh("Remained", Target), Target.GetPosition(), Target.SlicedMaterial); Target.Hide(); } }
public void Clip() { WMesh slicedMesh, remainedMesh; if (ClipByPlane(clipPlane, Target.GetWMesh(), out slicedMesh, out remainedMesh)) { CreateNewObject("Sliced", slicedMesh.ToUnityMesh("Sliced"), Target.GetPosition(), Target.SlicedMaterial); CreateNewObject("Remained", remainedMesh.ToUnityMesh("Remained"), Target.GetPosition(), Target.SlicedMaterial); Target.Hide(); } }