Bagian aktif Geometry
19. Collections
Status dokumen: Normative
Collection adalah kumpulan object runtime.
Collection berbeda dengan array.
19.1 Array
Array adalah data statis.
constants:
values:
- 1
- 2
- 3
19.2 Collection
Collection adalah kumpulan object hasil runtime.
Contoh sumber collection:
repeat
divide
multi-result boolean
multi-result intersection
19.3 Collection Access
derived:
firstCenter: holes[0].center
19.4 Collection Functions
count
count(holes)
Menghasilkan:
number
first
first(holes)
Menghasilkan object pertama.
last
last(holes)
Menghasilkan object terakhir.
19.5 Collection Ordering
Collection wajib memiliki urutan yang stabil.
Input yang sama harus menghasilkan urutan collection yang sama.
Hal ini diperlukan untuk:
- repeat identity
- deterministic intersection
- collection indexing
- reproducible rendering