RE: [Algorithms] Polygon clipping
Brought to you by:
vexxed72
From: Aaron D. <ri...@ho...> - 2000-07-26 11:06:17
|
I might be overlooking something here but I can imagine a case where a fan would not remain a fan after clipping that might complicate this method. What happens when the centre of the fan is out of the view frustum? I can't see how the fan can be preserved. It would be cut into a series of quads which would no longer share a common vertex. Unless I'm thinking of something wrongly, these can't be arranged in a fan-like fashion. - Aaron > -----Original Message----- > From: gda...@li... > [mailto:gda...@li...]On Behalf Of Tom > Forsyth > Sent: Wednesday, July 26, 2000 7:50 PM > To: gda...@li... > Subject: RE: [Algorithms] Polygon clipping > > > > Fans remain fans (though it may be knarly to find the ordering), strips > don't - they can become multiple strips (think about a U-shaped > strip where > the bottom of the U is off-screen). > > You might also want to try sending objects that intersect the > frustum edges > through the non-VB path, so that D3D clips them for you - it's actually > pretty fast. Things that don't need clipping should still go > through the VB > path of course. > > Oh, and I really recommend indexed lists instead of lots of little strips > and fans - you get far too many D3D calls that way, and if you're going to > do your own clipping, indexed lists are very easy to handle. > > Tom Forsyth - Muckyfoot bloke. > Whizzing and pasting and pooting through the day. > > > -----Original Message----- > > From: Klaus Hartmann [mailto:k_h...@os...] > > Sent: 25 July 2000 23:49 > > To: gda...@li... > > Subject: [Algorithms] Polygon clipping > > > > > > Hi all, > > > > Even though this is not an API-specific question, I'd like to use an > > API-specific example to explain my problem. > > > > In Direct3D, when using *vertex buffer* with pre-transformed > > and pre-lit > > vertices, then Direct3D does not perform any clipping. So I > > have to do this > > myself. I could probably go ahead an clip single triangles > > with a Sutherland > > Hodgman algorithm, but... > > > > How do you people clip triangle strips and triangle fans? Is > > it possible to > > clip them so, that strips remain strips, and fans remain > > fans, or is this > > impossible? > > > > Also, which is the prefered clipping algorithm? Is it > > Sutherland Hodgman? > > > > When you answer, please keep in mind that I also need to clip texture > > coordinates and the diffuse/specular colors. > > > > Any help is greatly appreciated, > > Niki > > > > > > _______________________________________________ > > GDAlgorithms-list mailing list > > GDA...@li... > > http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list > > > > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list > |