【问题标题】:How to invert the y coordinate of a 4x4 matrix?如何反转 4x4 矩阵的 y 坐标?
【发布时间】:2015-01-19 13:03:46
【问题描述】:

我在 SlimDX 中工作,我从 x、y、z 坐标开始。我将右手坐标系中的一个点转换为垂直正位置 Z 为右手 y 垂直正(DirectX)。为了使旋转更容易,我将我的点转换为 4x4 矩阵。现在我需要反转 y 坐标。矩阵形式时如何仅反转 y 坐标?

Matrix finalMatrix = originalMatrix * 
Matrix.RotationX(MathHelper.ToRadians(85f)) * 
Matrix.RotationY(MathHelper.ToRadians(-.075f)) *
Matrix.RotationZ(MathHelper.ToRadians(55f)) ;

【问题讨论】:

    标签: c# matrix slimdx


    【解决方案1】:

    要反转 Y,您需要通过 XZ 平面反射点。

    finalMatrix = finalMatrix * Matrix.Reflection(new Plane(0,-1,0, 0));
    

    【讨论】:

      猜你喜欢
      • 2010-11-12
      • 1970-01-01
      • 1970-01-01
      • 2011-06-17
      • 2011-04-28
      • 1970-01-01
      • 2018-01-09
      • 2013-12-17
      • 1970-01-01
      相关资源
      最近更新 更多