PDA

View Full Version : clipping plane translation



andrewt
02-19-2002, 11:07 PM
ok, im suffering all sorts of pain here...

this is my situation...

lets say i have a window (read frame) that doesnt quite center at (0,0)..but rather it centers at (0,.195)....so...everything i render i translate up .195 so it is at the center of this window.

this is all standard stuff and it works great..right?

well..what i want to do is have a clipping plane centered at (0,.195)...but everytime i translate my clipping plane centered at (0,0) up .195...nothing happens...i can translate the plane along the z axis all day long with expected results..but not along the y axis..

is there a reason for this? is there a solution?

thanks
andrew

john
02-20-2002, 03:47 PM
Hello,

cliping planes are infinite and you won't see any change of you translate through a vector thats co-planar to your clipping plane.

For example; if you have the plane equation

z=0;

(ie. any point <x,y,0> satisfies this equation), then the commands

glTranslatef(1.0, 0.0, 0.0);

or

glTranslatef(0.0, 1.0, 0.0);

(or some permutation thereof) won't have any effect on the orientation of the plane, right?

but this will:

glTranslatef(0.0, 0.0, 1.0);

because now you're modifying a variable affected by the plane's condition.

does this make sense?

cheers,
John

andrewt
02-20-2002, 05:10 PM
yeah..that makes sense...unfortunately http://www.opengl.org/discussion_boards/ubb/smile.gif

guess ill just have to make the thing i want clipped at the origin....
quite unfortunate (because i need it to be able to translate along z)

thanks for the help
andrew