jvx.geom

## Class PwGeodesicFlow

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

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

      public class PwGeodesicFlow
      extends PjWorkshop
      implements PsTimeListenerIf, PvPickListenerIf

  Visualizes the geodesic flow on an element set. Particles are emitted from a user picked point on the geometry and traced along straightest geodesics.
  See Also:
    Serialized Form
  Author:
    Andreas Haferburg
  Version:
    01.03.06, 1.00 created (ah)

- - ### 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
    `PwGeodesicFlow()` Creates a new instance of PwGeodesicFlow

  - ### 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` | `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.
    `PsAnimation` | `getAnimation()` Get the animation manager where this listener is registered.
    `double` | `getEmitInterval()` Returns the emit interval of the particles.
    `double` | `getMaxAge()` Returns the maximum age.
    `int` | `getMaxNumParticles()` Returns the maximum number of particles.
    `double` | `getSpeed()` Returns the speed of the particles.
    `boolean` | `hasAnimation()` Check whether this object is registered as listener of an animation manager.
    `void` | `init()` Initialize and reset project, stops the running animation if any.
    `int` | `initialize()` Sets initial values for the particles.
    `void` | `markVertices(PvPickEvent event)` Mark a set of vertices of a geometry within a given bounding box.
    `void` | `ok()` Accept current version of the geometry as new version.
    `void` | `pickDisplay(PvPickEvent event)` Get a location in the display with 2d display and 3d world coordinates.
    `void` | `pickInitial(PvPickEvent pos)` Sets the spawn point, starts the animation.
    `void` | `pickVertex(PgGeometryIf geom, int vertIndex, PdVector vector)` Get a picked vertex of a geometry.
    `void` | `selectGeometry(PgGeometryIf event)` Inform pick listener when selected geometry is changing.
    `void` | `setAnimation(PsAnimation anAnimation)` Assign the animation manager where this listener is registered.
    `void` | `setDisplay(PvDisplayIf display)` Set the active display when this workshop was launched.
    `void` | `setEmitInterval(double emitInterval)` Sets the emit interval of the particles.
    `void` | `setEnabledHueColoring(boolean flag)` Enable or disable coloring vertices by hue from starting direction.
    `void` | `setGeometry(PgGeometry geom)` Initializes geometry dependent fields.
    `void` | `setMaxAge(double maxAge)` Sets the maximum age.
    `void` | `setMaxNumParticles(int maxNumParticles)` Sets the maximum number of particles.
    `void` | `setSpeed(double speed)` Sets the speed of the particles.
    `boolean` | `setTime(PsTimeEvent timeEvent)` Moves the particles one step forward.
    `void` | `unmarkVertices(PvPickEvent event)` Unmark a set of vertices of a geometry within a given bounding box.
    `boolean` | `update(java.lang.Object event)` Updates the geometry if this workshop has changed, i.e. if the event is `this` or `null`.

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

      `close, getDisplay, getDisplays, getGeometry, getMode, getSavedGeometry, getViewer, isModal, isStandalone, 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.anim.PsTimeListenerIf

      `getName`

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

      `getName`

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

      `getFather, getName, setParent`

- - ### Constructor Detail

    - #### PwGeodesicFlow

          public PwGeodesicFlow()

      Creates a new instance of PwGeodesicFlow

  - ### Method Detail

    - #### init

          public void init()

      Initialize and reset project, stops the running animation if any. Does not reset any registered display nor geometry. They must be reset individually in each subclass.
      Overrides:
        `init` in class `PjWorkshop`

    - #### ok

          public void ok()

      Accept current version of the geometry as new version. Close workshop. The copy of the original geometry is ignored.

      Overrides:
        `ok` in class `PjWorkshop`

    - #### cancel

          public void cancel()

      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`

    - #### setDisplay

          public void setDisplay(PvDisplayIf display)

      Set the active display when this workshop was launched.
      Specified by:
        `setDisplay` in interface `PjWorkshopIf`
      Overrides:
        `setDisplay` in class `PjWorkshop`

    - #### pickInitial

          public void pickInitial(PvPickEvent pos)

      Sets the spawn point, starts the animation.
      Specified by:
        `pickInitial` in interface `PvPickListenerIf`
      Parameters:
        `pos` - new spawn point
      See Also:
        `PvPickListenerIf`

    - #### initialize

          public int initialize()

      Sets initial values for the particles.
      Returns:
        number of initialized particles

    - #### setTime

          public boolean setTime(PsTimeEvent timeEvent)

      Moves the particles one step forward.
      Specified by:
        `setTime` in interface `PsTimeListenerIf`
      Parameters:
        `timeEvent` - ignored
      Returns:
        super.update(this)

    - #### setAnimation

          public void setAnimation(PsAnimation anAnimation)

      Description copied from interface: `PsTimeListenerIf`
      Assign the animation manager where this listener is registered. This method is invoked by the animation manager during registration of this listener, and usually is not required to be called by a user. If this listener has an assigned animation manager, then its animation panel may be shown to change the current time of this listener.

      Only one animation manager may be assigned to this listener. Subsequent assignments will replace the previous assignment.

      Specified by:
        `setAnimation` in interface `PsTimeListenerIf`
      See Also:
        `PsTimeListenerIf.getAnimation()`, `PsTimeListenerIf.hasAnimation()`

    - #### hasAnimation

          public boolean hasAnimation()

      Description copied from interface: `PsTimeListenerIf`
      Check whether this object is registered as listener of an animation manager.
      Specified by:
        `hasAnimation` in interface `PsTimeListenerIf`
      See Also:
        `PsTimeListenerIf.getAnimation()`, `PsTimeListenerIf.setAnimation(PsAnimation)`

    - #### getAnimation

          public PsAnimation getAnimation()

      Description copied from interface: `PsTimeListenerIf`
      Get the animation manager where this listener is registered. This listener may only have a single animation manager which is assigned by the animation manager when this listener is registered using `setAnimation(PsAnimation)`.
      Specified by:
        `getAnimation` in interface `PsTimeListenerIf`
      See Also:
        `PsTimeListenerIf.hasAnimation()`, `PsTimeListenerIf.setAnimation(PsAnimation)`

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

    - #### setGeometry

          public void setGeometry(PgGeometry geom)

      Initializes geometry dependent fields.
      Specified by:
        `setGeometry` in interface `PjWorkshopIf`
      Overrides:
        `setGeometry` in class `PjWorkshop`
      Parameters:
        `geom` - new geometry

    - #### setEnabledHueColoring

          public void setEnabledHueColoring(boolean flag)

      Enable or disable coloring vertices by hue from starting direction.

    - #### getMaxNumParticles

          public int getMaxNumParticles()

      Returns the maximum number of particles.
      Returns:
        the maximum number of particles

    - #### setMaxNumParticles

          public void setMaxNumParticles(int maxNumParticles)

      Sets the maximum number of particles.
      Parameters:
        `maxNumParticles` - the maximum number of particles

    - #### getMaxAge

          public double getMaxAge()

      Returns the maximum age.
      Returns:
        the maximum age

    - #### setMaxAge

          public void setMaxAge(double maxAge)

      Sets the maximum age.
      Parameters:
        `maxAge` - the maximum age

    - #### getEmitInterval

          public double getEmitInterval()

      Returns the emit interval of the particles.
      Returns:
        the emit interval

    - #### setEmitInterval

          public void setEmitInterval(double emitInterval)

      Sets the emit interval of the particles.
      Parameters:
        `emitInterval` -

    - #### getSpeed

          public double getSpeed()

      Returns the speed of the particles.
      Returns:
        the speed of the particles

    - #### setSpeed

          public void setSpeed(double speed)

      Sets the speed of the particles.
      Parameters:
        `speed` - the speed of the particles

    - #### update

          public boolean update(java.lang.Object event)

      Updates the geometry if this workshop has changed, i.e. if the event is `this` or `null`. Also propagates update() to superclass with the original argument event.

      Some subclasses may register themselves as update listener of the geometry of this workshop. In order to prevent an update loop, this method safely uses isUpdateSender() when updating the geometry.

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

"

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