【发布时间】:2020-05-29 03:55:28
【问题描述】:
我有一个转换矩阵,它是其他三个转换矩阵的组合。
glm::mat4 Matrix1 = position * rotation * scaling;
glm::mat4 Matrix2 = position * rotation * scaling;
glm::mat4 Matrix3 = position * rotation * scaling;
glm::mat4 transMatrix = Matrix1 * Matrix2 * Matrix3;
如果稍后我只想从 transMatrix 中移除 Matrix1 的效果。
我该怎么做?
【问题讨论】:
-
可能是逆(Matrix1)* transMatrix
-
@Alex 谢谢您,您的回答很好,如果您想将此作为答案发布,请这样做。
-
如果您只想提取(或重置)位置、旋转或缩放,那么可以直接查看:Understanding 4x4 homogenous transform matrices 您只需重置适当的矩阵单元