TAILIEUCHUNG - Advanced Graphics Programming Techniques Using OpenGL P2

A fairly simple method of converting a model into triangle strips is sometimes known as greedy of the early greedy algorithms was developed for IRIS GL which allowed swapping of vertices to create direction changes to the facet with the least neighbors. | Greedy Tri-stripping A fairly simple method of converting a model into triangle strips is sometimes known as greedy tristripping. One of the early greedy algorithms was developed for IRIS GL which allowed swapping of vertices to create direction changes to the facet with the least neighbors. However with OpenGL the only way to get the equivalent behavior of swapping vertices is to repeat a vertex and create a degenerate triangle which is much more expensive than the original vertex swap operation. For OpenGL a better algorithm is to choose a polygon convert it to triangles then continue onto the neighboring polygon from the last edge of the previous polygon. For a given starting polygon beginning at a given edge there are no choices as to which polygon is the best to choose next since there is only one choice. The strip is continued until the triangle strip runs off the edge of the model or runs into a polygon that is already a part of another strip see Figure 11 . For best results pick a polygon and go both directions as far as possible then start the triangle strip from one end. A triangle strip should not cross a hard edge unless the vertices on that edge are repeated redundantly since you ll want different normals for the two triangles on either side of that edge. Once one strip is complete the best polygon to choose for the next strip is often a neighbor to the polygon at one end or the other of the previous strip. More advanced triangulation methods don t try to keep all triangles of a polygon together. For more information on such a method refer to 17 . Capping Clipped Solids with the Stencil Buffer When dealing with solid objects it is often useful to clip the object against a plane and observe the cross section. OpenGL s user-defined clipping planes allow an application to clip the scene by a plane. The stencil buffer provides an easy method for adding a cap to objects that are intersected by the clipping plane. A capping polygon is embedded in .

TỪ KHÓA LIÊN QUAN
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.