Documentation of 'jvx.geom.PwTransform' Java class
PwTransform ("JavaView Reference Manual")
"JavaView? v5.03.003"
jvx.geom

Class 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)
    • 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.
      • 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
"JavaView? v5.03.003"

"

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

You see the box below because you did not login.