예제 #1
0
    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();
        }
    }
예제 #2
0
    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();
        }
    }