TAILIEUCHUNG - Focus On 3D Terrain Programming phần 8

Các bước qua đã được giới thiệu đơn giản để các khái niệm cơ bản của đi lang thang 2,0. Bây giờ chúng ta sẽ tạo ra các xương sống cốt lõi của những gì sắp đến trong các bước trong tương lai. Không giống như các thuật toán "lỗi thời" đi lang thang, đi lang thang dựa trên một xương sống cây kim cương. | 148 7. Wherever You May Roam Figure A texture-mapped and detail-mapped screenshot from demo7_2. Figure The wireframe version of Figure . Step 3 Adding the Backbone Data Structure The past few steps have been simple introductions to the fundamental concepts of ROAM . Now we re going to create the core backbone of what is to come in future steps. Unlike the old-fashioned ROAM algorithm ROAM relies on a diamond tree backbone. Although in concept this is similar to the Binary Triangle Tree that we discussed earlier this chapter implementing it is rather different. Let s try it Diamonds Are a Programmer s Best Friend The base unit for the ROAM implementation is called a diamond. Each diamond in the tree consists of two right isosceles triangles joined on a common base edge. Each triangle also consists of four child triangles but we re getting ahead of ourselves a bit. Let s just analyze the base diamond in Figure . Figure A simple image of the base diamond to be used in the ROAM implementation. See Nothing special. We have a simple diamond composed of two triangles Triangle 1 and Triangle 2 . The diamond s center vertex C in Figure identifies each diamond. Each diamond also contains its squared bounding sphere radius as we discussed in the previous section an error metric its level of resolution how far down in the diamond tree it is and its frustum culling bit flag which we won t need to use until step 4. . Each diamond also contains a series of links as Figure shows. Figure A diamond and its parent child links. As Figure shows the triangle network starts with the same base diamond as that of Figure except that we show the two diamonds below it represented by dotted lines . First let s start with the children. The children c0 c1 c2 and c3 are all the children of the original base diamond from Figure . We then analyze child c1 in more detail showing its parent links p0 p1 p2 and p3 . Parents p0 and p1 are .

Đã 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.