Purvis

02-05-2006, 05:46 PM

Hi,

I'll try posting this one here, as nobody replied on the beginners forum.

In short, I need to mimic OpenGL's spherical mapping in a vertex program, but I'm stuck with the math. The documentation says the reflection vector is not using the standard reflection formula, instead f is computed as:

f = u - 2n'n'T u

where u is the vector to position in eye-space and n' the normal in eye space. All this is ok, but what n'T means? What is the transpose of a vector and how is resolved in a multiplication?

I suppose the transpose of a column vector is the same, as a row vector.

If so, how do I multiply (in plain C) a column vector by a row vector (or viceversa) ?

Thanks in advance!

I'll try posting this one here, as nobody replied on the beginners forum.

In short, I need to mimic OpenGL's spherical mapping in a vertex program, but I'm stuck with the math. The documentation says the reflection vector is not using the standard reflection formula, instead f is computed as:

f = u - 2n'n'T u

where u is the vector to position in eye-space and n' the normal in eye space. All this is ok, but what n'T means? What is the transpose of a vector and how is resolved in a multiplication?

I suppose the transpose of a column vector is the same, as a row vector.

If so, how do I multiply (in plain C) a column vector by a row vector (or viceversa) ?

Thanks in advance!