net.sourceforge.arbaro.tree
Interface Tree

All Known Implementing Classes:
PreviewTree

public interface Tree

The tree interface to access a tree from outside of this package

Author:
wolfram

Method Summary
 double getHeight()
           
 long getLeafCount()
           
 double getLeafLength()
           
 java.lang.String getLeafShape()
           
 double getLeafStemLength()
           
 double getLeafWidth()
           
 int getLevels()
           
 Vector getMaxPoint()
           
 Vector getMinPoint()
           
 int getSeed()
           
 java.lang.String getSpecies()
           
 long getStemCount()
           
 java.lang.String getVertexInfo(int level)
          Use this for verbose output when generating a mesh or exporting a tree
 double getWidth()
           
 void paramsToXML(java.io.PrintWriter w)
          Writes the trees parameters to a stream
 boolean traverseTree(TreeTraversal traversal)
          used with the TreeTraversal interface
 

Method Detail

traverseTree

boolean traverseTree(TreeTraversal traversal)
used with the TreeTraversal interface

Parameters:
traversal -
Returns:
when false stop travers the tree

getStemCount

long getStemCount()
Returns:
the number of all stems of all levels of the tree

getLeafCount

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

getMaxPoint

Vector getMaxPoint()
Returns:
a vector with the highest coordinates of the tree. (Considering all stems of all levels)

getMinPoint

Vector getMinPoint()
Returns:
a vector with the lowest coordinates of the tree. (Considering all stems of all levels)

getSeed

int getSeed()
Returns:
the seed of the tree. It is used for randomnization.

getHeight

double getHeight()
Returns:
the height of the tree (highest z-coordinate)

getWidth

double getWidth()
Returns:
the widht of the tree (highest value of sqrt(x*x+y*y))

paramsToXML

void paramsToXML(java.io.PrintWriter w)
Writes the trees parameters to a stream

Parameters:
w -

getSpecies

java.lang.String getSpecies()
Returns:
the tree species name

getLevels

int getLevels()
Returns:
the tree stem levels

getLeafShape

java.lang.String getLeafShape()
Returns:
the leaf shape name

getLeafWidth

double getLeafWidth()
Returns:
the leaf width

getLeafLength

double getLeafLength()
Returns:
the leaf length

getLeafStemLength

double getLeafStemLength()
Returns:
the virtual leaf stem length, i.e. the distance of the leaf from the stem center line

getVertexInfo

java.lang.String getVertexInfo(int level)
Use this for verbose output when generating a mesh or exporting a tree

Parameters:
level -
Returns:
an information string with the number of section points for this stem level and if smoothing should be used