i got the absolute coordinates to a 3d triangle, and i want to turn it into relative coordinates,
and then move them to a certain point. The code i have written but utterly fails to do anything
that even looks like what i want is this:
Code: Select all
// point A,B and C are the 3d (vector3df) coordinates of the triangle,
//i substract the coordinates of A, to make A the origin of the new relative coordinates
pointA-=pointA;
pointB-=pointA;
pointC-=pointA;
//posX,posY,posZ is the new coordinates i want the triangle to be at.
pointA+=core::vector3df(posX,posY,posZ);
pointB+=core::vector3df(posX,posY,posZ);
pointC+=core::vector3df(posX,posY,posZ);
can anyone help me out on this?