Handbook
Glossary
quad>aos ( x -- y z )
Vocabulary
game
.
models
.
obj
.
private
Inputs
x
a
sequence
Outputs
y
a
sequence
z
a
sequence
Word description
Convert a sequence of vertex, texture and normal indices into two sequences of vertex, texture and normal values. This splits a quad into two triangles.
Definition
USING:
arrays
kernel
sequences
;
IN:
game.models.obj.private
:
quad>aos
( x -- y z )
[
3
head
[
triangle>aos
1array
]
map
]
[
[
2
swap
nth
]
[
3
swap
nth
]
[
0
swap
nth
]
tri
3array
[
triangle>aos
1array
]
map
]
bi
;