Table of Contents
All tools described in the following are defined in de.grogra.qsm.utils.Library.java and can be loaded with:
import static de.grogra.qsm.utils.Library.*;
Each shoot-based tool is displayed in the Node Toolbar 3d if a shoot is selected.
To change the taxonomy of the tree, a shoot
a can be linked as a child of a shoot
b. During this process the old parent of
a is disconnected and the local
transformation of a is adjusted to keep it
in the same global position.
This function works with apical and lateral children, using
different edge-types to connect a to
b. Apical links are represented by
successor edges and lateral links by branch edges.
This translates the start of a given shoot on the axis of the parent shoot. It is possible to shift either to the top, center, bottom or on the closest possible point on the axis of the parent. The last option does choose the point base on the parent axis not on the parent it self, therefore it is possible that the child is afterwards not attached to the parent (if it is on a position of the axis higher than the length of the parent).
For lateral children an additional shift in the direction of the child is added with the length of the radius of the parent. This is done to attach the child to the surface of the parent rather then the center.
The path between a shoot a and a shoot
b can be smoothed if the path between them
is of only successors and a maximum length of 10 shoots.
The process is replacing all shoots between
a and b with a single
new shoot starting at the end of a and
ending at the start of b. All lateral
children of the replaced shoots are added as children to the
new shoot.
If b is a direct child of
a, a and
b are replaced by a new shoot starting at
the end of the parent of a and ending at
the start of the parent of b. This is not
supported for the root shoot as well as for tip-shoots (with
no children).
A new shoot can be created between a shoot
a and a shoot b ignoring
any previous relation ship between them. The new shoot is a
lateral child of a and replaces the old
parent of b as the new apical parent. The
new shoot start at the end of a and ends at
the start of b.
A shoot can be split into two shoots at a given ratio (0.0-1.0). All lateral children of the original shoot are distributed between the two new shoots based on their location on the axis of the original shoots, to ensure the closest possible connection.
This function replaces the diameter of a shoot with the average diameter of its parent and its successor. If only one of the two exists this diameter is used. If the parent connected as a branch (the node is a lateral child) the parent diameter is only considered half.
Set the local translation of a shoot to 0,0,0. Meaning to the end of the parent.
Turn a shoot into a M turtle step(movement without drawing) to render it invisible and remove its volume and diameter without changing the trend or order of its children.
It it possible to either remove a shoot alone without effecting its children, or to remove the whole sub-tree below it. If the shoot is remove alone its children are added as children to its parent. The remove with sub-tree works identically to pressing the delete key on the keyboard.