UVMapped
ABSTRACT
The UVMapped operation maps the position of points in a mesh-tree to UV values based on a provided UV map function.
PARAMETERS
mesh | Represents the mesh-tree containing points with UV coordinates to be mapped. All provided meshes' UV coordinates will undergo mapping. |
root | The root of the mesh-tree, serving as the container for mesh selection. |
tag_predicate(tag) | Determines whether a mesh should be included in the UV mapping based on the provided tag. |
uv_map(point) | A function that defines the mapping for each point's UV coordinates. The function takes a point's position as input (3-vector) and returns new UV values (2-vector). |
RETURN
If the complete mesh set is provided, all meshes' UV coordinates will be individually mapped according to the specified UV map function. The return value is the mesh-tree of all the mapped meshes. However, if only a subset is chosen, the returned value will comprise a mesh-tree of the mapped 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. not UV mapped).
DECLARATION
func UVMapped([mesh_tree] {[full] {mesh}, [tag_pred] {root, tag_predicate(tag)}}, uv_map(point))