on the matrix operations below, how do i use the pointers p1 and p2 to point to T()?
double PSurface1::getRotation(PSurface1 &surface)
{
int i; // index of the point
iterator p1; // point in surface 1
iterator p2; // point in surface 2
Matrix P1(size(), 3); // matrix of surface1
Matrix P2(size(), 3); // matrix of surface2
Matrix T(3, 3); // vector of solutions: transformation parameters
for(p1 = begin(), p2 = surface.begin(); p1 != end(); p1++, p2++)
{
P1(i, 1) = p1->x();
P1(i, 2) = p1->y();
P1(i, 3) = p1->cos(x) + sin(y)();
P2(i, 1) = p2->x()*R();
P2(i, 2) = p2->y()*R();
P2(i, 3) = p2->(cos(x) + sin(y)())*R();
T(i,1) = p1*p2->T();
}
T = P1.t()*P2;
---------------------------------
Yahoo! Messenger NEW - crystal clear PC to PC calling worldwide with voicemail |