From: Wagner, C. B <cha...@bo...> - 2002-03-18 23:21:31
|
Hi, I guess this is really an openGL general question, but here goes: I need to find the coordinates at which various segments in my scene intersect the current view volume. My view volume is set dynamically during runtime, so the intersection points could potentially be different each frame. I want to put labels on my segments at the points where they cross in and out of view. My first thought is to use Sutherland-Hodgeman or Cyrus-Beck 3D clipping algorithms on all six planes of the view volume -- but this seems time consuming, and mesa/openGL is already doing the clipping for me! Is there a way for me not to redo this work? Thanks for your help, Chad Wagner |
From: Brian P. <br...@tu...> - 2002-03-19 13:29:01
|
"Wagner, Chad B" wrote: > > Hi, > > I guess this is really an openGL general question, but here goes: > > I need to find the coordinates at which various segments in my scene > intersect the current view volume. My view volume is set dynamically during > runtime, so the intersection points could potentially be different each > frame. I want to put labels on my segments at the points where they cross > in and out of view. My first thought is to use Sutherland-Hodgeman or > Cyrus-Beck 3D clipping algorithms on all six planes of the view volume -- > but this seems time consuming, and mesa/openGL is already doing the clipping > for me! Is there a way for me not to redo this work? You might try using OpenGL's feedback mode. Check if any of the returned vertices lie at the edge of the viewport. -Brian |