public class PwMarkWithSphere extends PjWorkshop implements PvPickListenerIf
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
MODE_BUG, MODE_STANDARD, MODE_VALIDATE
Constructor and Description |
---|
PwMarkWithSphere()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Cancel operation of this workshop by resetting the assigned geometry,
and finally close this workshop.
|
void |
close()
Close workshop and remove itself as listener from various classes.
|
void |
dragDisplay(PvPickEvent pos)
Drag a location in the display with 2d display and 3d world coordinates.
|
void |
dragInitial(PvPickEvent pos)
Drag an arbitrary point along a geometry, point may lie inside an element.
|
void |
dragVertex(PgGeometryIf geom,
int index,
PdVector vertex)
Drag a picked vertex of a geometry.
|
java.lang.String |
getName()
The name of a listeners allows the display to issue verbal debug messages.
|
void |
init()
Initialize and reset project, stops the running animation if any.
|
void |
markVertices()
Mark vertices on geometry, that are inside a sphere.
|
void |
markVertices(PvPickEvent pos)
Mark a set of vertices of a geometry within a given bounding box.
|
void |
pickDisplay(PvPickEvent pos)
Get a location in the display with 2d display and 3d world coordinates.
|
void |
pickInitial(PvPickEvent pos)
Pick an arbitrary point on a geometry, point may lie inside an element.
|
void |
pickVertex(PgGeometryIf geom,
int index,
PdVector vertex)
Get a picked vertex of a geometry.
|
void |
selectGeometry(PgGeometryIf geom)
Currently not supported by display.
|
void |
setCenter(PdVector center)
Set center of sphere, but do not compute the new selection.
|
void |
setDisplay(PvDisplayIf disp)
Get the active display when this workshop was lauchned.
|
void |
setGeometry(PgPointSet geom)
Assign a geometry on which this workshop operates,
and create a backup copy if workshop is cancelled.
|
void |
setInvertMarks(boolean flag)
Set flag.
|
void |
setMarkElements(boolean flag)
Set flag.
|
void |
setRadius(double rad)
Set the radius of sphere, but do not compute the new selection.
|
void |
unmarkVertices(PvPickEvent pos)
Unmark a set of vertices of a geometry within a given bounding box.
|
boolean |
update(java.lang.Object event)
Updates the geometry if this workshop has changed,
i.e. if the event is
this or null . |
getDisplay, getDisplays, getGeometry, getMode, getSavedGeometry, getViewer, isModal, isStandalone, ok, openDialog, removeGeometry, reset, setDisplays, setGeometry, setModal, setMode, setStandalone, setViewer
addInspector, addUpdateListener, assureInspector, clearTag, clone, clone, clone, copy, getFather, getInfoPanel, getInspector, getNumObjects, getSymbol, hasInspector, hasTag, hasUpdateListener, instanceOf, instanceOf, newInspector, newInspector, removeInspector, removeInspector, removeUpdateListener, setName, setParent, setSymbol, setTag, toString, updatePanels
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getFather, setParent
public void init()
PjWorkshop
init
in class PjWorkshop
public void setDisplay(PvDisplayIf disp)
setDisplay
in interface PjWorkshopIf
setDisplay
in class PjWorkshop
public void setGeometry(PgPointSet geom)
public boolean update(java.lang.Object event)
PjWorkshop
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.
update
in interface PsUpdateIf
update
in class PjWorkshop
event
- sender of this update.PsObject.setParent(PsUpdateIf)
,
PsObject.getFather()
,
PsObject.addUpdateListener(PsUpdateIf)
public void cancel()
PjWorkshop
If necessary, the duplicate of the original geometry is restored into the geometry. The update method of the geometry is called.
cancel
in class PjWorkshop
public void close()
PjWorkshop
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()
.
close
in class PjWorkshop
public void markVertices()
public void setRadius(double rad)
public void setCenter(PdVector center)
public void setInvertMarks(boolean flag)
public void setMarkElements(boolean flag)
public java.lang.String getName()
getName
in interface PsUpdateIf
getName
in interface PvPickListenerIf
getName
in class PsObject
public void selectGeometry(PgGeometryIf geom)
selectGeometry
in interface PvPickListenerIf
geom
- Now selected geometry of display.public void pickDisplay(PvPickEvent pos)
pickDisplay
in interface PvPickListenerIf
pos
- Pick event issued by the displayPvPickListenerIf
public void dragDisplay(PvPickEvent pos)
dragDisplay
in interface PvPickListenerIf
pos
- Pick event issued by the displayPvPickListenerIf
public void pickInitial(PvPickEvent pos)
pickInitial
in interface PvPickListenerIf
pos
- Pick event issued by the displayPvPickListenerIf
public void dragInitial(PvPickEvent pos)
dragInitial
in interface PvPickListenerIf
pos
- Pick event issued by the displayPvPickListenerIf
public void pickVertex(PgGeometryIf geom, int index, PdVector vertex)
pickVertex
in interface PvPickListenerIf
geom
- Picked geometry on which vertex liesindex
- Index of vertex in vertex array of geometryvertex
- 3d coordinates of vertex positionPvPickListenerIf
public void dragVertex(PgGeometryIf geom, int index, PdVector vertex)
dragVertex
in interface PvPickListenerIf
geom
- Picked geometry on which vertex liesindex
- Index of vertex in vertex array of geometryvertex
- 3d coordinates of vertex positionpublic void markVertices(PvPickEvent pos)
markVertices
in interface PvPickListenerIf
pos
- contains four coplanar points on the bounding prism, and direction of prism.PvPickEvent.getMarkBox()
public void unmarkVertices(PvPickEvent pos)
unmarkVertices
in interface PvPickListenerIf
pos
- contains four coplanar points on the bounding prism, and direction of prism.PvPickEvent.getMarkBox()
"