   Rotating a direction Vector on a plane
  Say i have a plane with it's normal (1, 0, 0) and i have an direction on this plane( just a line segment with it's direction (0,1,0) y is pointing forward so basically in this situating the ray segment is the same as the plane normal.but if the plane normals was (0,0,1) than this segment was referering to (0,0,1)how can i calculate the correct direction for the ray segment.I've been usings this for a tool i've been developing, to paint on planes( well quads actually) tiaPaul   
  I hope I understand what you are asking.Do you absolutely need to perform the plane's "lookat" normal rotation transform before you try to calculate what's needed to do the same transformation to the "up" normal?The reason I ask is because when I do ray-tracing, I make the initial setup very simple like yours, but then I simply rotate all of the pertinent vectors at the same time by rotating first on the x axis, then on the y axis. This way no reverse-calculations are required.ie:- Make lookat normal face along +x- Make up normal face along +y- Rotate lookat and up normal on x axis by a certain number of radians- Rotate lookat and up normal on y axis by a certain number of radiansRotation code:void point_3::rotate_x(const float &radians){float t_y = y;y = t_y*cos(radians) + z*sin(radians);z = t_y*-sin(radians) + z*cos(radians);}void point_3::rotate_y(const float &radians){float t_x = x;x = t_x*cos(radians) + z*-sin(radians);z = t_x*sin(radians) + z*cos(radians);}