弯曲后的平面宽度(使用 pv3d、as3dmod)
我遇到了一个大问题。我已经被困在那里两个星期了。 看起来很简单。
我正在创建一个平面,并将纹理映射到它。 之后,我使用 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
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