Handbook
Glossary
b-rep-face-vertices ( b-rep selected -- vertices count indices )
Vocabulary
gml
.
viewer
Inputs
b-rep
an
object
selected
an
object
Outputs
vertices
an
object
count
an
object
indices
an
object
Definition
USING:
accessors
alien.data
assocs
euler.b-rep
euler.b-rep.triangulation
kernel
math
math.vectors
math.vectors.simd
sequences
sets
specialized-arrays.instances.alien.c-types.ushort
specialized-vectors.instances.alien.c-types.ushort
specialized-vectors.instances.math.vectors.simd.float-4
;
IN:
gml.viewer
::
b-rep-face-vertices
( b-rep selected -- vertices count indices )
float-4-vector{
}
clone
:>
vertices
ushort-vector{
}
clone
:>
indices 0 b-rep
faces>>
[|
count
face |
face selected
face-selected?
:>
selected? face
dup
base-face>>
eq?
[
face
edge>>
face-color
selected?
selected-face-color
neutral-face-color
?
v*
:>
color face
triangulate-face
seq>>
:>
triangles
triangles
members
:>
tri-vertices tri-vertices
>index-hash
:>
vx-indices tri-vertices
[
position>>
double-4>float-4
vertices
push
color vertices
push
]
each
triangles
[
vx-indices
at
count
+
indices
push
]
each
count tri-vertices
length
+
]
[
count
]
if
]
each
:>
total vertices
float-4
>c-array
underlying>>
total indices
ushort-array{
}
like
;