### Re: XNA Framework How does Vector3.Transform work?

Jon Watte

Note:

- XNA and DirectX use ROW VECTORS ON THE LEFT.

- This means that translation lives on the bottom.

- Point transformations assume a "1" as the fourth vector element.

- Normal transformations assume a "0" as the fourth vector element.

In your example, a vector V (0, 0, 0, 1) times your matrix M will multiply as follows:

out.X = dot4(V, M.Col0) = 0;

out.Y = dot4(V, M.Col1) = 1;

out.Z = dot4(V, M.Col2) = 0;

out.W = dot4(V, M.Col3) = 1; // optional

The output result will be 0, 1, 0 (, 1)

Note that XNA quaternions multiply from right to left, whereas XNA matrices and vertices multiply from left to right. In DirectX, they all multiply from left to right.