jvx.geom

## Class PwTransform

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

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

      public class PwTransform
      extends PjWorkshop

  Workshop to perform simple transformations like scaling, translating or rotating on a geometry. All operations are performed for each coordinate axis individually. Rotations and scalings use the center of each geometry as reference point. New tabPanels for mapping of ambient space using functional expressions, or mapping of texture coordinates have been added.
  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
    `PwTransform()` Constructor

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` Close workshop and remove itself as listener from various classes.
    `void` | `compute(PgPointSet geom, boolean selectedOnly)` Perform all functional evaluations on vertex set of geometry.
    `void` | `init()` Initialize the workshop.
    `void` | `reset()` Reset workshop and reset the geometry with its backup version.
    `static void` | `rotate(PgPointSet geom, double angle, int coord)` Method rotates the given geometry around the specified coordinate axis.
    `static void` | `rotate(PgPointSet geom, double angle, int coord, boolean selectedOnly)` Method rotates the given geometry around the specified coordinate axis.
    `static void` | `rotate(PgPointSet geom, double angle, int coord, PdVector centerOfRotation)` Method rotates the given geometry around the specified coordinate axis.
    `static void` | `rotate(PgPointSet geom, double angle, int coord, PdVector centerOfRotation, boolean selectedOnly)` Method rotates the given geometry around the specified coordinate axis.
    `static void` | `scale(PgPointSet geom, double value)` Method scales the geometry geometry by a given factor.
    `static void` | `scale(PgPointSet geom, double value, int coord)` Method scales one coordinate of the geometry geometry by a given factor.
    `static void` | `scale(PgPointSet geom, double value, int coord, PdVector center, boolean selectedOnly)` Method scales one coordinate of the geometry geometry by a given factor.
    `static void` | `scale(PgPointSet geom, double value, PdVector center, boolean selectedOnly)` Method scales the geometry geometry by a given factor.
    `void` | `setDimension(int dim)` Initialize the workshop with the given dimension.
    `void` | `setGeometry(PgGeometry geom)` Assign a geometry on which this workshop operates, and create a backup copy if workshop is canceled.
    `static void` | `translate(PgPointSet geom, double value, int coord)` Method translates the given geometry in the directions of the given coordinate axis.
    `static void` | `translate(PgPointSet geom, double value, int coord, boolean selectedOnly)` Method translates the given geometry in the directions of the given coordinate axis.
    `boolean` | `update(java.lang.Object event)` Update the class whenever a child has changed.

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

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

    - #### PwTransform

          public PwTransform()

      Constructor

  - ### Method Detail

    - #### init

          public void init()

      Initialize the workshop.
      Overrides:
        `init` in class `PjWorkshop`

    - #### reset

          public void reset()

      Reset workshop and reset the geometry with its backup version.
      Overrides:
        `reset` in class `PjWorkshop`

    - #### close

          public void close()

      Close workshop and remove itself as listener from various classes. The workshop will no longer be working after this call.
      Overrides:
        `close` 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 canceled.
      Specified by:
        `setGeometry` in interface `PjWorkshopIf`
      Overrides:
        `setGeometry` in class `PjWorkshop`
      Parameters:
        `geom` - the workshop modifies this geometry.

    - #### setDimension

          public void setDimension(int dim)

      Initialize the workshop with the given dimension.
      Parameters:
        `dim` - dimensions of space, number of rotation axis.

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

    - #### compute

          public void compute(PgPointSet geom,
                     boolean selectedOnly)

      Perform all functional evaluations on vertex set of geometry.
      Since:
        JavaView v.3.99.031

    - #### translate

          public static void translate(PgPointSet geom,
                       double value,
                       int coord)

      Method translates the given geometry in the directions of the given coordinate axis.
      Parameters:
        `geom` - geom that will be translated
        `value` - length of the translation
        `coord` - translation in direction of the specified coordinate axis

    - #### translate

          public static void translate(PgPointSet geom,
                       double value,
                       int coord,
                       boolean selectedOnly)

      Method translates the given geometry in the directions of the given coordinate axis.
      Parameters:
        `geom` - geom that will be translated
        `value` - length of the translation
        `coord` - translation in direction of the specified coordinate axis
        `selectedOnly` - transform the selected vertices only

    - #### scale

          public static void scale(PgPointSet geom,
                   double value)

      Method scales the geometry geometry by a given factor. The center of gravity is the base point of the scaling.
      Parameters:
        `geom` - geom that will be scaled
        `value` - factor of the scaling

    - #### scale

          public static void scale(PgPointSet geom,
                   double value,
                   PdVector center,
                   boolean selectedOnly)

      Method scales the geometry geometry by a given factor. The center is the base point of the scaling.
      Parameters:
        `geom` - geom that will be scaled
        `value` - factor of the scaling
        `center` - Center for scaling
        `selectedOnly` - transform the selected vertices only

    - #### scale

          public static void scale(PgPointSet geom,
                   double value,
                   int coord)

      Method scales one coordinate of the geometry geometry by a given factor. The center of gravity is the base point of the scaling.
      Parameters:
        `geom` - geom that will be scaled
        `value` - factor of the scaling
        `coord` - scale only of the specified coordinate

    - #### scale

          public static void scale(PgPointSet geom,
                   double value,
                   int coord,
                   PdVector center,
                   boolean selectedOnly)

      Method scales one coordinate of the geometry geometry by a given factor. The center is the base point of the scaling.
      Parameters:
        `geom` - geom that will be scaled
        `value` - factor of the scaling
        `coord` - scale only of the specified coordinate
        `selectedOnly` - transform the selected vertices only

    - #### rotate

          public static void rotate(PgPointSet geom,
                    double angle,
                    int coord)

      Method rotates the given geometry around the specified coordinate axis. The center of the rotation is the center of gravity of the geometry. Only works for geometries in 2 or 3-space.
      Parameters:
        `geom` - geom that will be rotated
        `angle` - angle of the rotation in radians
        `coord` - rotation around the specified coordinate axis

    - #### rotate

          public static void rotate(PgPointSet geom,
                    double angle,
                    int coord,
                    boolean selectedOnly)

      Method rotates the given geometry around the specified coordinate axis. The center of the rotation is specified. Only works for geometries in 2 or 3-space.
      Parameters:
        `geom` - geom that will be rotated
        `angle` - angle of the rotation in radians
        `coord` - rotation around the specified coordinate axis
        `selectedOnly` - transform the selected vertices only

    - #### rotate

          public static void rotate(PgPointSet geom,
                    double angle,
                    int coord,
                    PdVector centerOfRotation,
                    boolean selectedOnly)

      Method rotates the given geometry around the specified coordinate axis. Only works for geometries in 2 or 3-space.
      Parameters:
        `geom` - geom that will be rotated
        `angle` - angle of the rotation in radians
        `coord` - rotation around the specified coordinate axis
        `centerOfRotation` - rotate geometry around the specified center
        `selectedOnly` - transform the selected vertices only

    - #### rotate

          public static void rotate(PgPointSet geom,
                    double angle,
                    int coord,
                    PdVector centerOfRotation)

      Method rotates the given geometry around the specified coordinate axis. Only works for geometries in 2 or 3-space.
      Parameters:
        `geom` - geom that will be rotated
        `angle` - angle of the rotation in radians
        `coord` - rotation around the specified coordinate axis
        `centerOfRotation` - rotate geometry around the specified center

"

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