如何镜像半 3D 网格对象?

发布于 2024-07-24 05:19:45 字数 120 浏览 3 评论 0原文

假设我们有一个半 3D 网格对象并希望在 C# 2008 Express 中对其进行镜像。 也就是说,我们想要根据物体的中心线得到它的对称部分。

你能帮我做到这一点吗?

提前致谢。

Let assume that we have a half 3D mesh object and want to mirror it, in C# 2008 Express.
That is, we want to have its simetrical part according to the center line of the object.

Could you help me to do that.

Thanks in advance.

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

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

发布评论

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

评论(2

披肩女神 2024-07-31 05:19:45

您可以尝试在一个轴上负向缩放它,这实际上应该翻转它。

因此,如果其比例为 (1, 1, 1),请将其更改为 (-1, 1, 1)。

You can try scaling it negatively in one axis, that should essentially flip it.

So if its scale is (1, 1, 1), change it to (-1, 1, 1).

一梦等七年七年为一梦 2024-07-31 05:19:45

嗯...这是我将使用的算法:

  1. 找到网格上您想要反映的点。 称之为p0。
  2. 平移对象,使 p0 位于原点 (0,0,0) 上。
  3. 现在,沿着所需的旋转平面围绕原点将对象旋转 180 度。
  4. 翻译回 p0。

这将为您提供围绕您希望旋转的线的对象的反射。

hmmmm... here is the algorithm I would use:

  1. Find the point on the mesh that you would want to reflect about. Call it p0.
  2. Translate the object so that p0 lies on the origin (0,0,0).
  3. Now rotate the object 180 degrees about the origin along your desired plane of rotation.
  4. Translate back to p0.

This should give you a reflection of the object about the line you wish to rotate around.

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