gpt4 book ai didi

c++ - 如何从 ModelViewProjection 矩阵获取相机原点? (DX11)

转载 作者:行者123 更新时间:2023-11-28 04:36:06 25 4
gpt4 key购买 nike

如何从 direct3d 11 中的 ModelViewProjection 矩阵获取相机位置?我已经尝试获取矩阵的逆矩阵并使用 _41、_42 和 _43,但位置不正确。有可能吗?

最佳答案

如果您有一个组合的 ModelViewProjection 矩阵,那么您可能有许多元素组合在一起,因此相机不容易提取。您通常会从 View 矩阵中提取相机位置。

You may want to look at the SimpleMath wrapper for DirectXMaht which implements many common helpers. It uses row-major matrices with right-handed viewing coordinates which is what XNA Game Studio use

关于c++ - 如何从 ModelViewProjection 矩阵获取相机原点? (DX11),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51393623/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com