jvx.vector

## Class PwIntegralLine

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

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

      public class PwIntegralLine
      extends PjWorkshop
      implements PvPickListenerIf

  Compute a single integral line of a given vector field on a triangulated surface.

  Assign a surface by `setGeometry(PgGeometry)` and a display where the calculated integral line will show up by `setDisplay(PvDisplayIf)` (if you wish that behaviour). 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`.

  See Also:
    Serialized Form
  Author:
    Eike Preuss
  Version:
    09.12.06, 2.00 revised (kp) Moved to jvx.vector from jvx.geom.
    16.01.03, 1.30 revised (ep) Ensure to make edges visible.
    15.01.03, 1.20 revised (ep) New integration type 'ignore direction' added (methods set/getIgnoreDirection).
    17.06.02, 1.10 revised (ep) Now extends PjWorkshop.
    15.11.01, 1.00 created (ep)

- - ### 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
    `PwIntegralLine()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `cancel()` Cancel operation of this workshop by resetting the assigned geometry, and finally close this workshop.
    `void` | `close()` Call this method to shutdown the workshop.
    `PgPolygon` | `computeIntegralLine(PgElementSet geom, int vfIndex, int elemIndex, PdBary point, int numSteps, double stepSize, boolean fast, PgPolygon poly)`
    `PgPolygon` | `computeIntegralLine(PgElementSet geom, int vfIndex, int elemIndex, PdBary point, int numSteps, double stepSize, boolean fast, PgPolygon poly, boolean ignoreDir)`
    `void` | `dragDisplay(PvPickEvent event)` Drag a location in the display with 2d display and 3d world coordinates.
    `void` | `dragInitial(PvPickEvent event)` Drag an arbitrary point along a geometry, point may lie inside an element.
    `void` | `dragVertex(PgGeometryIf geom, int vertindex, PdVector vector)` Drag a picked vertex of a geometry.
    `boolean` | `getFast()`
    `boolean` | `getIgnoreDirection()`
    `PgPolygon` | `getIntegralLine()` Get the polygon instance which is used for integration
    `int` | `getNumSteps()` Get the number of steps that will be used for integration.
    `double` | `getStepSize()` Get step size used for integration.
    `int` | `getVectorFieldIndex()` Get index of the vector field that will be integrated.
    `void` | `init()` Initializes by setting all parameters to initial values and removing computed integral lines.
    `void` | `markVertices(PvPickEvent event)` Mark a set of vertices of a geometry within a given bounding box.
    `void` | `pickDisplay(PvPickEvent event)` Get a location in the display with 2d display and 3d world coordinates.
    `void` | `pickInitial(PvPickEvent event)` Pick an arbitrary point on a geometry, point may lie inside an element.
    `void` | `pickVertex(PgGeometryIf geom, int vertIndex, PdVector vector)` Get a picked vertex of a geometry.
    `void` | `removeIntegralLine()` Removes previously computed integral line from the display and internal uses.
    `void` | `selectGeometry(PgGeometryIf event)` Inform pick listener when selected geometry is changing.
    `void` | `setDisplay(PvDisplayIf disp)` Set the display where computed integral lines will show up.
    `void` | `setFast(boolean flag)`
    `void` | `setGeometry(PgGeometry geo)` Set the geometry that will be used for integration.
    `void` | `setIgnoreDirection(boolean flag)` Ignores the direction of vertex based vector fields, i.e.
    `void` | `setNumSteps(int num)` Set the number of steps that will be used for integration.
    `void` | `setStepSize(double step)` Set the step size used for integration.
    `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.
    `void` | `unmarkVertices(PvPickEvent event)` Unmark a set of vertices of a geometry within a given bounding box.
    `boolean` | `update(java.lang.Object source)` 07.11.04, 1.10 revised (kh) Added checks to avoid calling recompute more than once.

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

      `getDisplay, getDisplays, getGeometry, getMode, getSavedGeometry, getViewer, isModal, isStandalone, ok, removeGeometry, 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.project.PvPickListenerIf

      `getName`

    - ### Methods inherited from interface jv.object.PsUpdateIf

      `getFather, getName, setParent`

