Hi guys! I have a problem…

  • I have the positions of the point A and the point B.
  • The object is positionated into the trajectory bewtween them.
  • The object is represented by 3d texture
  • I create GL_QUADS, one for each “slice” of my volume, and I map each slice into the quads
  • I must choose how to create the slices of the volume (along the plane zx or zy or xy) in order to have the nearest angle to 90° between the trajectory and the quads.

How can I do it?

This sounds like homework.
Test each of the 3 planes angle against the trajectory AB, take the higher one. You can easily find plane-line angle calculations on wikipedia or wolfram etc.