MovedToSide
ABSTRACT
The MovedToSide operation moves the provided meshes in the mesh-tree to a specified edge or corner on screen. NOTE: this function currently assumes that the camera is in the initial state.
PARAMETERS
mesh | Represents the mesh-tree containing meshes to be moved. All provided meshes will undergo the movement operation. |
root | The root of the mesh-tree, serving as the container for mesh selection. |
tag_predicate(tag) | Determines whether a mesh should be moved based on the provided tag. |
dir | A 3D vector indicating the direction in which the meshes will be moved. If the x is positive, then it will be moved to the right side, if it's negative than the left. If the y is positive, then it will be moved to the top, and otherwise to the bottom. the z is currently unused. |
RETURN
If the complete mesh set is provided, all meshes will be individually moved to the specified direction. The return value is the mesh-tree of all the moved meshes. However, if only a subset is chosen, the returned value will comprise a mesh-tree of the selected meshes moved to the specified direction, 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., without being moved).
DECLARATION
func MovedToSide([mesh_tree] {[full] {mesh}, [tag_pred] {root, tag_predicate(tag)}}, dir)