net.sourceforge.arbaro.tree
Interface Stem


public interface Stem

The stem interface used from outside the tree generator, e.g. for mesh creation and exporting

Author:
wolfram

Method Summary
 double getBaseRadius()
           
 int getCloneSectionOffset()
           
 long getLeafCount()
           
 double getLength()
           
 int getLevel()
           
 Vector getMaxPoint()
          a vector with the heighest coordinates of the stem
 Vector getMinPoint()
          a vector with the smalles coordinates of the stem
 double getPeakRadius()
           
 Transformation getTransformation()
           
 java.lang.String getTreePosition()
          The position of the stem in the tree. 0.1c2.3 means: fourth twig of the third clone of the second branch growing out of the first (only?)
 boolean isClone()
           
 boolean isSmooth()
           
 java.util.Enumeration sections()
           
 boolean traverseTree(TreeTraversal traversal)
          used with TreeTraversal interface
 

Method Detail

sections

java.util.Enumeration sections()
Returns:
an enumeration of the stems sections

getCloneSectionOffset

int getCloneSectionOffset()
Returns:
an section offset for clones, because uv-Coordinates should be at same coordinates for stems and theire clones

getMinPoint

Vector getMinPoint()
a vector with the smalles coordinates of the stem


getMaxPoint

Vector getMaxPoint()
a vector with the heighest coordinates of the stem


getTreePosition

java.lang.String getTreePosition()
The position of the stem in the tree. 0.1c2.3 means: fourth twig of the third clone of the second branch growing out of the first (only?) trunk

Returns:
The stem position in the tree as a string

getLength

double getLength()
Returns:
the stem length

getBaseRadius

double getBaseRadius()
Returns:
the radius at the stem base

getPeakRadius

double getPeakRadius()
Returns:
the radius at the stem peak

getLevel

int getLevel()
Returns:
the stem level, 0 means it is a trunk

traverseTree

boolean traverseTree(TreeTraversal traversal)
used with TreeTraversal interface

Parameters:
traversal -
Returns:
when false stop traverse tree at this level

getLeafCount

long getLeafCount()
Returns:
the number leaves of the stem

isClone

boolean isClone()
Returns:
true, if this stem is a clone of another stem

isSmooth

boolean isSmooth()
Returns:
this stem should be smoothed, so output normals for Povray meshes

getTransformation

Transformation getTransformation()
Returns:
the transformation of the stem, containing the position vector and the rotation matrix of the stem base