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

Class PwMarkWithSphere

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


    public class PwMarkWithSphere
    extends PjWorkshop
    implements PvPickListenerIf
    Workshop to selected vertices of a geometry that are inside a sphere. The center of the sphere can be moved on the geometry.
    See Also:
    Serialized Form
    Author:
    Klaus Hildebrandt
    Version:
    24.01.03, 1.10 revised (kh) Workshop can now switch between geometries. It works on the one that is picked.
    00.11.02, 1.00 created (kh)
    • Constructor Detail

      • PwMarkWithSphere

        public PwMarkWithSphere()
        Constructor.
    • 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(PgPointSet geom)
        Assign a geometry on which this workshop operates, and create a backup copy if workshop is cancelled.
      • update

        public boolean update(java.lang.Object event)
        Description copied from class: PjWorkshop
        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)
      • 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
      • close

        public void close()
        Description copied from class: PjWorkshop
        Close workshop and remove itself as listener from various classes. The workshop will no longer be working after this call.

        Subclasses may remove workshop from geometry as update listener, or remove any temporary geometries from display, if necessary.

        Implementation in this class simply calls removeGeometry().

        Overrides:
        close in class PjWorkshop
      • markVertices

        public void markVertices()
        Mark vertices on geometry, that are inside a sphere.
      • setRadius

        public void setRadius(double rad)
        Set the radius of sphere, but do not compute the new selection.
      • setCenter

        public void setCenter(PdVector center)
        Set center of sphere, but do not compute the new selection.
      • setInvertMarks

        public void setInvertMarks(boolean flag)
        Set flag. This method does not update info panel.
      • setMarkElements

        public void setMarkElements(boolean flag)
        Set flag. This method does not update info panel.
      • selectGeometry

        public void selectGeometry(PgGeometryIf geom)
        Currently not supported by display.
        Specified by:
        selectGeometry in interface PvPickListenerIf
        Parameters:
        geom - Now selected geometry of display.
      • pickDisplay

        public void pickDisplay(PvPickEvent pos)
        Get a location in the display with 2d display and 3d world coordinates. Point may be independent of any geometry.
        Specified by:
        pickDisplay in interface PvPickListenerIf
        Parameters:
        pos - Pick event issued by the display
        See Also:
        PvPickListenerIf
      • dragDisplay

        public void dragDisplay(PvPickEvent pos)
        Drag a location in the display with 2d display and 3d world coordinates. Point may be independent of any geometry.
        Specified by:
        dragDisplay in interface PvPickListenerIf
        Parameters:
        pos - Pick event issued by the display
        See Also:
        PvPickListenerIf
      • pickVertex

        public void pickVertex(PgGeometryIf geom,
                               int index,
                               PdVector vertex)
        Get a picked vertex of a geometry.
        Specified by:
        pickVertex in interface PvPickListenerIf
        Parameters:
        geom - Picked geometry on which vertex lies
        index - Index of vertex in vertex array of geometry
        vertex - 3d coordinates of vertex position
        See Also:
        PvPickListenerIf
      • dragVertex

        public void dragVertex(PgGeometryIf geom,
                               int index,
                               PdVector vertex)
        Drag a picked vertex of a geometry.
        Specified by:
        dragVertex in interface PvPickListenerIf
        Parameters:
        geom - Picked geometry on which vertex lies
        index - Index of vertex in vertex array of geometry
        vertex - 3d coordinates of vertex position
"JavaView? v5.03.003"

"

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

Ads help maintain this website.