public class PwGeodesicFlow extends PjWorkshop implements PsTimeListenerIf, 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_TAGSMODE_BUG, MODE_STANDARD, MODE_VALIDATE| Constructor and Description |
|---|
PwGeodesicFlow()
Creates a new instance of PwGeodesicFlow
|
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
Cancel operation of this workshop by resetting the assigned geometry,
and finally close this workshop.
|
void |
dragDisplay(PvPickEvent event)
Drag a location in the display with 2d display and 3d world coordinates.
|
void |
dragInitial(PvPickEvent event)
Drag an arbitrary point along a geometry, point may lie inside an element.
|
void |
dragVertex(PgGeometryIf geom,
int vertindex,
PdVector vector)
Drag a picked vertex of a geometry.
|
PsAnimation |
getAnimation()
Get the animation manager where this listener is registered.
|
double |
getEmitInterval()
Returns the emit interval of the particles.
|
double |
getMaxAge()
Returns the maximum age.
|
int |
getMaxNumParticles()
Returns the maximum number of particles.
|
double |
getSpeed()
Returns the speed of the particles.
|
boolean |
hasAnimation()
Check whether this object is registered as listener of an animation manager.
|
void |
init()
Initialize and reset project, stops the running animation if any.
|
int |
initialize()
Sets initial values for the particles.
|
void |
markVertices(PvPickEvent event)
Mark a set of vertices of a geometry within a given bounding box.
|
void |
ok()
Accept current version of the geometry as new version.
|
void |
pickDisplay(PvPickEvent event)
Get a location in the display with 2d display and 3d world coordinates.
|
void |
pickInitial(PvPickEvent pos)
Sets the spawn point, starts the animation.
|
void |
pickVertex(PgGeometryIf geom,
int vertIndex,
PdVector vector)
Get a picked vertex of a geometry.
|
void |
selectGeometry(PgGeometryIf event)
Inform pick listener when selected geometry is changing.
|
void |
setAnimation(PsAnimation anAnimation)
Assign the animation manager where this listener is registered.
|
void |
setDisplay(PvDisplayIf display)
Set the active display when this workshop was launched.
|
void |
setEmitInterval(double emitInterval)
Sets the emit interval of the particles.
|
void |
setEnabledHueColoring(boolean flag)
Enable or disable coloring vertices by hue from starting direction.
|
void |
setGeometry(PgGeometry geom)
Initializes geometry dependent fields.
|
void |
setMaxAge(double maxAge)
Sets the maximum age.
|
void |
setMaxNumParticles(int maxNumParticles)
Sets the maximum number of particles.
|
void |
setSpeed(double speed)
Sets the speed of the particles.
|
boolean |
setTime(PsTimeEvent timeEvent)
Moves the particles one step forward.
|
void |
unmarkVertices(PvPickEvent event)
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. |
close, getDisplay, getDisplays, getGeometry, getMode, getSavedGeometry, getViewer, isModal, isStandalone, openDialog, removeGeometry, reset, setDisplays, setModal, setMode, setStandalone, setVieweraddInspector, addUpdateListener, assureInspector, clearTag, clone, clone, clone, copy, getFather, getInfoPanel, getInspector, getName, getNumObjects, getSymbol, hasInspector, hasTag, hasUpdateListener, instanceOf, instanceOf, newInspector, newInspector, removeInspector, removeInspector, removeUpdateListener, setName, setParent, setSymbol, setTag, toString, updatePanelsequals, getClass, hashCode, notify, notifyAll, wait, wait, waitgetNamegetNamegetFather, getName, setParentpublic void init()
init in class PjWorkshoppublic void ok()
ok in class PjWorkshoppublic void cancel()
If necessary, the duplicate of the original geometry is restored into the geometry. The update method of the geometry is called.
cancel in class PjWorkshoppublic void setDisplay(PvDisplayIf display)
setDisplay in interface PjWorkshopIfsetDisplay in class PjWorkshoppublic void pickInitial(PvPickEvent pos)
pickInitial in interface PvPickListenerIfpos - new spawn pointPvPickListenerIfpublic int initialize()
public boolean setTime(PsTimeEvent timeEvent)
setTime in interface PsTimeListenerIftimeEvent - ignoredpublic void setAnimation(PsAnimation anAnimation)
PsTimeListenerIfOnly one animation manager may be assigned to this listener. Subsequent assignments will replace the previous assignment.
setAnimation in interface PsTimeListenerIfPsTimeListenerIf.getAnimation(),
PsTimeListenerIf.hasAnimation()public boolean hasAnimation()
PsTimeListenerIfhasAnimation in interface PsTimeListenerIfPsTimeListenerIf.getAnimation(),
PsTimeListenerIf.setAnimation(PsAnimation)public PsAnimation getAnimation()
PsTimeListenerIfsetAnimation(PsAnimation).getAnimation in interface PsTimeListenerIfPsTimeListenerIf.hasAnimation(),
PsTimeListenerIf.setAnimation(PsAnimation)public void markVertices(PvPickEvent event)
PvPickListenerIfmarkVertices in interface PvPickListenerIfevent - contains two points on the bounding box.public void selectGeometry(PgGeometryIf event)
PvPickListenerIfselectGeometry in interface PvPickListenerIfevent - Now selected geometry of display.public void pickVertex(PgGeometryIf geom, int vertIndex, PdVector vector)
PvPickListenerIfpickVertex in interface PvPickListenerIfgeom - Picked geometry on which vertex liesvertIndex - Index of vertex in vertex array of geometryvector - 3d coordinates of vertex positionPvPickListenerIfpublic void pickDisplay(PvPickEvent event)
PvPickListenerIfpickDisplay in interface PvPickListenerIfevent - Pick event issued by the displayPvPickListenerIfpublic void unmarkVertices(PvPickEvent event)
PvPickListenerIfunmarkVertices in interface PvPickListenerIfevent - contains two points on the bounding box.public void dragVertex(PgGeometryIf geom, int vertindex, PdVector vector)
PvPickListenerIfdragVertex in interface PvPickListenerIfgeom - Picked geometry on which vertex liesvertindex - Index of vertex in vertex array of geometryvector - 3d coordinates of vertex positionpublic void dragDisplay(PvPickEvent event)
PvPickListenerIfdragDisplay in interface PvPickListenerIfevent - Pick event issued by the displayPvPickListenerIfpublic void dragInitial(PvPickEvent event)
PvPickListenerIfdragInitial in interface PvPickListenerIfevent - Pick event issued by the displayPvPickListenerIfpublic void setGeometry(PgGeometry geom)
setGeometry in interface PjWorkshopIfsetGeometry in class PjWorkshopgeom - new geometrypublic void setEnabledHueColoring(boolean flag)
public int getMaxNumParticles()
public void setMaxNumParticles(int maxNumParticles)
maxNumParticles - the maximum number of particlespublic double getMaxAge()
public void setMaxAge(double maxAge)
maxAge - the maximum agepublic double getEmitInterval()
public void setEmitInterval(double emitInterval)
emitInterval - public double getSpeed()
public void setSpeed(double speed)
speed - the speed of the particlespublic boolean update(java.lang.Object event)
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 PsUpdateIfupdate in class PjWorkshopevent - sender of this update.PsObject.setParent(PsUpdateIf),
PsObject.getFather(),
PsObject.addUpdateListener(PsUpdateIf)"