如何在视野中多重剪切对象

发布于 2025-01-14 17:28:50 字数 173 浏览 3 评论 0原文

我在视野样本中找到了裁剪对象,但没有多重裁剪。

另外,我需要剪切 x 平面和 y 平面,但我找不到此信息。

如何使用目镜进行多剪辑?

另外,如何改变剪辑的角度?

演示中仅提供了剪辑创建的示例。

design.ClippingPlane1.Edit(null);

I found the clipping object in the eye shot sample, but there was no multi-clipping.

Also, I need to clip the x-plane and y-plane, but I can't find this information.

How can I multi-clip with an eye shot?

Also, how can I change the angle of clipping?

There are only examples of clipping creation in the demo.

design.ClippingPlane1.Edit(null);

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

起风了 2025-01-21 17:28:50

您只需向应用程序添加一个切换按钮,然后执行此操作并手动切换三次调整平面角度。

    private int count;

    private void buttonEditClipPlane_Click(object sender, EventArgs e)
    {
        if (CurrentWorkspace is Design d)
        { 
            d.ActionMode = actionType.None;

            if (d.ObjectManipulator.Visible)
            {
                d.ClippingPlane1.Apply();
                d.ClippingPlane2.Apply();
                d.ClippingPlane3.Apply();
            }
          
            switch (count)
            {
                case 0:
                    d.ClippingPlane1.Edit(Color.FromArgb(127, Color.Red));
                    d.ClippingPlane1.CappingColor = Color.Red;
                    break;
                case 1:
                    d.ClippingPlane2.Edit(Color.FromArgb(127, Color.Green));
                    d.ClippingPlane2.CappingColor = Color.Green;
                    break;
                case 2:
                    d.ClippingPlane3.Edit(Color.FromArgb(127, Color.Blue));
                    d.ClippingPlane3.CappingColor = Color.Blue;
                    break;
            } 

            d.Entities.Regen();
            d.Invalidate();
            count++;
        }
    }

You simply need to add a toggle button to your app and do this and toggle it three times manually adjusting plane angle.

    private int count;

    private void buttonEditClipPlane_Click(object sender, EventArgs e)
    {
        if (CurrentWorkspace is Design d)
        { 
            d.ActionMode = actionType.None;

            if (d.ObjectManipulator.Visible)
            {
                d.ClippingPlane1.Apply();
                d.ClippingPlane2.Apply();
                d.ClippingPlane3.Apply();
            }
          
            switch (count)
            {
                case 0:
                    d.ClippingPlane1.Edit(Color.FromArgb(127, Color.Red));
                    d.ClippingPlane1.CappingColor = Color.Red;
                    break;
                case 1:
                    d.ClippingPlane2.Edit(Color.FromArgb(127, Color.Green));
                    d.ClippingPlane2.CappingColor = Color.Green;
                    break;
                case 2:
                    d.ClippingPlane3.Edit(Color.FromArgb(127, Color.Blue));
                    d.ClippingPlane3.CappingColor = Color.Blue;
                    break;
            } 

            d.Entities.Regen();
            d.Invalidate();
            count++;
        }
    }
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文