Refilled

ABSTRACT

The Refilled operation involves recoloring all triangles in the mesh, leaving lines and dots untouched. It offers the choice between applying a universal albedo or a linear gradient to the triangles.

REMARK

Linear gradients in the recoloring process don't generally look that good (in particular, they might not actually appear all that linear. I am hoping to fix this process, but be aware of these issues in the meantime).

PARAMETERS
meshRepresents the mesh-tree containing meshes with triangles to be recolored. All provided meshes' triangles will undergo recoloring.
rootThe root of the mesh-tree, serving as the container for mesh selection.
tag_predicate(tag)Determines whether a mesh should be included in the recoloring operation based on the provided tag.
albedoA 4-vector representing the albedo color for the triangles.
start_colorA 4-vector representing the start color for the gradient, used when applying gradient coloring to the triangles.
end_colorA 4-vector representing the end color for the gradient, used when applying gradient coloring to the triangles.
start_vecA 3-vector representing the start position for the gradient, used when applying gradient coloring to the triangles.
end_vecA 3-vector representing the end position for the gradient, used when applying gradient coloring to the triangles.
RETURN

If the complete mesh set is provided, all meshes' triangles will be individually recolored. The return value is the mesh-tree of all the recolored meshes. However, if only a subset is chosen, the returned value will comprise a mesh-tree of the recolored selected meshes, while the unselected meshes will remain unchanged. Crucially, all meshes you didn't select will still be included in the result mesh_tree, but be provided as is (i.e. no recoloring).

DECLARATION
func Refilled([mesh_tree] {[full] {mesh}, [tag_pred] {root, tag_predicate(tag)}}, [color] {[albedo] {albedo}, [gradient] {start_color, end_color, start_vec, end_vec}})