Polygon
ABSTRACT
Produces a polygon mesh. Not so important that you have to memorize, but it does come up somewhat often.
PARAMETERS
| vertices | a vector of 3-vectors representing the counter clockwise order of the vertices. |
| vertices | a vector of 3-vectors representing the counter clockwise order of the vertices. |
| normal_hint | a 3-vector representing the normal hint of the mesh, defaults to {0,0,1}. Useful if the polygon is non planar, and you want to provide a hint when the regular normal calculation algorithm is failing. |
| tag | a vector of numbers that is used as the mesh's tag |
| default | an enum branch specifying to use the default coloring scheme, which is a white stroke with no fill |
| stroke | a 4-vector representing the color of the stroke |
| stroke | a 4-vector representing the color of the stroke |
| fill | a 4-vector representing the color of the fill. Note that providing this value will force an uprank |
RETURN
a mesh that contains a polygon according to the specifications
DECLARATION
func Polygon([config] {[main] {vertices}, [normal_hint] {vertices, normal_hint}}, tag, [color] {[default] {}, [stroke] {stroke}, [solid] {stroke, fill}})