PDA

View Full Version : Clip issue



IG
05-18-2006, 08:58 AM
Hi,
I'm trying to implement OpenGL GPU Pipeline and got some trobels in clipping the view volume with clip cordinates:
I have line from V1(x1,y1,z1,w1) & V2(x2,y2,z2,w2) :
(ignore the ....)
.............|
V1 (x1,w1) o | o V2 (x2,w2)
.............|
W=Xmax
and x1>w1 & x2<w2 so I need to clip the line on x axis.
I need to find t=(x1-Xmax)/(x1-x2).
but what is W (Xmax)? How can I find him?