vgp.iterate.pythagoreanTree

## Class PjPythagoreanTree

- java.lang.Object
- - jv.object.PsObject
  - - jv.project.PjProject
    - - vgp.iterate.pythagoreanTree.PjPythagoreanTree

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, PsTimeListenerIf, PsUpdateIf, PvPickListenerIf

      public class PjPythagoreanTree
      extends PjProject

  Computes a Pythagorean tree which is recursively generated from a simple trunk.
  Since:
    JavaView 3.95
  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class jv.object.PsObject

      `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 Summary

    Constructors
    Constructor and Description
    `PjPythagoreanTree()` Creates a new instance of PjPythagoreanTree

  - ### Method Summary

    Methods
    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.

    - ### Methods inherited from class jv.project.PjProject

      `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, unmarkVertices`

    - ### Methods inherited from class jv.object.PsObject

      `addInspector, 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, updatePanels`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface jv.anim.PsTimeListenerIf

      `getName`

    - ### Methods inherited from interface jv.project.PvPickListenerIf

      `getName`

- - ### Constructor Detail

    - #### PjPythagoreanTree

          public PjPythagoreanTree()

      Creates a new instance of PjPythagoreanTree

  - ### Method Detail

    - #### init

          public void init()

      Initialization.
      Overrides:
        `init` in class `PjProject`

    - #### start

          public void start()

      Initializes display, geometries.
      Overrides:
        `start` in class `PjProject`
      See Also:
        `PvViewerIf.start()`, `PjProject.isEnabledAutoFit()`

    - #### reset

          public void reset()

      Reset project to initial state by calling project.init(). Must call project.update(project) after calling reset().

    - #### update

          public boolean update(java.lang.Object event)

      Update the class whenever a child has changed. Method is usually invoked from the children.
      Specified by:
        `update` in interface `PsUpdateIf`
      Overrides:
        `update` in class `PsObject`
      Parameters:
        `event` - carries a lot of information
      Returns:
        true if event has been handled, otherwise false
      See Also:
        `PsObject.setParent(PsUpdateIf)`, `PsObject.getFather()`, `PsObject.addUpdateListener(PsUpdateIf)`

    - #### pickVertex

          public void pickVertex(PgGeometryIf geom,
                        int picked,
                        PdVector pickedVertex)

      Drags a picked vertex of m_trunk.
      Specified by:
        `pickVertex` in interface `PvPickListenerIf`
      Overrides:
        `pickVertex` in class `PjProject`
      Parameters:
        `geom` - Picked geometry on which vertex lies
        `picked` - Index of picked vertex in vertex array of geometry
        `pickedVertex` - 3d coordinates of vertex position
      See Also:
        `PvPickListenerIf`

    - #### getAge

          public int getAge()

      Returns the age of the tree which is the number of consecutive branches.
      Returns:
        the age of the tree.

    - #### setAge

          public void setAge(int age)

      Sets the age of the tree which is the number of consecutive branches. Main allocation method, allocates tree element set.
      Parameters:
        `age` - New age of the tree.

    - #### isEnabledRightTriangle

          public boolean isEnabledRightTriangle()

      Returns true if the triangle above trunk is kept right.
      Returns:
        `true` if the triangle is kept right.

    - #### setEnabledRightTriangle

          public void setEnabledRightTriangle(boolean bRightTriangle)

      Determines if the triangle above trunk is a right triangle.
      Parameters:
        `bRightTriangle` - use right triangle above trunk

    - #### isEnabledSquareTrunk

          public boolean isEnabledSquareTrunk()

      Returns true if the trunk is kept square.
      Returns:
        `true` if the rectangle is kept square.

    - #### setEnabledSquareTrunk

          public void setEnabledSquareTrunk(boolean bSquareTrunk)

      Determines if the trunk should be a square.
      Parameters:
        `bSquareTrunk` - use square trunk

"

The software JavaView? is copyright protected. All Rights Reserved.
"