I am revisiting some old code I have not looked at in years. I know it
or something close to it did work when I finished developing it, but now
my clipping is just dividing the world in half (which i kinda
understand, so all is not lost <g>).
Anyway, my main question is how I can get to where I borrowed my code in
the first place. I seem to have cut and pasted this into my program:
;;
;; A = y1 (z2 - z3) + y2 (z3 - z1) + y3 (z1 - z2)
;; B = z1 (x2 - x3) + z2 (x3 - x1) + z3 (x1 - x2)
;; C = x1 (y2 - y3) + x2 (y3 - y1) + x3 (y1 - y2)
;; - D = x1 (y2 z3 - y3 z2) + x2 (y3 z1 - y1 z3) + x3 (y1 z2 - y2 z1)
;;
I actually remember finding this stuff somewhere and swiping it, but I
cannot figure out where. I cannot find it on-line, on NeHe or in the red
or blue book.
btw, the red book example is dead simple, carving out all but one
quadrant of a sphere centered at 0,0 and I am tempted to forget the code
I have (which seems to handle a more general case?) and just work out
how to get what I want guessing at values for A,B,C and D -- the good
news is that I do just have to do rectangular clipping.
Anyway, does anyone know where I got that code or just something
similar? Simply googling opengl clipping does not help either.
kt


|