Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Graphics > OpenGL 3D API > Simple Clipping...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 4813 of 5017
Post > Topic >>

Simple Clipping Broken -- Where did I get this code?

by Kenny <kentilton@[EMAIL PROTECTED] > Jun 28, 2008 at 12:19 AM

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
 




 1 Posts in Topic:
Simple Clipping Broken -- Where did I get this code?
Kenny <kentilton@[EMAI  2008-06-28 00:19:55 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Nov 21 4:17:46 CST 2008.