弯曲后的平面宽度(使用 pv3d、as3dmod)

发布于 2024-08-05 21:07:17 字数 462 浏览 4 评论 0原文

我遇到了一个大问题。我已经被困在那里两个星期了。 看起来很简单。

我正在创建一个平面,并将纹理映射到它。 之后,我使用 as3dmod 中的弯曲修改器弯曲它。

当然,经过弯曲处理后,平面变小了。

我尝试计算第一个和最后一个顶点。

var sizeAfterBending:Number = (-1 * plane.geometry.vertices[0].x) + (plane.geometry.vertices[plane.geometry.vertices.length-1].x);

我计算 -1 因为第一个顶点始终为负。

结果是,如果平面是 400*533,则工作正常。 但对于 640*480 的平面来说,情况并非如此。

我缺少一些东西。这真的让我发疯。

有人有什么想法吗?

提前致谢。

干杯,丹先生

I got a huge problem. I'm stuck there for two weeks now.
It's seems pretty simple.

I'm creating a plane, mapping a texture to it.
After that I bend it, using the bend modifier from as3dmod.

Of course the plane got smaller after the bending process.

I've tried to calculate the first and last vertices.

var sizeAfterBending:Number = (-1 * plane.geometry.vertices[0].x) + (plane.geometry.vertices[plane.geometry.vertices.length-1].x);

I calculate -1 cause the first vertex is always negative.

The result of that is, if the plane is 400*533 it working fine.
But with a plane of let's say 640*480 it's not.

I'm missing something. It's really driving me crazy.

Does anybody has any idea?

Thanks in advance.

Cheers, MisterDan

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

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

发布评论

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

评论(1

一向肩并 2024-08-12 21:07:17

JFY,我解决了。

我试图在渲染完成之前访问此信息。

当然,这是行不通的;)

干杯,丹先生

JFY, I solved it.

I was trying to access this information before the rendering was finish.

Of course that's not gonna work ;)

Cheers, MisterDan

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