更改孩子的本地矩阵,以弥补父级本地矩阵的缩放

发布于 2025-01-24 05:39:47 字数 937 浏览 3 评论 0原文

a< - b< - c-是当地矩阵的链。

如果我扩展locala,它也会影响worldb。我想warldb保持未量。

问题在于我只能编辑localb矩阵,而没有其他。因此,“ localb”必须在其世界坐标计算之前“未量化”。

伪代码

scale = 1 to 5

localA = mat4.idt() * R(Y, 45) * S(1, scale, scale) * T(0, 0, 0)
localB = mat4.idt() * R(Y, 45) * S(1, 1, 1) * T(1, 0, 0) // I can only edit this
localC = mat4.idt() * R(Y, 45) * S(1, 1, 1) * T(1, 0, 0)

worldA = localA
worldB = worldA * localB
worldC = worldB * localC

休息状态。没有额外的扩展,只有本地转换

”“

locala缩放并缩放儿童

”“”

,这就是我希望它看起来像

A <-- B <-- C - are chain of local matrices.

If I scale the localA, it also affects to the worldB. I want to warldB stays unscaled.

The problem is that I can only edit the localB matrix and nothing else. Thus, 'localB' must be "unscaled" before its world coordinate calculated.

Pseudocode

scale = 1 to 5

localA = mat4.idt() * R(Y, 45) * S(1, scale, scale) * T(0, 0, 0)
localB = mat4.idt() * R(Y, 45) * S(1, 1, 1) * T(1, 0, 0) // I can only edit this
localC = mat4.idt() * R(Y, 45) * S(1, 1, 1) * T(1, 0, 0)

worldA = localA
worldB = worldA * localB
worldC = worldB * localC

Rest state. No extra scaling, just local to world conversion

localA scaled and it scales children

And this is what I want it to look like

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文