Very helpful Thantos, exactly what I was looking for. I have a couple questions about this psuedocode, this is a diagonal line:
Now I'm lost at what to do next. I need 4 points to come out of the endpoints like an X, to form a bounding box around the line. If I could get a vector that's say 2 units away from the endpoint(perpendicular) I could get the values. Could I just multiply the normalized vector by 2.0? How could I move a point along Axis1?
Vec3 start = (0.0, 0.0, 0.0);
end = (5.0, 4.0, 5.0);
if( end >=start )
DirUp = end-start;
DirUp = start-end;
Vec3 theCross = (1.0, 0.0, 0.0); // Would this always work???
Vec3 Axis1 = CrossProduct(DirUp, theCross); // Perpendicular to DirUp and theCross..great