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

Class PwNoise

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


    public class PwNoise
    extends PjWorkshop
    This workshop moves all vertices of a PgPointSet randomly away from their original position. The random direction may be constrained to vertex normal or tangential directions. Boundaries and marked vertices may be kept fix.
    See Also:
    Serialized Form
    Author:
    Ulrich Reitebuch, Konrad Polthier
    Version:
    21.01.07, 2.10 revised (ah) Method setGeometry() now overloads PjWorkshop.setGeometry.
    30.03.03, 2.00 revised (kp) Better sync with PjWorkshop concept, update mechanism.
    30.03.03, 1.60 revised (kp) Update element normals if they exist and normal update enabled.
    12.02.03, 1.50 revised (ur) Handles moved to here from info panel class, frequency is now independent from new noise.
    25.04.02, 1.40 revised (kp) Some tunings.
    25.04.02, 1.30 revised (ur) Bug in updating removed, some tunings.
    23.01.02, 1.20 revised (ur) New option: Keep boundary unchanged.
    12.01.02, 1.10 revised (ur) Changed to extend PjWorkshop.
    26.09.01, 1.00 created (ur)
    • Field Detail

      • UNIFORM_SPHERICAL

        public static final int UNIFORM_SPHERICAL
        Identifier for uniform noise in a unit ball.
        See Also:
        Constant Field Values
      • UNIFORM_BOX

        public static final int UNIFORM_BOX
        Identifier for uniform noise in a [-1.0; 1.0]^dim box.
        See Also:
        Constant Field Values
      • GAUSSIAN

        public static final int GAUSSIAN
        Identifier for noise with normal distributed distance.
        See Also:
        Constant Field Values
      • m_noiseMode

        public int m_noiseMode
        Mode identifier defining the type of noise to compute.
    • Constructor Detail

      • PwNoise

        public PwNoise()
        Constructor
    • Method Detail

      • init

        public void init()
        Initialization.
        Overrides:
        init in class PjWorkshop
      • setGeometry

        public void setGeometry(PgGeometry geom)
        Store geometry to be noised.
        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).
      • setAmplitude

        public void setAmplitude(double value)
        Set amplitude of noise.
      • getAmplitude

        public double getAmplitude()
        Get amplitude of noise.
      • setNoiseMode

        public void setNoiseMode(int mode)
        Set noise mode.
      • getNoiseMode

        public int getNoiseMode()
        Get noise mode.
      • isEnabledKeepBoundary

        public boolean isEnabledKeepBoundary()
        Get flag to keep boundary vertices fixed during noising.
        Since:
        JavaView 2.66
        Version:
        30.03.03, 1.00 created (kp)
      • setEnabledKeepBoundary

        public void setEnabledKeepBoundary(boolean flag)
        Set flag to keep boundary vertices fixed during noising.
        Since:
        JavaView 2.66
        Version:
        30.03.03, 1.00 created (kp)
      • isEnabledKeepSelected

        public boolean isEnabledKeepSelected()
        Get flag to keep selected vertices fixed during noising.
        Since:
        JavaView 2.66
        Version:
        30.03.03, 1.00 created (kp)
      • setEnabledKeepSelected

        public void setEnabledKeepSelected(boolean flag)
        Set flag to keep selected vertices fixed during noising.
        Since:
        JavaView 2.66
        Version:
        30.03.03, 1.00 created (kp)
      • isEnabledNoiseTangential

        public boolean isEnabledNoiseTangential()
        Get flag to enable movement of vertices in tangential direction.
        Since:
        JavaView 2.66
        Version:
        30.03.03, 1.00 created (kp)
      • setEnabledNoiseTangential

        public void setEnabledNoiseTangential(boolean flag)
        Set flag to enable movement of vertices in tangential direction.
        Since:
        JavaView 2.66
        Version:
        30.03.03, 1.00 created (kp)
      • isEnabledNoiseNormal

        public boolean isEnabledNoiseNormal()
        Get flag to enable movement of vertices in vertex normal direction.
        Since:
        JavaView 2.66
        Version:
        30.03.03, 1.00 created (kp)
      • setEnabledNoiseNormal

        public void setEnabledNoiseNormal(boolean flag)
        Set flag to enable movement of vertices in vertex normal direction.
        Since:
        JavaView 2.66
        Version:
        30.03.03, 1.00 created (kp)
      • isEnabledUpdateNormals

        public boolean isEnabledUpdateNormals()
        Get flag to update vertex normals after noising.
        Since:
        JavaView 2.66
        Version:
        30.03.03, 1.00 created (kp)
      • setEnabledUpdateNormals

        public void setEnabledUpdateNormals(boolean flag)
        Set flag to update vertex normals after noising.
        Since:
        JavaView 2.66
        Version:
        30.03.03, 1.00 created (kp)
      • keepBoundary

        public void keepBoundary(boolean flag)
        Deprecated. use setEnabledKeepBoundary.
        Set flag to keep or not keep boundary vertices un-noised.
      • keepSelected

        public void keepSelected(boolean flag)
        Deprecated. use setEnabledKeepSelected.
        Set flag to keep or not keep selected vertices un-noised.
      • noiseTangential

        public void noiseTangential(boolean flag)
        Deprecated. use setEnabledNoiseTangential.
        Set Flag to noise or not noise vertices in tangential direction.
      • noiseNormal

        public void noiseNormal(boolean flag)
        Deprecated. use setEnabledNoiseNormal.
        Set Flag to noise or not noise vertices in vertex normal direction.
      • updateNormals

        public void updateNormals(boolean flag)
        Deprecated. use setEnabledUpdateNormals.
        Set flag to update or not update vertex normals after noising.
      • close

        public void close()
        Close workshop and remove workshop from geometry as update listener. Instance variables of this workshop are nulled.
        Overrides:
        close in class PjWorkshop
      • newFrequence

        public void newFrequence()
        Select by random vertices to be noised.
      • newNoise

        public void newNoise()
        Generate new random noise directions for all vertices.
      • noise

        public void noise(double factor,
                          boolean bNormal,
                          boolean bTangential,
                          boolean bKeepBoundary,
                          boolean bKeepSelected)
        Deprecated. set options first and use noise() method instead.(ur)
      • noise

        public void noise()
        Move all vertices by their individual noise directions. Successive calls of this method will use the same noise vector per vertex unless the noise vector has been updated inbetween.

        Vertex and element normals of the geometry are update if the original geometry had respective normal vectors.

        Since:
        JavaView 2.49.015
        Author:
        Ulrich Reitebuch
        Version:
        30.03.03, 1.10 revised (kp) No longer call update(this) which must now be invoked from elsewhere. 12.02.03, 1.00 revised (ur) Method created using the body of method noise(double, boolean, boolean, boolean, boolean).
"JavaView? v5.03.003"

"

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

Ads help maintain this website.