public class PjPythagoreanTree extends PjProject
HAS_BOUNDARY_PANEL, HAS_CONFIG_PANEL, HAS_INFO_PANEL, HAS_LABEL_PANEL, HAS_MATERIAL_PANEL, HAS_TEXTURE_PANEL, HAS_VECTOR_PANEL, INSPECTOR_INFO, INSPECTOR_INFO_EXT, IS_DELETED, IS_FIXED, IS_FOCUSSED, IS_PICKED, IS_SELECTED, IS_USED, NUM_TAGS| Constructor and Description |
|---|
PjPythagoreanTree()
Creates a new instance of PjPythagoreanTree
|
| Modifier and Type | Method and Description |
|---|---|
int |
getAge()
Returns the age of the tree which is the number of consecutive branches.
|
void |
init()
Initialization.
|
boolean |
isEnabledRightTriangle()
Returns true if the triangle above trunk is kept right.
|
boolean |
isEnabledSquareTrunk()
Returns true if the trunk is kept square.
|
void |
pickVertex(PgGeometryIf geom,
int picked,
PdVector pickedVertex)
Drags a picked vertex of m_trunk.
|
void |
reset()
Reset project to initial state by calling project.init().
|
void |
setAge(int age)
Sets the age of the tree which is the number of consecutive branches.
|
void |
setEnabledRightTriangle(boolean bRightTriangle)
Determines if the triangle above trunk is a right triangle.
|
void |
setEnabledSquareTrunk(boolean bSquareTrunk)
Determines if the trunk should be a square.
|
void |
start()
Initializes display, geometries.
|
boolean |
update(java.lang.Object event)
Update the class whenever a child has changed.
|
addDisplay, addGeometry, addGeometry, dispose, dragDisplay, dragInitial, dragVertex, fitDisplays, getAnimation, getDisplay, getDisplays, getGeometry, getGeometry, getNumGeometries, getParameter, getViewer, hasAnimation, hasDisplay, isEnabledAutoFit, markVertices, pickDisplay, pickInitial, removeDisplay, removeGeometries, removeGeometry, selectDisplay, selectGeometry, setAnimation, setBackColor, setBorderType, setDisplay, setEnabledAutoFit, setGeometry, setParameter, setTime, setViewer, stop, unmarkVerticesaddInspector, addUpdateListener, assureInspector, clearTag, clone, clone, clone, copy, getFather, getInfoPanel, getInspector, getName, getNumObjects, getSymbol, hasInspector, hasTag, hasUpdateListener, instanceOf, instanceOf, newInspector, newInspector, removeInspector, removeInspector, removeUpdateListener, setName, setParent, setSymbol, setTag, toString, updatePanelsequals, getClass, hashCode, notify, notifyAll, wait, wait, waitgetNamegetNamepublic PjPythagoreanTree()
public void start()
start in class PjProjectPvViewerIf.start(),
PjProject.isEnabledAutoFit()public void reset()
public boolean update(java.lang.Object event)
update in interface PsUpdateIfupdate in class PsObjectevent - carries a lot of informationPsObject.setParent(PsUpdateIf),
PsObject.getFather(),
PsObject.addUpdateListener(PsUpdateIf)public void pickVertex(PgGeometryIf geom, int picked, PdVector pickedVertex)
pickVertex in interface PvPickListenerIfpickVertex in class PjProjectgeom - Picked geometry on which vertex liespicked - Index of picked vertex in vertex array of geometrypickedVertex - 3d coordinates of vertex positionPvPickListenerIfpublic int getAge()
public void setAge(int age)
age - New age of the tree.public boolean isEnabledRightTriangle()
true if the triangle is kept right.public void setEnabledRightTriangle(boolean bRightTriangle)
bRightTriangle - use right triangle above trunkpublic boolean isEnabledSquareTrunk()
true if the rectangle is kept square.public void setEnabledSquareTrunk(boolean bSquareTrunk)
bSquareTrunk - use square trunk"