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

Class PwSeeds

    • Constructor Detail

      • PwSeeds

        public PwSeeds()
    • 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)
        Description copied from class: PjWorkshop
        Assign a geometry on which this workshop operates, and create a backup clone of the geometry. The backup geometry is restored if the workshop is canceled.

        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.
      • setAnimation

        public void setAnimation(PsAnimation anAnimation)
        Description copied from interface: PsTimeListenerIf
        Assign the animation manager where this listener is registered. This method is invoked by the animation manager during registration of this listener, and usually is not required to be called by a user. If this listener has an assigned animation manager, then its animation panel may be shown to change the current time of this listener.

        Only one animation manager may be assigned to this listener. Subsequent assignments will replace the previous assignment.

        Specified by:
        setAnimation in interface PsTimeListenerIf
        See Also:
        PsTimeListenerIf.getAnimation(), PsTimeListenerIf.hasAnimation()
      • getVectorFieldIndex

        public int getVectorFieldIndex()
      • setVectorFieldIndex

        public void setVectorFieldIndex(int fieldIndex)
      • getNumSeeds

        public int getNumSeeds()
      • setNumSeeds

        public void setNumSeeds(int numSeeds)
      • getStepSize

        public double getStepSize()
      • setStepSize

        public void setStepSize(double h)
      • usesFirstOrder

        public boolean usesFirstOrder()
      • setFirstOrder

        public void setFirstOrder(boolean firstOrder)
      • ok

        public void ok()
        Description copied from class: PjWorkshop
        Accept current version of the geometry as new version. Close workshop. The copy of the original geometry is ignored.

        Implementation in this class calls close().

        Overrides:
        ok in class PjWorkshop
      • reset

        public void reset()
        Remove all previously done simplification and set the workshop to its initial status.
        Overrides:
        reset in class PjWorkshop
      • cancel

        public void cancel()
        Description copied from class: PjWorkshop
        Cancel operation of this workshop by resetting the assigned geometry, and finally close this workshop.

        If necessary, the duplicate of the original geometry is restored into the geometry. The update method of the geometry is called.

        Overrides:
        cancel in class PjWorkshop
      • removeSeeds

        public void removeSeeds()
      • removeGeometry

        public void removeGeometry()
        Remove the assigned geometry and its backup clone. Subclasses frequently overwrite this method but are advised to call this method.
        Overrides:
        removeGeometry in class PjWorkshop
      • update

        public boolean update(java.lang.Object event)
        Updates the geometry if this workshop has changed, i.e. if the event is this or null. Also propagates update() to superclass with the original argument event.

        Some subclasses may register themselves as update listener of the geometry of this workshop. In order to prevent an update loop, this method safely uses isUpdateSender() when updating the geometry.

        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)
      • setToRandomPosition

        public static void setToRandomPosition(PgPointSetOnElementSet seeds,
                                               int startIndex,
                                               int endIndex)
        Set the vertices from startIndex to endIndex-1 to a random position in a (almost) random element.

        The positions inside a triangle are equally distributed, and the number of points in a triangle is proportional to the area of the triangle.

        Parameters:
        startIndex - Index of the first vertex to be changed.
        endIndex - Upper limit of indices to be changed.
        Version:
        16.04.06, 2.00 revised (kp) Using new class structure.
      • setToRandomPosition

        public static void setToRandomPosition(PgPointSetOnElementSet seeds)
        Set all points to random positions.
"JavaView? v5.03.003"

"

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

Ads help maintain this website.