jvx.vector

## Class PwIntegralLineSet

- java.lang.Object
- - jv.object.PsObject
  - - jvx.project.PjWorkshop
    - - jvx.vector.PwIntegralLineSet

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

      public class PwIntegralLineSet
      extends PjWorkshop

  Compute a whole set of integral lines of a given vector field on a triangulated surface for visualization purposes.

  Assign a surface by `setGeometry(PgGeometry)` and a display where the calculated integral lines will show up by `setDisplay(PvDisplayIf)` (if you wish that behaviour) and compute the integral lines (`makeIntegralLines()`). Various parameters may be configured.

  Use method `getInfoPanel()` to get a control panel for parameters `step size`, `number of steps` and `index of vector field`.

  An action event is fired whenever integral line computation that had been invoked from the info panel is completed.

  Of course you may also use the static method that computes the integral lines direcly (`makeIntegralLines(PgElementSet,PgVectorField,PgPolygonSet,double,int)`.

  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`

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

      `MODE_BUG, MODE_STANDARD, MODE_VALIDATE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PwIntegralLineSet()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addActionListener(java.awt.event.ActionListener listener)` An action event is fired whenever integral line computation that had been invoked from the info panel is completed.
    `void` | `cancel()` Removes previously comuted integral lines from display and invokes the same method of super-class.
    `boolean` | `getBackwardIntegration()` Whether integral lines are computed in negative direction as well.
    `boolean` | `getFast()` Whether euler-integration is used (true) or a 4th order runge kutta method (false).
    `boolean` | `getIgnoreDirection()` Whether the direction of vertex based vector fields is ignored, i.e.
    `PgPolygonSet` | `getIntegralLines()` Get the polygon set instance which is updated by method `makeIntegralLines`.
    `boolean` | `getLimitNumLinesPerElement()` Whether integral lines should stop when they reach a face with a number of passing integral lines that exceeds a given number.
    `int` | `getMaxNumLinesPerElement()` Gets the maximal number of integral lines that may pass through one face.
    `int` | `getNumSteps()` Get the number of steps that will be used for integration in `makeIntegralLines()`.
    `double` | `getStepSize()` Get step size used for integration in `makeIntegralLines()`.
    `int` | `getVectorFieldIndex()` Get index of the vector field that will be integrated when using `makeIntegralLines()`.
    `void` | `init()` Initializes by setting all parameters to initial values and removing computed integral lines.
    `void` | `makeIntegralLines()` Compute a set of integral lines, each beginning at the center of an element.
    `static PgPolygonSet` | `makeIntegralLines(PgElementSet geom, PgVectorField vec, PgPolygonSet out, double stepsize, int numSteps)` Static method that computes a set of integral lines on the given geometry of the given vector field.
    `static PgPolygonSet` | `makeIntegralLines(PgElementSet geom, PgVectorField vec, PgPolygonSet out, double stepsize, int numSteps, int elemStep)` Static method that computes a set of integral lines on the given geometry of the given vector field.
    `static PgPolygonSet` | `makeIntegralLines(PgElementSet geom, PgVectorField vec, PgPolygonSet out, double stepsize, int numSteps, int elemStep, boolean fast, boolean ignoreDir, boolean backward, int maxLinesPerElement, int[] elementCount)` Static method that computes a set of integral lines on the given geometry of the given vector field.
    `void` | `removeActionListener(java.awt.event.ActionListener listener)` An action event is fired whenever integral line computation that had been invoked from the info panel is completed.
    `void` | `removeGeometry()` Removes the reference to the registered element set and removes this as update listener from geometry.
    `void` | `removeIntegralLines()` Removes previously computed set of integral lines from the display and internal uses.
    `void` | `setBackwardIntegration(boolean flag)` Compute integral lines in negative direction as well.
    `void` | `setDisplay(PvDisplayIf disp)` Set the display where computed integral lines will show up when using the workshop's info panel or method `makeIntegralLines()`.
    `void` | `setFast(boolean flag)` Use euler-integration.
    `void` | `setGeometry(PgGeometry geo)` Set the geometry that will be used for integration when using the workshop's info panel or method `makeIntegralLines()`.
    `void` | `setIgnoreDirection(boolean flag)` Ignores the direction of vertex based vector fields, i.e.
    `void` | `setLimitNumLinesPerElement(boolean flag)` Whether integral lines should stop when they reach a face with a number of passing integral lines that exceeds a given number.
    `void` | `setMaxNumLinesPerElement(int val)` Sets the maximal number of integral lines that may pass through one face.
    `void` | `setNumSteps(int num)` Set the number of steps that will be used for integration in `makeIntegralLines()`.
    `void` | `setStepSize(double step)` Set the step size used for integration in `makeIntegralLines()`.
    `void` | `setVectorFieldIndex(int vfIndex)` Set the vector field that will be integrated by index in the element set as set by `setGeometry(PgGeometry)`, beginning with index 0.
    `boolean` | `update(java.lang.Object source)` Handle events originating from given object.

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

      `close, getDisplay, getDisplays, getGeometry, getMode, getSavedGeometry, getViewer, isModal, isStandalone, ok, reset, setDisplays, 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`

- - ### Constructor Detail

    - #### PwIntegralLineSet

          public PwIntegralLineSet()

  - ### Method Detail

    - #### init

          public void init()

      Initializes by setting all parameters to initial values and removing computed integral lines. Does not remove the settings for geometry and display!
      Overrides:
        `init` in class `PjWorkshop`

    - #### setGeometry

          public void setGeometry(PgGeometry geo)

      Set the geometry that will be used for integration when using the workshop's info panel or method `makeIntegralLines()`. This geometry must be a triangulated element set!

      A second call of the method will remove the previous setting. The workshop will register as an update listener to the given geometry to keep being informed about the number of vector fields on it.

      Specified by:
        `setGeometry` in interface `PjWorkshopIf`
      Overrides:
        `setGeometry` in class `PjWorkshop`
      Parameters:
        `geo` - triangulated surface with vector field(s)

    - #### removeGeometry

          public void removeGeometry()

      Removes the reference to the registered element set and removes this as update listener from geometry.
      Overrides:
        `removeGeometry` in class `PjWorkshop`

    - #### setDisplay

          public void setDisplay(PvDisplayIf disp)

      Set the display where computed integral lines will show up when using the workshop's info panel or method `makeIntegralLines()`. If called with `null` as argument this method will remove the display settings.

      A second call of the method will remove the previous setting.

      Specified by:
        `setDisplay` in interface `PjWorkshopIf`
      Overrides:
        `setDisplay` in class `PjWorkshop`
      Parameters:
        `disp` - display that will be used to present the results, may be null

    - #### update

          public boolean update(java.lang.Object source)

      Handle events originating from given object.
      Specified by:
        `update` in interface `PsUpdateIf`
      Overrides:
        `update` in class `PjWorkshop`
      Parameters:
        `source` - sender of this update.
      Returns:
        true if update was correctly handled by superclass.
      See Also:
        `PsObject.setParent(PsUpdateIf)`, `PsObject.getFather()`, `PsObject.addUpdateListener(PsUpdateIf)`

    - #### setStepSize

          public void setStepSize(double step)

      Set the step size used for integration in `makeIntegralLines()`.
      Parameters:
        `step` - positive step size
      See Also:
        `getStepSize()`, `setNumSteps(int)`

    - #### setFast

          public void setFast(boolean flag)

      Use euler-integration.
      Since:
        JavaView 2.49.004

    - #### getFast

          public boolean getFast()

      Whether euler-integration is used (true) or a 4th order runge kutta method (false).
      Since:
        JavaView 2.49.004

    - #### setBackwardIntegration

          public void setBackwardIntegration(boolean flag)

      Compute integral lines in negative direction as well.
      Since:
        JavaView 2.49.004

    - #### getBackwardIntegration

          public boolean getBackwardIntegration()

      Whether integral lines are computed in negative direction as well. The forward and backward integration is concatenated to a single integral line.
      Since:
        JavaView 2.49.004

    - #### setLimitNumLinesPerElement

          public void setLimitNumLinesPerElement(boolean flag)

      Whether integral lines should stop when they reach a face with a number of passing integral lines that exceeds a given number.
      Since:
        JavaView 2.49.004
      See Also:
        `setMaxNumLinesPerElement(int)`

    - #### getLimitNumLinesPerElement

          public boolean getLimitNumLinesPerElement()

      Whether integral lines should stop when they reach a face with a number of passing integral lines that exceeds a given number.
      Since:
        JavaView 2.49.004

    - #### setMaxNumLinesPerElement

          public void setMaxNumLinesPerElement(int val)

      Sets the maximal number of integral lines that may pass through one face. Is only used when the switch for it is on, see `setLimitNumLinesPerElement(boolean)`.
      Since:
        JavaView 2.49.009
      See Also:
        `setLimitNumLinesPerElement(boolean)`

    - #### getMaxNumLinesPerElement

          public int getMaxNumLinesPerElement()

      Gets the maximal number of integral lines that may pass through one face. Is only used when the switch for it is on, see `setLimitNumLinesPerElement(boolean)`.
      Since:
        JavaView 2.49.009

    - #### setIgnoreDirection

          public void setIgnoreDirection(boolean flag)

      Ignores the direction of vertex based vector fields, i.e. at each point there are two possible vectors: + and - the original vector.
      Since:
        JavaView 2.48.007

    - #### getIgnoreDirection

          public boolean getIgnoreDirection()

      Whether the direction of vertex based vector fields is ignored, i.e. at each point there are two possible vectors: + and - the original vector.
      Since:
        JavaView 2.48.007

    - #### getStepSize

          public double getStepSize()

      Get step size used for integration in `makeIntegralLines()`.
      Returns:
        positive step size
      See Also:
        `setStepSize(double)`, `getNumSteps()`

    - #### setNumSteps

          public void setNumSteps(int num)

      Set the number of steps that will be used for integration in `makeIntegralLines()`.
      Parameters:
        `num` - number of integration steps
      See Also:
        `getNumSteps()`, `setStepSize(double)`

    - #### getNumSteps

          public int getNumSteps()

      Get the number of steps that will be used for integration in `makeIntegralLines()`.
      See Also:
        `setNumSteps(int)`, `getStepSize()`

    - #### setVectorFieldIndex

          public void setVectorFieldIndex(int vfIndex)

      Set the vector field that will be integrated by index in the element set as set by `setGeometry(PgGeometry)`, beginning with index 0.
      Parameters:
        `vfIndex` - index of vector field that shall be visualized 0,...
      See Also:
        `getVectorFieldIndex()`, `setGeometry(PgGeometry)`

    - #### getVectorFieldIndex

          public int getVectorFieldIndex()

      Get index of the vector field that will be integrated when using `makeIntegralLines()`.
      See Also:
        `setVectorFieldIndex(int)`

    - #### makeIntegralLines

          public void makeIntegralLines()

      Compute a set of integral lines, each beginning at the center of an element. This method uses the parameters that can be adjusted by the set/get-methods. The resulting polygon set is shown in the display that was set by `setDisplay(PvDisplayIf)`. You can get the computed polygon set by method `getIntegralLines()`.
      See Also:
        `setGeometry(PgGeometry)`, `setDisplay(PvDisplayIf)`, `setStepSize(double)`, `setNumSteps(int)`, `setVectorFieldIndex(int)`, `getIntegralLines()`, `makeIntegralLines(PgElementSet, PgVectorField, PgPolygonSet, double, int)`

    - #### getIntegralLines

          public PgPolygonSet getIntegralLines()

      Get the polygon set instance which is updated by method `makeIntegralLines`.
      Returns:
        the polygon set that is updated at each computation
      See Also:
        `makeIntegralLines()`

    - #### removeIntegralLines

          public void removeIntegralLines()

      Removes previously computed set of integral lines from the display and internal uses. Next call of `makeIntegralLines()` will create a new polygon set, the old polygon set will not be updated with further results but the new one will. This new polygon set will be returned by method `getIntegralLines()`.
      See Also:
        `getIntegralLines()`

    - #### addActionListener

          public void addActionListener(java.awt.event.ActionListener listener)

      An action event is fired whenever integral line computation that had been invoked from the info panel is completed.

    - #### removeActionListener

          public void removeActionListener(java.awt.event.ActionListener listener)

      An action event is fired whenever integral line computation that had been invoked from the info panel is completed.

    - #### cancel

          public void cancel()

      Removes previously comuted integral lines from display and invokes the same method of super-class.
      Overrides:
        `cancel` in class `PjWorkshop`

    - #### makeIntegralLines

          public static PgPolygonSet makeIntegralLines(PgElementSet geom,
                                       PgVectorField vec,
                                       PgPolygonSet out,
                                       double stepsize,
                                       int numSteps)

      Static method that computes a set of integral lines on the given geometry of the given vector field. From the center of each element emerges one integral line that is integrated numerically with given step size and number of iterations.
      Parameters:
        `geom` - the surface, MUST be triangulation!
        `vec` - vector field on surface `geom`.
        `out` - if not equal `null`, results are written here.
        `stepsize` - used for integration of each integral line.
        `numSteps` - used for integration of each integral line.
      Returns:
        parameter `out` if it is not `null`, otherwise a new polygon set that contains the results.
      See Also:
        `PnGeodesicRK`, `PgPolygonOnElementSet`

    - #### makeIntegralLines

          public static PgPolygonSet makeIntegralLines(PgElementSet geom,
                                       PgVectorField vec,
                                       PgPolygonSet out,
                                       double stepsize,
                                       int numSteps,
                                       int elemStep)

      Static method that computes a set of integral lines on the given geometry of the given vector field. From the center of each element emerges one integral line that is integrated numerically with given step size and number of iterations.
      Parameters:
        `geom` - the surface, MUST be triangulation!
        `vec` - vector field on surface `geom`.
        `out` - if not equal `null`, results are written here.
        `stepsize` - used for integration of each integral line.
        `numSteps` - used for integration of each integral line.
        `elemStep` - compute integral line from every elemStep-th element.
      Returns:
        parameter `out` if it is not `null`, otherwise a new polygon set that contains the results.
      See Also:
        `PnGeodesicRK`, `PgPolygonOnElementSet`

    - #### makeIntegralLines

          public static PgPolygonSet makeIntegralLines(PgElementSet geom,
                                       PgVectorField vec,
                                       PgPolygonSet out,
                                       double stepsize,
                                       int numSteps,
                                       int elemStep,
                                       boolean fast,
                                       boolean ignoreDir,
                                       boolean backward,
                                       int maxLinesPerElement,
                                       int[] elementCount)

      Static method that computes a set of integral lines on the given geometry of the given vector field. From the center of each element emerges one integral line that is integrated numerically with given step size and number of iterations.
      Parameters:
        `geom` - the surface, MUST be triangulation!
        `vec` - vector field on surface `geom`.
        `out` - if not equal `null`, results are written here.
        `stepsize` - used for integration of each integral line.
        `numSteps` - used for integration of each integral line.
        `elemStep` - compute integral line from every elemStep-th element.
        `fast` - use euler-integration?
        `ignoreDir` - for use of `PnVertexRKIgnoreDirection`
        `backward` - also go along negative vector field
      Returns:
        parameter `out` if it is not `null`, otherwise a new polygon set that contains the results.
      See Also:
        `PnGeodesicRK`, `PgPolygonOnElementSet`

"

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