jvx.geom

## Class PwRefinePolygon

- java.lang.Object
- - jv.object.PsObject
  - - jvx.project.PjWorkshop
    - - jvx.geom.PwRefinePolygon

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

      public class PwRefinePolygon
      extends PjWorkshop

  Class to refine or coarsen a PgPolygon
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `COARSEN_CHAIKIN`
    `static int` | `COARSEN_DFH`
    `static int` | `COARSEN_DLG`
    `static int` | `COARSEN_LINEAR`
    `static int` | `REFINE_CHAIKIN`
    `static int` | `REFINE_DFH`
    `static int` | `REFINE_DLG`
    `static int` | `REFINE_LINEAR`

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

    - ### Fields inherited from interface jv.project.PjWorkshopIf

      `MODE_BUG, MODE_STANDARD, MODE_VALIDATE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PwRefinePolygon()` Constructor

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addSequenceEntry(int entry)` Store a new refinement step to the refinement sequence.
    `void` | `close()` Remove the control polygon from the display and destroy this workshop.
    `static void` | `coarsenChaikin(PgPolygon poly)` Coarsen a PgPolygon global by a reversed Chaikin algorithm.
    `static void` | `coarsenChaikin(PgPolygonSet polySet)` Coarsen a PgPolygonSet global by a reversed Chaikin algorithm.
    `static void` | `coarsenDFH(PgPolygon poly)` Coarsen a PgPolygon global by a reversed DFH algorithm.
    `static void` | `coarsenDFH(PgPolygonSet polySet)` Coarsen a PgPolygonSet global by a reversed Chaikin algorithm.
    `static void` | `coarsenDLG(PgPolygon poly)` Coarsen a PgPolygon by removing every second vertex.
    `static void` | `coarsenDLG(PgPolygonSet polySet)` Coarsen a PgPolygonSet by removing every second vertex.
    `static void` | `coarsenLinear(PgPolygon poly)` Coarsen a PgPolygon by removing every second vertex.
    `static void` | `coarsenLinear(PgPolygonSet polySet)` Coarsen a PgPolygonSet by removing every second vertex.
    `static PdVector` | `getFourPointMask()` Return mask vector for Dyn, Floater, Hormann new four point scheme.
    `static PdVector` | `getFourPointMask(double tension)` Return mask vector for Dyn, Floater, Hormann new four point scheme.
    `boolean` | `isShowingControlGrid()` Checks if control grid of polygon is visible.
    `static void` | `refineChaikin(PgPolygon poly)` Refine a PgPolygon globally by Chaikin's algorithm.
    `static void` | `refineChaikin(PgPolygonSet polySet)` Refine a PgPolygonSet globally by Chaikin's algorithm.
    `static void` | `refineDFH(PgPolygon poly, PdVector weight)` Refine a PgPolygon globally by a 2n-point rule.
    `static void` | `refineDFH(PgPolygonSet polySet, PdVector weight)` Refine a PgPolygon globally by a 2n-point rule.
    `static void` | `refineDLG(PgPolygon poly)` Refine a PgPolygon globally by DLG scheme.
    `static void` | `refineDLG(PgPolygonSet polySet)` Refine a PgPolygonSet globally by DLG scheme.
    `static void` | `refineLinear(PgPolygon poly)` Refine a PgPolygon globally by inserting edge midpoints.
    `static void` | `refineLinear(PgPolygonSet polySet)` Refine a PgPolygonSet globally by inserting edge mid points.
    `void` | `reset()` Remove all previously done refining and and coarsening and set the workshop to its initial status.
    `void` | `sequenceRefine()` Recompute all refinement steps.
    `void` | `setGeometry(PgPolygon geom)` Assign a geometry on which this workshop operates, and create two backup copies: One for canceling and one to be used as control polygon for the refined geometry.
    `void` | `setGeometry(PgPolygonSet geom)` Assign a geometry on which this workshop operates, and create two backup copies: One for canceling and one to be used as control polygonSet for the refined geometry.
    `void` | `showControlGrid(boolean bShow)` Set the control polygon visible or invisible in the display.
    `boolean` | `update(java.lang.Object event)` Update the class whenever a child has changed.

    - ### Methods inherited from class jvx.project.PjWorkshop

      `cancel, getDisplay, getDisplays, getGeometry, getMode, getSavedGeometry, getViewer, init, isModal, isStandalone, ok, removeGeometry, setDisplay, setDisplays, setGeometry, setModal, setMode, setStandalone, setViewer`

    - ### 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.object.PsUpdateIf

      `getFather, getName, setParent`

- - ### Field Detail

    - #### REFINE_DLG

          public static final int REFINE_DLG

      See Also:
        Constant Field Values

    - #### COARSEN_DLG

          public static final int COARSEN_DLG

      See Also:
        Constant Field Values

    - #### REFINE_CHAIKIN

          public static final int REFINE_CHAIKIN

      See Also:
        Constant Field Values

    - #### COARSEN_CHAIKIN

          public static final int COARSEN_CHAIKIN

      See Also:
        Constant Field Values

    - #### REFINE_LINEAR

          public static final int REFINE_LINEAR

      See Also:
        Constant Field Values

    - #### COARSEN_LINEAR

          public static final int COARSEN_LINEAR

      See Also:
        Constant Field Values

    - #### REFINE_DFH

          public static final int REFINE_DFH

      See Also:
        Constant Field Values

    - #### COARSEN_DFH

          public static final int COARSEN_DFH

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### PwRefinePolygon

          public PwRefinePolygon()

      Constructor

  - ### Method Detail

    - #### setGeometry

          public void setGeometry(PgPolygon geom)

      Assign a geometry on which this workshop operates, and create two backup copies: One for canceling and one to be used as control polygon for the refined geometry.

    - #### setGeometry

          public void setGeometry(PgPolygonSet geom)

      Assign a geometry on which this workshop operates, and create two backup copies: One for canceling and one to be used as control polygonSet for the refined geometry.

    - #### 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 `PjWorkshop`
      Parameters:
        `event` - sender of this update.
      Returns:
        true if update was correctly handled by superclass.
      See Also:
        `PsObject.setParent(PsUpdateIf)`, `PsObject.getFather()`, `PsObject.addUpdateListener(PsUpdateIf)`

    - #### reset

          public void reset()

      Remove all previously done refining and and coarsening and set the workshop to its initial status.
      Overrides:
        `reset` in class `PjWorkshop`

    - #### isShowingControlGrid

          public boolean isShowingControlGrid()

      Checks if control grid of polygon is visible. By default, control grid is not visible.

    - #### showControlGrid

          public void showControlGrid(boolean bShow)

      Set the control polygon visible or invisible in the display.

    - #### close

          public void close()

      Remove the control polygon from the display and destroy this workshop.
      Overrides:
        `close` in class `PjWorkshop`

    - #### addSequenceEntry

          public void addSequenceEntry(int entry)

      Store a new refinement step to the refinement sequence.

    - #### sequenceRefine

          public void sequenceRefine()

      Recompute all refinement steps.

    - #### getFourPointMask

          public static PdVector getFourPointMask()

      Return mask vector for Dyn, Floater, Hormann new four point scheme.

    - #### getFourPointMask

          public static PdVector getFourPointMask(double tension)

      Return mask vector for Dyn, Floater, Hormann new four point scheme.

    - #### refineLinear

          public static void refineLinear(PgPolygon poly)

      Refine a PgPolygon globally by inserting edge midpoints.

    - #### refineDLG

          public static void refineDLG(PgPolygon poly)

      Refine a PgPolygon globally by DLG scheme. Afterwards the polygon will have twice as much vertices, the vertices v(i) at even indices are the original vertices of the polygon, the vertices at odd indices are blended from the next two vertices in both directions by 1/16(-v(i-1) + 9v(i) + 9v(i+1) - v(i+2)).

    - #### coarsenDLG

          public static void coarsenDLG(PgPolygon poly)

      Coarsen a PgPolygon by removing every second vertex. This is the reverse algorithm for interpolating refinement algorithms.

    - #### coarsenLinear

          public static void coarsenLinear(PgPolygon poly)

      Coarsen a PgPolygon by removing every second vertex. This is the reverse algorithm for interpolating refinement algorithms.

    - #### refineChaikin

          public static void refineChaikin(PgPolygon poly)

      Refine a PgPolygon globally by Chaikin's algorithm. On each edge of the polygon two vertices of the refined polygon will be computed at 1/4 and 3/4 length.

    - #### coarsenChaikin

          public static void coarsenChaikin(PgPolygon poly)

      Coarsen a PgPolygon global by a reversed Chaikin algorithm. Each vertex of the coarsened polygon gets blended from two of the extrapolated ancestor vertices of the edges v(i-2) to v(i-1) and v(i) to v(i+1).

    - #### refineDFH

          public static void refineDFH(PgPolygon poly,
                       PdVector weight)

      Refine a PgPolygon globally by a 2n-point rule. An example for n=1 is Chaikin's algorithm, for n=2 there is an one-parameter class of rules given by a paper of N. Dyn, M.S. Floater and K. Hormann.

    - #### coarsenDFH

          public static void coarsenDFH(PgPolygon poly)

      Coarsen a PgPolygon global by a reversed DFH algorithm. Each vertex of the coarsened polygon gets blended from two of the extrapolated ancestor vertices of the edges v(i-2) to v(i-1) and v(i) to v(i+1).

    - #### refineLinear

          public static void refineLinear(PgPolygonSet polySet)

      Refine a PgPolygonSet globally by inserting edge mid points.

    - #### refineDLG

          public static void refineDLG(PgPolygonSet polySet)

      Refine a PgPolygonSet globally by DLG scheme. Afterwards the polygon will have twice as much vertices, the vertices v(i) at even indices are the original vertices of the polygon, the vertices at odd indices are blended from the next two vertices in both directions by 1/16(-v(i-1) + 9v(i) + 9v(i+1) - v(i+2)).

    - #### coarsenDLG

          public static void coarsenDLG(PgPolygonSet polySet)

      Coarsen a PgPolygonSet by removing every second vertex. This is the reverse algorithm for interpolating refinement algorithms.

    - #### coarsenLinear

          public static void coarsenLinear(PgPolygonSet polySet)

      Coarsen a PgPolygonSet by removing every second vertex. This is the reverse algorithm for interpolating refinement algorithms.

    - #### refineChaikin

          public static void refineChaikin(PgPolygonSet polySet)

      Refine a PgPolygonSet globally by Chaikin's algorithm. On each edge of the polygon two vertices of the refined polygon will be computed at 1/4 and 3/4 length.

    - #### coarsenChaikin

          public static void coarsenChaikin(PgPolygonSet polySet)

      Coarsen a PgPolygonSet global by a reversed Chaikin algorithm. Each vertex of the coarsened polygon gets blended from two of the extrapolated ancestor vertices of the edges v(i-2) to v(i-1) and v(i) to v(i+1).

    - #### refineDFH

          public static void refineDFH(PgPolygonSet polySet,
                       PdVector weight)

      Refine a PgPolygon globally by a 2n-point rule. An example for n=1 is Chaikin's algorithm, for n=2 there is an one-parameter class of rules given by a paper of N. Dyn, M.S. Floater and K. Hormann.

    - #### coarsenDFH

          public static void coarsenDFH(PgPolygonSet polySet)

      Coarsen a PgPolygonSet global by a reversed Chaikin algorithm. Each vertex of the coarsened polygon gets blended from two of the extrapolated ancestor vertices of the edges v(i-2) to v(i-1) and v(i) to v(i+1).

"

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