|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbarsuift.simLife.tree.BasicTreeBranchPart
public class BasicTreeBranchPart
| Constructor Summary | |
|---|---|
BasicTreeBranchPart(Universe universe,
TreeBranchPartState state)
|
|
| Method Summary | |
|---|---|
protected boolean |
canCreateOneNewLeaf()
|
protected boolean |
canIncreaseOneLeafSize()
|
java.math.BigDecimal |
collectFreeEnergy()
|
protected javax.vecmath.Point3d |
computeAttachPointForNewLeaf()
|
protected void |
createOneNewLeaf()
|
int |
getAge()
|
TreeBranchPart3D |
getBranchPart3D()
|
java.math.BigDecimal |
getEnergy()
|
java.util.List<TreeLeaf> |
getLeaves()
|
int |
getNbLeaves()
|
protected TreeLeaf |
getRandomLeafToIncrease()
Returns one random leaf, with max odd to smallest leaf |
TreeBranchPartState |
getState()
|
protected void |
increaseOneLeafSize()
|
protected boolean |
shouldCreateOneNewLeaf()
Test if we should create a new leaf or not. |
protected boolean |
shouldIncreaseOneLeafSize()
Test if we should increase a leaf size or not. |
void |
spendTime()
Make all leaves spend time. |
void |
synchronize()
|
void |
update(java.util.Observable o,
java.lang.Object arg)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BasicTreeBranchPart(Universe universe,
TreeBranchPartState state)
| Method Detail |
|---|
public int getAge()
getAge in interface LivingPartpublic void spendTime()
spendTime in interface LivingPartprotected void increaseOneLeafSize()
protected TreeLeaf getRandomLeafToIncrease()
protected boolean canIncreaseOneLeafSize()
protected boolean shouldIncreaseOneLeafSize()
protected boolean canCreateOneNewLeaf()
protected boolean shouldCreateOneNewLeaf()
protected void createOneNewLeaf()
protected javax.vecmath.Point3d computeAttachPointForNewLeaf()
public java.math.BigDecimal getEnergy()
getEnergy in interface TreeBranchPartpublic java.math.BigDecimal collectFreeEnergy()
collectFreeEnergy in interface TreeBranchPartpublic int getNbLeaves()
getNbLeaves in interface TreeBranchPartpublic java.util.List<TreeLeaf> getLeaves()
getLeaves in interface TreeBranchPart
public void update(java.util.Observable o,
java.lang.Object arg)
update in interface java.util.Observerpublic TreeBranchPartState getState()
getState in interface Persistent<State>public void synchronize()
synchronize in interface Persistent<State>public TreeBranchPart3D getBranchPart3D()
getBranchPart3D in interface TreeBranchPart
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||