jvx.geom

## Class PwMarkWithSphere

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

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

      public class PwMarkWithSphere
      extends PjWorkshop
      implements PvPickListenerIf

  Workshop to selected vertices of a geometry that are inside a sphere. The center of the sphere can be moved on the geometry.
  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
    `PwMarkWithSphere()` Constructor.

  - ### Method Summary

    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()` Close workshop and remove itself as listener from various classes.
    `void` | `dragDisplay(PvPickEvent pos)` Drag a location in the display with 2d display and 3d world coordinates.
    `void` | `dragInitial(PvPickEvent pos)` Drag an arbitrary point along a geometry, point may lie inside an element.
    `void` | `dragVertex(PgGeometryIf geom, int index, PdVector vertex)` Drag a picked vertex of a geometry.
    `java.lang.String` | `getName()` The name of a listeners allows the display to issue verbal debug messages.
    `void` | `init()` Initialize and reset project, stops the running animation if any.
    `void` | `markVertices()` Mark vertices on geometry, that are inside a sphere.
    `void` | `markVertices(PvPickEvent pos)` Mark a set of vertices of a geometry within a given bounding box.
    `void` | `pickDisplay(PvPickEvent pos)` Get a location in the display with 2d display and 3d world coordinates.
    `void` | `pickInitial(PvPickEvent pos)` Pick an arbitrary point on a geometry, point may lie inside an element.
    `void` | `pickVertex(PgGeometryIf geom, int index, PdVector vertex)` Get a picked vertex of a geometry.
    `void` | `selectGeometry(PgGeometryIf geom)` Currently not supported by display.
    `void` | `setCenter(PdVector center)` Set center of sphere, but do not compute the new selection.
    `void` | `setDisplay(PvDisplayIf disp)` Get the active display when this workshop was lauchned.
    `void` | `setGeometry(PgPointSet geom)` Assign a geometry on which this workshop operates, and create a backup copy if workshop is cancelled.
    `void` | `setInvertMarks(boolean flag)` Set flag.
    `void` | `setMarkElements(boolean flag)` Set flag.
    `void` | `setRadius(double rad)` Set the radius of sphere, but do not compute the new selection.
    `void` | `unmarkVertices(PvPickEvent pos)` 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

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

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

      `addInspector, addUpdateListener, assureInspector, clearTag, clone, clone, clone, copy, getFather, getInfoPanel, getInspector, 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, setParent`

- - ### Constructor Detail

    - #### PwMarkWithSphere

          public PwMarkWithSphere()

      Constructor.

  - ### Method Detail

    - #### init

          public void init()

      Description copied from class: `PjWorkshop`
      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`

    - #### setDisplay

          public void setDisplay(PvDisplayIf disp)

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

    - #### setGeometry

          public void setGeometry(PgPointSet geom)

      Assign a geometry on which this workshop operates, and create a backup copy if workshop is cancelled.

    - #### update

          public boolean update(java.lang.Object event)

      Description copied from class: `PjWorkshop`
      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)`

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

    - #### close

          public void close()

      Description copied from class: `PjWorkshop`
      Close workshop and remove itself as listener from various classes. The workshop will no longer be working after this call.

      Subclasses may remove workshop from geometry as update listener, or remove any temporary geometries from display, if necessary.

      Implementation in this class simply calls `removeGeometry()`.

      Overrides:
        `close` in class `PjWorkshop`

    - #### markVertices

          public void markVertices()

      Mark vertices on geometry, that are inside a sphere.

    - #### setRadius

          public void setRadius(double rad)

      Set the radius of sphere, but do not compute the new selection.

    - #### setCenter

          public void setCenter(PdVector center)

      Set center of sphere, but do not compute the new selection.

    - #### setInvertMarks

          public void setInvertMarks(boolean flag)

      Set flag. This method does not update info panel.

    - #### setMarkElements

          public void setMarkElements(boolean flag)

      Set flag. This method does not update info panel.

    - #### getName

          public java.lang.String getName()

      The name of a listeners allows the display to issue verbal debug messages.
      Specified by:
        `getName` in interface `PsUpdateIf`
      Specified by:
        `getName` in interface `PvPickListenerIf`
      Overrides:
        `getName` in class `PsObject`

    - #### selectGeometry

          public void selectGeometry(PgGeometryIf geom)

      Currently not supported by display.
      Specified by:
        `selectGeometry` in interface `PvPickListenerIf`
      Parameters:
        `geom` - Now selected geometry of display.

    - #### pickDisplay

          public void pickDisplay(PvPickEvent pos)

      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:
        `pos` - Pick event issued by the display
      See Also:
        `PvPickListenerIf`

    - #### dragDisplay

          public void dragDisplay(PvPickEvent pos)

      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:
        `pos` - Pick event issued by the display
      See Also:
        `PvPickListenerIf`

    - #### pickInitial

          public void pickInitial(PvPickEvent pos)

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

    - #### dragInitial

          public void dragInitial(PvPickEvent pos)

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

    - #### pickVertex

          public void pickVertex(PgGeometryIf geom,
                        int index,
                        PdVector vertex)

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

    - #### dragVertex

          public void dragVertex(PgGeometryIf geom,
                        int index,
                        PdVector vertex)

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

    - #### markVertices

          public void markVertices(PvPickEvent pos)

      Mark a set of vertices of a geometry within a given bounding box.
      Specified by:
        `markVertices` in interface `PvPickListenerIf`
      Parameters:
        `pos` - contains four coplanar points on the bounding prism, and direction of prism.
      See Also:
        `PvPickEvent.getMarkBox()`

    - #### unmarkVertices

          public void unmarkVertices(PvPickEvent pos)

      Unmark a set of vertices of a geometry within a given bounding box.
      Specified by:
        `unmarkVertices` in interface `PvPickListenerIf`
      Parameters:
        `pos` - contains four coplanar points on the bounding prism, and direction of prism.
      See Also:
        `PvPickEvent.getMarkBox()`

"

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