org.jscience.biology.lsystems.growing
Class AnimationGroup

java.lang.Object
  extended by org.jscience.biology.lsystems.growing.AnimationGroup
All Implemented Interfaces:
java.lang.Comparable

public class AnimationGroup
extends java.lang.Object
implements java.lang.Comparable

AnimationGroup is made as collection of scaling and translation transformgroups which belong together. Also the start and end times of the animation of this group are stored in here.


Field Summary
 float m_fAge
          The age of the objects.
 float m_fEndTime
          The time when to stop animation
 float m_fStartTime
          The start time of animation of this objects.
 javax.media.j3d.TransformGroup m_tgScale
          The transformgroup which represents the scaling of a shape.
 javax.media.j3d.TransformGroup m_tgTrans
          The transformgroup where to make the translation of the subtree following the scaled element.
 
Constructor Summary
AnimationGroup(float fStartTime, float fEndTime, javax.media.j3d.TransformGroup tgScale)
          Constructor for leafs.
AnimationGroup(float fStartTime, float fEndTime, javax.media.j3d.TransformGroup tgScale, javax.media.j3d.TransformGroup tgTrans)
          Constructor for branches.
 
Method Summary
 int compareTo(java.lang.Object obj)
          Override this method for the comparable interface which is used to sort the list.
 java.lang.String toString()
          Makes a string representation of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_fStartTime

public float m_fStartTime
The start time of animation of this objects.


m_fEndTime

public float m_fEndTime
The time when to stop animation


m_fAge

public float m_fAge
The age of the objects. This is the end time minus the start time.


m_tgScale

public javax.media.j3d.TransformGroup m_tgScale
The transformgroup which represents the scaling of a shape.


m_tgTrans

public javax.media.j3d.TransformGroup m_tgTrans
The transformgroup where to make the translation of the subtree following the scaled element.

Constructor Detail

AnimationGroup

public AnimationGroup(float fStartTime,
                      float fEndTime,
                      javax.media.j3d.TransformGroup tgScale)
Constructor for leafs. Leafs only have a scale transformgroup so this constructor can be used. Also start and end time of animation are needed.

Parameters:
fStartTime - The time when to start the animation.
fEndTime - The time when to stop the animation.
tgScale - The transformgroup of the shape which has to be scaled.

AnimationGroup

public AnimationGroup(float fStartTime,
                      float fEndTime,
                      javax.media.j3d.TransformGroup tgScale,
                      javax.media.j3d.TransformGroup tgTrans)
Constructor for branches. Here you need the transformgroup for the translation as well.

Parameters:
fStartTime - The time when to start the animation.
fEndTime - The time when to stop the animation.
tgScale - The transformgroup of the shape which has to be scaled.
tgTrans - The transformgroup for the translation of the subtree.
Method Detail

compareTo

public int compareTo(java.lang.Object obj)
Override this method for the comparable interface which is used to sort the list.

Specified by:
compareTo in interface java.lang.Comparable
Parameters:
obj - DOCUMENT ME!
Returns:
DOCUMENT ME!

toString

public java.lang.String toString()
Makes a string representation of this object.

Overrides:
toString in class java.lang.Object
Returns:
The string representing this object.