jvx.geom

## Class PwClip

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

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

      public class PwClip
      extends PjWorkshop

  Utility program to clip a PgElementSet at a level function.
  See Also:
    Serialized Form
  Author:
    Ulrich Reitebuch
  Version:
    22.08.05, 1.95 revised (kp) Cancel enabled, reset added and code styling.
    22.08.05, 1.90 revised (ur) Full revision, intersection stuff gets an own class.
    10.03.04, 1.80 revised (ur) Now usable for other dimensions than 3 too.
    09.03.04, 1.70 revised (ur) status of some methods changed to make the class usable without the info panel.
    04.11.02, 1.60 revised (ur) Set and get methods for function added.
    23.08.02, 1.50 revised (ur) Now extends PwIntersectElementSet.
    09.07.02, 1.00 created (ur)

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

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clipAtFunction()` Cut all elements of the workshop's geometry at the level value.
    `void` | `clipAtFunction(double level)` Cut all elements of the workshop's geometry at the given level value.
    `java.lang.String` | `getFunction()` Get textual expression of level function.
    `double` | `getLevel()` Get level value at which clipping happens.
    `void` | `init()` Initialize and reset project, stops the running animation if any.
    `boolean` | `isEnabledPositive()` Get comparison sign for function level.
    `void` | `setEnabledPositive(boolean showPositive)` Set comparison sign for function level.
    `void` | `setFunction(java.lang.String s)` Set textual expression of level function used clipping from outside of workshop.
    `void` | `setGeometry(PgGeometry geom)` Assign a geometry on which this workshop operates, and create a backup copy if workshop is cancelled.
    `void` | `setLevel(double level)` Set the value at which clipping happens.
    `boolean` | `update(java.lang.Object event)` Update the class whenever a child has changed.

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

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

    - #### PwClip

          public PwClip()

      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`

    - #### setGeometry

          public void setGeometry(PgGeometry geom)

      Assign a geometry on which this workshop operates, and create a backup copy if workshop is cancelled. Subclasses frequently overwrite this method but are advised to call this method.
      Specified by:
        `setGeometry` in interface `PjWorkshopIf`
      Overrides:
        `setGeometry` in class `PjWorkshop`
      Parameters:
        `geom` - the workshop modifies this geometry.

    - #### getFunction

          public java.lang.String getFunction()

      Get textual expression of level function.

    - #### setFunction

          public void setFunction(java.lang.String s)

      Set textual expression of level function used clipping from outside of workshop. String must be a valid mathematical function in variables {u,v,w} where the number of variables must be equal to the vertex dimension of the geometry to which clipping is applied.
      Parameters:
        `s` - string containing a function expression
      See Also:
        `Parser`

    - #### getLevel

          public double getLevel()

      Get level value at which clipping happens.
      Returns:
        Level value at which clipping happens.

    - #### setLevel

          public void setLevel(double level)

      Set the value at which clipping happens.
      Parameters:
        `level` - Level value at which clipping happens.

    - #### setEnabledPositive

          public void setEnabledPositive(boolean showPositive)

      Set comparison sign for function level.

    - #### isEnabledPositive

          public boolean isEnabledPositive()

      Get comparison sign for function level.

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

    - #### clipAtFunction

          public void clipAtFunction()

      Cut all elements of the workshop's geometry at the level value.
      Author:
        Ulrich Reitebuch
      Version:
        22.08.05, 1.20 revised (ur) Full revision.
        14.10.04, 1.10 revised (kh) Bug remove: changed m_geom = m_elSet[0] to m_geom.copy(m_elSet[0]).
        29.05.02, 1.00 created (ur)

    - #### clipAtFunction

          public void clipAtFunction(double level)

      Cut all elements of the workshop's geometry at the given level value.
      Author:
        Ulrich Reitebuch
      Version:
        23.12.05, 1.31 revised (kp) Method made public.
        22.08.05, 1.30 revised (ur) Full revision.
        04.11.02, 1.20 revised (ur) Moved from PwIntersectElementSet to PwClip.
        09.07.02, 1.10 revised (ur) Handles moved to an own class.
        18.04.02, 1.00 created (ur)

"

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