, , . , .
:
- 3D- . X .
- [x, y, z], .
- , (x, y, z), NULL
- , , .
- ? , , (5.5, 8.2, 9.1) MyCubes [5,8,9], , X ( ) 1. . / , .
- , . : MyCubes [5,8,9] == NULL ( ) ( , , , )
, .
, , ?
-, Grid-Cube (5,8,9) .
If MyHashTable.contains({5,8,9}) then DoNothing else InsertCurrentVertex(...)
( . ? , /, .contains HashTable ( )
, !
, , . X- , , , - ( ).
, ? , ( !).
, , :
If Not ThisCubeIsTaken()
For each SurroundingCube
If not Is_Your_Vertex_Sufficiently_Far_Away_From_Me()
exit_loop_and_outer_if_statement()
end if
Next
//Ok, we got here, we can add the vertex to the current cube because the cube is not only available, but the neighbors are far enough away from me
End If
, , , , , 3D-.
, , , , " , 0,25X" - . , .
, ,
, .
If TheCube is empty OR if ThisVertex is closer to the center of TheCube than the Cube current vertex
InsertVertex (overwrite any existing vertex in the cube
End If
: . .
, .
-
10% , . , , . . , .