SharpDX Matrix.Forward curiosity

Started by
-1 comments, last by DwarvesH 10 years ago

Now I'm proficient with the practical application of matrices in rendering, but I can't say I know exactly the meaning of all the rows an columns in different transformation matrices.

I was integrating a new physics engine in my SharpDX engine and I had to port the cameras from RH to LH coordinate system. Everything seems to work correctly and rendering is also correct, with the exception of the camera view matrix forward component, which is (0, 0, -1).

Just to be sure that I did not mes sup the RH/LH conversion, I tested my old tried and true cameras with which I had no issues ever and even there the Forward component is (0, 0, -1).

So in matrix theory, shouldn't my forward components be the same sign as my forward vector? I do habe my axis properly set up in my camera:


public Vector3 XAxis = new Vector3(1, 0, 0);
public Vector3 YAxis = new Vector3(0, 1, 0);
public Vector3 ZAxis = new Vector3(0, 0, 1);

Checking the SharpDX documentation, it says that Forward return -M31, -M32, and -M33.

http://sharpdx.org/documentation/api/p-sharpdx-matrix-forward

Is this normal?

This topic is closed to new replies.

Advertisement