logo


rendered3D
Class Tree3D

java.lang.Object
  extended by rendered3D.Tree3D

public class Tree3D
extends java.lang.Object


Field Summary
 boolean fancy_graphics
          fancy ( slow ) draw or fast ( ugly ) draw ?
 TreeForm[] form
          Pattern for generating the tree
 int initial_color
          The initial color of the tree
 java.awt.Point location
          The x,y location of the base of the trunk of the tree
 float[][] root
          {float[] start, float[] end} points of the root
 float[][] X
          The Post-rendering transformations applied during drawing, transformations applied like : [Y][X][Z][S], Y should be a Y axis rotation X "" Z "" S should be a scaling transformation
 float[][] Y
          The Post-rendering transformations applied during drawing, transformations applied like : [Y][X][Z][S], Y should be a Y axis rotation X "" Z "" S should be a scaling transformation
 
Constructor Summary
Tree3D(int min_tree_depth, int max_tree_depth, float[][] tree_root, int tree_color, TreeForm[] tree_form, java.awt.Point tree_location, DoubleBuffer b)
          Creates a new instance of FastTree
 
Method Summary
 boolean is_active()
          Returns weather the tree is active
static float[] multiply_3x3_point(float[][] A, float[] P)
          Matrix multiplication simplified for linear transformation of low percision 3D points of small value
static float[] multiply_3x3_point(float[][] A, float[] P, float[] result)
          Matrix multiplication simplified for linear transformation of low percision 3D points of small value
 void render()
          re-render the tree with a new tree form by applying the tree form transformations to this data set, rather than recursing through the tree and recalculating all the branching angles
static float[] scale_point(float[] P, double dr)
 void set_active(boolean a)
          This sets weather the tree is active or not.
 void set_fancy_graphics(boolean anti_alias_tree)
 int set_initial_color(int col)
 boolean toggle_fancy_graphics()
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

root

public float[][] root
{float[] start, float[] end} points of the root


initial_color

public int initial_color
The initial color of the tree


form

public TreeForm[] form
Pattern for generating the tree


location

public java.awt.Point location
The x,y location of the base of the trunk of the tree


X

public float[][] X
The Post-rendering transformations applied during drawing, transformations applied like : [Y][X][Z][S], Y should be a Y axis rotation X "" Z "" S should be a scaling transformation


Y

public float[][] Y
The Post-rendering transformations applied during drawing, transformations applied like : [Y][X][Z][S], Y should be a Y axis rotation X "" Z "" S should be a scaling transformation


fancy_graphics

public boolean fancy_graphics
fancy ( slow ) draw or fast ( ugly ) draw ?

Constructor Detail

Tree3D

public Tree3D(int min_tree_depth,
              int max_tree_depth,
              float[][] tree_root,
              int tree_color,
              TreeForm[] tree_form,
              java.awt.Point tree_location,
              DoubleBuffer b)
Creates a new instance of FastTree

Parameters:
min_tree_depth -
max_tree_depth -
b -
tree_root -
tree_form -
tree_color -
tree_location -
Method Detail

set_active

public void set_active(boolean a)
This sets weather the tree is active or not. An inactive tree does not draw to the screen or respond to mouse events

Parameters:
a -

is_active

public boolean is_active()
Returns weather the tree is active

Returns:

toggle_fancy_graphics

public boolean toggle_fancy_graphics()
Returns:

set_fancy_graphics

public void set_fancy_graphics(boolean anti_alias_tree)
Parameters:
anti_alias_tree -

render

public void render()
re-render the tree with a new tree form by applying the tree form transformations to this data set, rather than recursing through the tree and recalculating all the branching angles


set_initial_color

public int set_initial_color(int col)
Parameters:
col -
Returns:

multiply_3x3_point

public static float[] multiply_3x3_point(float[][] A,
                                         float[] P)
Matrix multiplication simplified for linear transformation of low percision 3D points of small value

Parameters:
A -
P -
Returns:

multiply_3x3_point

public static float[] multiply_3x3_point(float[][] A,
                                         float[] P,
                                         float[] result)
Matrix multiplication simplified for linear transformation of low percision 3D points of small value

Parameters:
A -
P -
result -
Returns:

scale_point

public static float[] scale_point(float[] P,
                                  double dr)
Parameters:
P -
dr -
Returns: