JavaView© v3.95.000

jvx.geom
Class PwSingleIntegralLine

java.lang.Object
  extended byjv.object.PsObject
      extended byjvx.project.PjWorkshop
          extended byjvx.geom.PwSingleIntegralLine
All Implemented Interfaces:
java.lang.Cloneable, PjWorkshopIf, PsUpdateIf, PvPickListenerIf, java.io.Serializable

public class PwSingleIntegralLine
extends PjWorkshop
implements PvPickListenerIf

Compute a single integral line of a given vector field on a triangulated surface.

Assign a surface by setGeometry(PgGeometry) and a display where the calculated integral line will show up by setDisplay(PvDisplayIf) (if you wish that behaviour). Various parameters may be configured.

Use method getInfoPanel() to get a control panel for parameters step size, number of steps and index of vector field.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class jv.object.PsObject
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
 
Constructor Summary
PwSingleIntegralLine()
           
 
Method Summary
 void cancel()
          Cancel operation of this workshop by resetting the assigned geometry, and finally close this workshop.
 void close()
          Call this method to shutdown the workshop.
 PgPolygon computeIntegralLine(PgElementSet geom, int vfIndex, int elemIndex, PdBary point, int numSteps, double stepSize, boolean fast, PgPolygon poly)
           
 PgPolygon computeIntegralLine(PgElementSet geom, int vfIndex, int elemIndex, PdBary point, int numSteps, double stepSize, boolean fast, PgPolygon poly, boolean ignoreDir)
           
 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.
 boolean getFast()
           
 boolean getIgnoreDirection()
           
 PgPolygon getIntegralLine()
          Get the polygon instance which is used for integration
 int getNumSteps()
          Get the number of steps that will be used for integration.
 double getStepSize()
          Get step size used for integration.
 int getVectorFieldIndex()
          Get index of the vector field that will be integrated.
 void init()
          Initializes by setting all parameters to initial values and removing computed integral lines.
 void markVertices(PvPickEvent event)
          Mark a set of vertices of a geometry within a given bounding box.
 void pickDisplay(PvPickEvent event)
          Get a location in the display with 2d display and 3d world coordinates.
 void pickInitial(PvPickEvent event)
          Pick an arbitrary point on a geometry, point may lie inside an element.
 void pickVertex(PgGeometryIf geom, int vertIndex, PdVector vector)
          Get a picked vertex of a geometry.
 void removeGeometry()
          Remove the assigned geometry and its backup clone.
 void removeIntegralLine()
          Removes previously computed integral line from the display and internal uses.
 void selectGeometry(PgGeometryIf event)
          Currently not supported by display.
 void setDisplay(PvDisplayIf disp)
          Set the display where computed integral lines will show up.
 void setFast(boolean flag)
           
 void setGeometry(PgGeometry geo)
          Set the geometry that will be used for integration.
 void setIgnoreDirection(boolean flag)
          Ignores the direction of vertex based vector fields, i.e.
 void setNumSteps(int num)
          Set the number of steps that will be used for integration.
 void setStepSize(double step)
          Set the step size used for integration.
 void setVectorFieldIndex(int vfIndex)
          Set the vector field that will be integrated by index in the element set as set by setGeometry(PgGeometry), beginning with index 0.
 void unmarkVertices(PvPickEvent event)
          Unmark a set of vertices of a geometry within a given bounding box.
 boolean update(java.lang.Object source)
          07.11.04, 1.10 revised (kh) Added checks to avoid calling recompute more than once.
 
Methods inherited from class jvx.project.PjWorkshop
getDisplay, getDisplays, getGeometry, getSavedGeometry, getViewer, isModal, ok, reset, setDisplays, setModal, setViewer
 
Methods inherited from class jv.object.PsObject
addInspector, 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, updatePanels
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface jv.project.PvPickListenerIf
getName
 
Methods inherited from interface jv.object.PsUpdateIf
getFather, getName, setParent
 

Constructor Detail

PwSingleIntegralLine

public PwSingleIntegralLine()
Method Detail

init

public void init()
Initializes by setting all parameters to initial values and removing computed integral lines. Does not remove the settings for geometry and display!

Overrides:
init in class PjWorkshop

setGeometry

public void setGeometry(PgGeometry geo)
Set the geometry that will be used for integration. This geometry must be a triangulated element set!

A second call of the method will remove the previous setting. The workshop will register as an update listener to the given geometry to be informed about the number of vector fields on it.

A call with argument null removes the settings.

Specified by:
setGeometry in interface PjWorkshopIf
Overrides:
setGeometry in class PjWorkshop
Parameters:
geo - triangulated surface with vector field(s)
See Also:
PjWorkshop.getGeometry()

removeGeometry

public void removeGeometry()
Description copied from class: PjWorkshop
Remove the assigned geometry and its backup clone. Subclasses frequently overwrite this method but are adviced to call this method.

Overrides:
removeGeometry in class PjWorkshop

setDisplay

public void setDisplay(PvDisplayIf disp)
Set the display where computed integral lines will show up. Registeres the workshop as a pick listener.

A second call of the method will remove the previous setting.

Specified by:
setDisplay in interface PjWorkshopIf
Overrides:
setDisplay in class PjWorkshop
Parameters:
disp - display that will be used to present the results, may be null

update

public boolean update(java.lang.Object source)
07.11.04, 1.10 revised (kh) Added checks to avoid calling recompute more than once.