- - ### Constructor Detail

    - #### PwIntegralLine

          public PwIntegralLine()

  - ### 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. 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 be informed about the number of vector fields on it.

      A call with argument `null` removes the settings.

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

    - #### setDisplay

          public void setDisplay(PvDisplayIf disp)

      Set the display where computed integral lines will show up. Registeres the workshop as a pick listener.

      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)

      07.11.04, 1.10 revised (kh) Added checks to avoid calling recompute more than once.
      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.
      Parameters:
        `step` - positive step size
      See Also:
        `getStepSize()`, `setNumSteps(int)`

    - #### getStepSize

          public double getStepSize()

      Get step size used for integration.
      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.
      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.
      See Also:
        `setNumSteps(int)`, `getStepSize()`

    - #### setFast

          public void setFast(boolean flag)

    - #### getFast

          public boolean getFast()

    - #### 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.
      See Also:
        `setVectorFieldIndex(int)`

    - #### getIntegralLine

          public PgPolygon getIntegralLine()

      Get the polygon instance which is used for integration
      Returns:
        the polygon set that is updated at each computation

    - #### removeIntegralLine

          public void removeIntegralLine()

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

    - #### close

          public void close()

      Call this method to shutdown the workshop. Removes the workshop from the list of update listeners of the geometry and from the list of pick listeners of the display.
      Overrides:
        `close` in class `PjWorkshop`

    - #### cancel

          public void cancel()

      Description copied from class: `PjWorkshop`
      Cancel operation of this workshop by resetting the assigned geometry, and finally close this workshop.

      If necessary, the duplicate of the original geometry is restored into the geometry. The update method of the geometry is called.

      Overrides:
        `cancel` in class `PjWorkshop`

    - #### markVertices

          public void markVertices(PvPickEvent event)

      Description copied from interface: `PvPickListenerIf`
      Mark a set of vertices of a geometry within a given bounding box.
      Specified by:
        `markVertices` in interface `PvPickListenerIf`
      Parameters:
        `event` - contains two points on the bounding box.

    - #### selectGeometry

          public void selectGeometry(PgGeometryIf event)

      Description copied from interface: `PvPickListenerIf`
      Inform pick listener when selected geometry is changing. Supported by jv.viewer.PvDisplay since v3.98.003.
      Specified by:
        `selectGeometry` in interface `PvPickListenerIf`
      Parameters:
        `event` - Now selected geometry of display.

    - #### pickVertex

          public void pickVertex(PgGeometryIf geom,
                                 int vertIndex,
                                 PdVector vector)

      Description copied from interface: `PvPickListenerIf`
      Get a picked vertex of a geometry.
      Specified by:
        `pickVertex` in interface `PvPickListenerIf`
      Parameters:
        `geom` - Picked geometry on which vertex lies
        `vertIndex` - Index of vertex in vertex array of geometry
        `vector` - 3d coordinates of vertex position
      See Also:
        `PvPickListenerIf`

    - #### pickDisplay

          public void pickDisplay(PvPickEvent event)

      Description copied from interface: `PvPickListenerIf`
      Get a location in the display with 2d display and 3d world coordinates. Point may be independent of any geometry.
      Specified by:
        `pickDisplay` in interface `PvPickListenerIf`
      Parameters:
        `event` - Pick event issued by the display
      See Also:
        `PvPickListenerIf`

    - #### unmarkVertices

          public void unmarkVertices(PvPickEvent event)

      Description copied from interface: `PvPickListenerIf`
      Unmark a set of vertices of a geometry within a given bounding box.
      Specified by:
        `unmarkVertices` in interface `PvPickListenerIf`
      Parameters:
        `event` - contains two points on the bounding box.

    - #### dragVertex

          public void dragVertex(PgGeometryIf geom,
                                 int vertindex,
                                 PdVector vector)

      Description copied from interface: `PvPickListenerIf`
      Drag a picked vertex of a geometry.
      Specified by:
        `dragVertex` in interface `PvPickListenerIf`
      Parameters:
        `geom` - Picked geometry on which vertex lies
        `vertindex` - Index of vertex in vertex array of geometry
        `vector` - 3d coordinates of vertex position

    - #### dragDisplay

          public void dragDisplay(PvPickEvent event)

      Description copied from interface: `PvPickListenerIf`
      Drag a location in the display with 2d display and 3d world coordinates. Point may be independent of any geometry.
      Specified by:
        `dragDisplay` in interface `PvPickListenerIf`
      Parameters:
        `event` - Pick event issued by the display
      See Also:
        `PvPickListenerIf`

    - #### dragInitial

          public void dragInitial(PvPickEvent event)

      Description copied from interface: `PvPickListenerIf`
      Drag an arbitrary point along a geometry, point may lie inside an element.
      Specified by:
        `dragInitial` in interface `PvPickListenerIf`
      Parameters:
        `event` - Pick event issued by the display
      See Also:
        `PvPickListenerIf`

    - #### pickInitial

          public void pickInitial(PvPickEvent event)

      Description copied from interface: `PvPickListenerIf`
      Pick an arbitrary point on a geometry, point may lie inside an element.
      Specified by:
        `pickInitial` in interface `PvPickListenerIf`
      Parameters:
        `event` - Pick event issued by the display
      See Also:
        `PvPickListenerIf`

    - #### 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()

      Since:
        JavaView 2.48.007

    - #### computeIntegralLine

          public PgPolygon computeIntegralLine(PgElementSet geom,
                                               int vfIndex,
                                               int elemIndex,
                                               PdBary point,
                                               int numSteps,
                                               double stepSize,
                                               boolean fast,
                                               PgPolygon poly)

    - #### computeIntegralLine

          public PgPolygon computeIntegralLine(PgElementSet geom,
                                               int vfIndex,
                                               int elemIndex,
                                               PdBary point,
                                               int numSteps,
                                               double stepSize,
                                               boolean fast,
                                               PgPolygon poly,
                                               boolean ignoreDir)

"

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