Skip to content.

Navigation

Toolbox

OTL Tree Format

From OpenTree

In OpenTree, a tree is being defined with the help of 3 classes:

Class otTree (Represents one tree)

The otTree class contains a list of all trunks. In addition it does also contain a copy of all leaves since it's often wanted to access all leaves of a tree regardless the stems. This saves us the iteration through all stems and speeds up the library.

Class otStem (Represents one stem)

The otStem class describes a stem. For this, it contains a otSpline3 class which describes the curves of the stem though the room as well as a otSprine class which defines the radius of the stem along the spline.

It contains also a level number which defines the level of subbranch. So the trunk has level 0, the branch from the trunk level 1, the branch from the branch from the trunk level 2 and so on. This is helpful since some childstems are not real substems but just a split of the parent stem. It's not possible to split a spline, so a new stem is needed with the same level number.

Finally, the otStem class contains also a list of all child stems as well as a list of leaves connected to this stem.

Class otLeaf (Represents one leaf)

otLeaf is a rather simple class. It contains the positions and rotation of the leaf as well as the length and width of it.