slab-vertices ( slab -- av at ac bv bt bc cv ct cc dv dt dc )


Vocabulary
papier.render

Inputs
slaban object


Outputs
avan object
atan object
acan object
bvan object
btan object
bcan object
cvan object
ctan object
ccan object
dvan object
dtan object
dcan object


Definition


: slab-vertices
( slab -- av at ac bv bt bc cv ct cc dv dt dc )
[ matrix>> ] [ [ frame>> ] [ texcoords>> ] bi nth ]
[ color>> ] tri {
[ [ float-4{ -1.0 -1.0 0.0 1.0 } m4.v ] [ ] [ ] tri* ]
[
[ float-4{ 1.0 -1.0 0.0 1.0 } m4.v ]
[ { 2 1 0 3 } vshuffle ] [ ] tri*
]
[
[ float-4{ -1.0 1.0 0.0 1.0 } m4.v ]
[ { 0 3 2 1 } vshuffle ] [ ] tri*
]
[
[ float-4{ 1.0 1.0 0.0 1.0 } m4.v ]
[ { 2 3 0 1 } vshuffle ] [ ] tri*
]
} 3cleave ; inline