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
  Author:
    Klaus Hildebrandt, Konrad Polthier, Matthias Nieser
  Version:
    07.02.17, 1.90 revised (ur) Bug fix in security check for vector field rotation.
    25.09.09, 1.80 revised (mn) Add rotation and scaling of vector fields.
    08.08.08, 1.70 revised (kp) New tabPanel for function mappings on ambient space added.
    07.08.08, 1.60 revised (kp) Reorganisation of constructor and init, some constructors removed..
    21.01.07, 1.50 revised (ah) Added default constructor, setDimension(int). setGeometry now overloads PjWorkshop.setGeometry.
    22.07.06, 1.40 revised (mn) Cleaned code. Added 2d rotation and transformation of textures.
    05.07.05, 1.30 revised (mn) Added functionality: transform selected geometries, scale around fixed center.
    27.10.04, 1.20 revised (kh) Added functionality: transform whole scene, modify center of rotation,...
    23.08.03, 1.10 revised (kp) Initialization of scaleOld moved to init() from constructor.
    21.05.03, 1.00 created (kh)

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

    All Methods Static Methods Instance Methods Concrete 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.
      Version:
        03.02.07, 2.00 revised (kp) Method now overloads PjWorkshop#setGeometry(PgGeometry).

    - #### 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
      Version:
        07.08.08, 1.00 created (kp)

    - #### 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.
"