[Algorithms] Polygon clipping
Brought to you by:
vexxed72
From: Klaus H. <k_h...@os...> - 2000-07-25 22:52:31
|
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 |