I'm a new member of this forum despite the fact that I was registered here long time ago.

So..

All matrix will be OpenGL matrices (not DX)

I would like to tell a little about the View matrix. The model-view matrix consists of Model matrix and View. So I need the second one.

Now I'm reading a book about 3D programming..

And the view matrix is represented like this:

u

_{x}u

_{y}u

_{z}d

_{x}

v

_{x}v

_{y}v

_{z}d

_{y}

n

_{x}n

_{y}n

_{z}d

_{z}

0 0 0 1

where u, v, n - are the normalized vectors of the camera that are representing the coordinate system of the camera.

d - is the translation vector

So I understand that we need to multiply model matrix to a View Matrix to translate World coordinates of some object into Camera coordinates.

But..

I can't understand why u, v, n is in rows, not in columns? I mean that the matrix should be:

u

_{x}v

_{x}n

_{x}d

_{x}

u

_{y}v

_{y}n

_{y}d

_{y}

u

_{z}v

_{z}n

_{z}d

_{z}

0 0 0 1

Why am I think so ?

Let imagine that we have some point that have it own transformation matrix. This point P will be:

P = v + P*i + P*j + P*k;

v - origin,

i,j,k - are orthogonal vectors-columns.

i = (1, 0, 0, 0)

^{T}

j = (0, 1, 0, 0)

^{T}

k = (0, 0, 1, 0)

^{T}

v - (v

_{x, }v

_{y, }v

_{z}, 1)

^{T}

The last number tells us what is it: vector or point.. if it equals to 0 hence it vector (because it is haven't origin), if 1 then it is a point.

So the final matrix would be:

1 0 0 v

_{x}

0 1 0 v

_{y}

0 0 1 v

_{z}

0 0 0 1

And this is logically ok.

But, looking at the view matrix I can't see any logic..

Could onyone help me to understand what is wrong about my argumentation ?

Thank you.

Pardon for my English. It is not perfect, but I'm working on it. =)

**Edited by glad, 12 September 2012 - 01:29 AM.**