calculating a plane perpendicular to the view vector


I have the eye position and the view vector and need to calculate a plane perpendicular to the eye vector at all time. This is for maintaining view-aligned slices. Please could someone tell me how to do this.


Hi, try this:

  float mat[16];

  Vector vec_right(mat[0],mat[4],mat[8]);
  Vector vec_up(mat[1],mat[5],mat[9]);
  Vector vec_eye(mat[2],mat[6],mat[10]);

The modelview matrix not only gives you the eye vector, but also an up and right vector. These 2 vectors are in the perpendicular to each other, and the eye vector.

If (a,b,c) is your view vector, then
ax+by+cz = d is a plane perpendicular to the your view vector.