Specified by:
update in interface PsUpdateIf
Overrides:
update in class PjWorkshop
Parameters:
source - sender of this update.
Returns:
true if update was correctly handled by superclass.

setStepSize

public void setStepSize(double step)
Set the step size used for integration.

Parameters:
step - positive step size
See Also:
getStepSize(), setNumSteps(int)

getStepSize

public double getStepSize()
Get step size used for integration.

Returns:
positive step size
See Also:
setStepSize(double), getNumSteps()

setNumSteps

public void setNumSteps(int num)
Set the number of steps that will be used for integration.

Parameters:
num - number of integration steps
See Also:
getNumSteps(), setStepSize(double)

getNumSteps

public int getNumSteps()
Get the number of steps that will be used for integration.

See Also:
setNumSteps(int), getStepSize()

setFast

public void setFast(boolean flag)

getFast

public boolean getFast()

setVectorFieldIndex

public void setVectorFieldIndex(int vfIndex)
Set the vector field that will be integrated by index in the element set as set by setGeometry(PgGeometry), beginning with index 0.

Parameters:
vfIndex - index of vector field that shall be visualized 0,...
See Also:
getVectorFieldIndex(), setGeometry(PgGeometry)

getVectorFieldIndex

public int getVectorFieldIndex()
Get index of the vector field that will be integrated.

See Also:
setVectorFieldIndex(int)

getIntegralLine

public PgPolygon getIntegralLine()
Get the polygon instance which is used for integration

Returns:
the polygon set that is updated at each computation

removeIntegralLine

public void removeIntegralLine()
Removes previously computed integral line from the display and internal uses. Next computation of a integral line will create a new polygon, the old polygon will not be updated with further results but the new one will. This new polygon will be returned by method getIntegralLine().

See Also:
getIntegralLine()

close

public void close()
Call this method to shutdown the workshop. Removes the workshop from the list of update listeners of the geometry and from the list of pick listeners of the display.

Overrides:
close 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

markVertices

public void markVertices(PvPickEvent event)
Description copied from interface: PvPickListenerIf
Mark a set of vertices of a geometry within a given bounding box.

Specified by:
markVertices in interface PvPickListenerIf
Parameters:
event - contains two points on the bounding box.

selectGeometry

public void selectGeometry(PgGeometryIf event)
Description copied from interface: PvPickListenerIf
Currently not supported by display.

Specified by:
selectGeometry in interface PvPickListenerIf

pickVertex

public void pickVertex(PgGeometryIf geom,
                       int vertIndex,
                       PdVector vector)
Description copied from interface: PvPickListenerIf
Get a picked vertex of a geometry.

Specified by:
pickVertex in interface PvPickListenerIf
Parameters:
geom - Picked geometry on which vertex lies
vertIndex - Index of vertex in vertex array of geometry
vector - 3d coordinates of vertex position
See Also:
PvPickListenerIf

pickDisplay

public void pickDisplay(PvPickEvent event)
Description copied from interface: PvPickListenerIf
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:
event - Pick event issued by the display
See Also:
PvPickListenerIf

unmarkVertices

public void unmarkVertices(PvPickEvent event)
Description copied from interface: PvPickListenerIf
Unmark a set of vertices of a geometry within a given bounding box.

Specified by:
unmarkVertices in interface PvPickListenerIf
Parameters:
event - contains two points on the bounding box.

dragVertex

public void dragVertex(PgGeometryIf geom,
                       int vertindex,
                       PdVector vector)
Description copied from interface: PvPickListenerIf
Drag a picked vertex of a geometry.

Specified by:
dragVertex in interface PvPickListenerIf
Parameters:
geom - Picked geometry on which vertex lies
vertindex - Index of vertex in vertex array of geometry
vector - 3d coordinates of vertex position

dragDisplay

public void dragDisplay(PvPickEvent event)
Description copied from interface: PvPickListenerIf
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:
event - Pick event issued by the display
See Also:
PvPickListenerIf

dragInitial

public void dragInitial(PvPickEvent event)
Description copied from interface: PvPickListenerIf
Drag an arbitrary point along a geometry, point may lie inside an element.

Specified by:
dragInitial in interface PvPickListenerIf
Parameters:
event - Pick event issued by the display
See Also:
PvPickListenerIf

pickInitial

public void pickInitial(PvPickEvent event)
Description copied from interface: PvPickListenerIf
Pick an arbitrary point on a geometry, point may lie inside an element.

Specified by:
pickInitial in interface PvPickListenerIf
Parameters:
event - Pick event issued by the display
See Also:
PvPickListenerIf

setIgnoreDirection

public void setIgnoreDirection(boolean flag)
Ignores the direction of vertex based vector fields, i.e. at each point there are two possible vectors: + and - the original vector.

Since:
JavaView 2.48.007

getIgnoreDirection

public boolean getIgnoreDirection()
Since:
JavaView 2.48.007

computeIntegralLine

public PgPolygon computeIntegralLine(PgElementSet geom,
                                     int vfIndex,
                                     int elemIndex,
                                     PdBary point,
                                     int numSteps,
                                     double stepSize,
                                     boolean fast,
                                     PgPolygon poly)

computeIntegralLine

public PgPolygon computeIntegralLine(PgElementSet geom,
                                     int vfIndex,
                                     int elemIndex,
                                     PdBary point,
                                     int numSteps,
                                     double stepSize,
                                     boolean fast,
                                     PgPolygon poly,
                                     boolean ignoreDir)

JavaView© v3.95.000

The software JavaView© is copyright protected. All Rights Reserved.