game.models.half-edge: additional vertex-diagonals word
parent
84c79879df
commit
0aff35bfee
|
@ -62,5 +62,8 @@ connect-cube-edges
|
||||||
[ { 1 4 2 } ]
|
[ { 1 4 2 } ]
|
||||||
[ cube-edges first vertex-neighbors ] unit-test
|
[ cube-edges first vertex-neighbors ] unit-test
|
||||||
|
|
||||||
|
[ { 3 5 6 } ]
|
||||||
|
[ cube-edges first vertex-diagonals ] unit-test
|
||||||
|
|
||||||
[ { 1 4 3 5 } ]
|
[ { 1 4 3 5 } ]
|
||||||
[ cube-edges first face-neighbors ] unit-test
|
[ cube-edges first face-neighbors ] unit-test
|
||||||
|
|
|
@ -37,6 +37,9 @@ TUPLE: edge < identity-tuple face vertex opposite-edge next-edge ;
|
||||||
: vertex-neighbors ( edge -- edges )
|
: vertex-neighbors ( edge -- edges )
|
||||||
[ opposite-edge>> vertex>> ] [ each-vertex-edge ] (collect) ;
|
[ opposite-edge>> vertex>> ] [ each-vertex-edge ] (collect) ;
|
||||||
|
|
||||||
|
: vertex-diagonals ( edge -- edges )
|
||||||
|
[ next-edge>> opposite-edge>> vertex>> ] [ each-vertex-edge ] (collect) ;
|
||||||
|
|
||||||
: vertex-valence ( edge -- count )
|
: vertex-valence ( edge -- count )
|
||||||
[ each-vertex-edge ] (count) ;
|
[ each-vertex-edge ] (count) ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue