|
||||||||||
| 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()
|
boolean |
equals(java.lang.Object obj)
|
int |
getAge()
|
TreeBranchPart3D |
getBranchPart3D()
|
java.math.BigDecimal |
getEnergy()
Return the sum of leaves energies |
java.lang.Long |
getId()
|
java.util.List<TreeLeaf> |
getLeaves()
|
int |
getNbLeaves()
|
protected TreeLeaf |
getRandomLeafToIncrease()
Returns one random leaf, with max odd to smallest leaf |
TreeBranchPartState |
getState()
|
int |
hashCode()
|
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. |
java.lang.String |
toString()
|
void |
update(java.util.Observable o,
java.lang.Object arg)
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public BasicTreeBranchPart(Universe universe,
TreeBranchPartState state)
| Method Detail |
|---|
public java.lang.Long getId()
getId in interface LivingPartpublic 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 TreeBranchPartpublic TreeBranchPart3D getBranchPart3D()
getBranchPart3D in interface TreeBranchPartpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||