OGLES_WINDOWS_X86EMULATION_2.09.29.0649

I would like to know the vector is deal with row vector or column vector in SDK?(You know it is very import to calculate vector with matrix).

It seems the matrix is prepared for row vector since I read the following from “PVRTVector.h”:

== BEGIN ==*/ !*

@Function Translation

@Returns a PVRTMat4 corresponding to the requested translation

@Description Calculates a 4x4 matrix corresponding to a transformation

of tx, ty and tz distance in each axis.

/

static PVRTMat4 Translation(const VERTTYPE tx, const VERTTYPE ty, const VERTTYPE tz)

{

return PVRTMat4(f2vt(1),0,0,0,

0,f2vt(1),0,0,

0,0,f2vt(1),0,

tx,ty,tz,f2vt(1));

}

== END ==

So the translation matrix will be:

**1.0 0.0 0.0 0.0**

0.0 1.0 0.0 0.0

0.0 0.0 1.0 0.0

tx ty tz 1.0

0.0 1.0 0.0 0.0

0.0 0.0 1.0 0.0

tx ty tz 1.0

However another function I read from same file:

== BEGIN ==

*/*

*!*

@Function@Function

@Input rhs a PVRTMat4

@Returns result of multiplication

@Description matrix multiplication operator PVRTVec4 and PVRTMat4

@Input rhs a PVRTMat4

@Returns result of multiplication

@Description matrix multiplication operator PVRTVec4 and PVRTMat4

{

PVRTVec4 out;

out.x = VERTTYPEMUL(x,rhs.f[0])+VERTTYPEMUL(y,rhs.f[1])+VERTTYPEMUL(z,rhs.f[2])+VERTTYPEMUL(w,rhs.f[3]);

out.y = VERTTYPEMUL(x,rhs.f[4])+VERTTYPEMUL(y,rhs.f[5])+VERTTYPEMUL(z,rhs.f[6])+VERTTYPEMUL(w,rhs.f[7]);

out.z = VERTTYPEMUL(x,rhs.f[8])+VERTTYPEMUL(y,rhs.f[9])+VERTTYPEMUL(z,rhs.f[10])+VERTTYPEMUL(w,rhs.f[11]);

out.w = VERTTYPEMUL(x,rhs.f[12])+VERTTYPEMUL(y,rhs.f[13])+VERTTYPEMUL(z,rhs.f[14])+VERTTYPEMUL(w,rhs.f[15]);

return out;

}*/*

PVRTVec4 PVRTVec4::operator(const PVRTMat4& rhs) constPVRTVec4 PVRTVec4::operator

{

PVRTVec4 out;

out.x = VERTTYPEMUL(x,rhs.f[0])+VERTTYPEMUL(y,rhs.f[1])+VERTTYPEMUL(z,rhs.f[2])+VERTTYPEMUL(w,rhs.f[3]);

out.y = VERTTYPEMUL(x,rhs.f[4])+VERTTYPEMUL(y,rhs.f[5])+VERTTYPEMUL(z,rhs.f[6])+VERTTYPEMUL(w,rhs.f[7]);

out.z = VERTTYPEMUL(x,rhs.f[8])+VERTTYPEMUL(y,rhs.f[9])+VERTTYPEMUL(z,rhs.f[10])+VERTTYPEMUL(w,rhs.f[11]);

out.w = VERTTYPEMUL(x,rhs.f[12])+VERTTYPEMUL(y,rhs.f[13])+VERTTYPEMUL(z,rhs.f[14])+VERTTYPEMUL(w,rhs.f[15]);

return out;

}

== END ==

Thus it seems vector is deal with column when PVRTVec4 * PVRTMat4.

E.g. there is PVRTVec4 V(

**A, B, C, 1.0**) and the above translation matrix M,

so V * M =

(

**A1.0 + B0.0 + C0.0 + 1.0**

*0.0,*

A0.0 + BA

*1.0 + C*0.0 + 1.0*0.0,*

A0.0 + BA

*0.0 + C*0.0 + 1.0*0.0,*

Atx + BA

*ty + C*tz + 1.0*1.0)

Observably they are contradictory and I always got wrong resultOuch.

Please confirm that or correct me if I’m wrong.