|
JavaView® v2.12 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--jv.object.PsObject
|
+--jvx.geom.PwGeodesic
Workshop for the computation of shortest geodesics that connect two given points on
an element set. Can be used as numerics library by use of static method
getShortest(...)
or as a workshop by making an instance of PwGeodesic and registering a geometry
and a display. Pick events will be caught in the second case and the curve
automatically computed. You can access the computed curve by method
getPolygon(). After using the workshop you have
to call close() to tidy things up!
| Fields inherited from class jv.object.PsObject |
HAS_CONFIG_PANEL, HAS_INFO_PANEL, HAS_MATERIAL_PANEL, HAS_TEXTURE_PANEL, INSPECTOR_INFO, INSPECTOR_INFO_EXT, IS_DELETED, IS_FIXED, IS_SELECTED, IS_USED, NUM_TAGS |
| Constructor Summary | |
PwGeodesic()
|
|
| Method Summary | |
void |
cancel()
|
void |
close()
Has to be called to remove workshop from element set as update listener and to remove polygon from display. |
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. |
PvDisplayIf |
getDisplay()
Display where geodesics are shown and where pick events are caught from. |
PgElementSet |
getGeometry()
Geodesics are computed on this surface. |
java.lang.String |
getName()
The name of a listeners allows the display to issue verbal debug messages. |
PgPolygon |
getPolygon()
The computed geodesic as an independent n-dimensional polygon. |
PgPolygonOnElementSet |
getPolygonOnElementSet()
The computed geodesic as a polygon that depends on the geometry. |
static PgPolygonOnElementSet |
getShortest(PgElementSet geom,
PdBary start,
int startelem,
PdBary end,
int endelem)
Computes a shortest geodesic that connects given points on a triangulation. |
static PgPolygon[] |
getShortestInStrip(PgElementSet geom,
PdBary start,
PdBary end,
int[] strip,
PiVector outSide,
PiVector outvertind,
PdBaryDir initialDir)
Computes the shortest polygon between two points that lies in elements that is given as parameter. |
void |
init()
Sets the default length, angle and method. |
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 |
setDisplay(PvDisplayIf disp)
Sets the display where the resulting geodesic shall be shown. |
void |
setEndBary(PdBary bary)
Set the endpoint of the geodesic. |
void |
setEndElement(int elemindex)
Set the element where the geodesic shall end in. |
void |
setGeometry(PgElementSet elemset)
Geodesics are computed on the given surface. |
void |
setMethodStraightest()
Compute STRAIGHTEST geodesics. |
void |
setPickFirst()
User shall pick starting point. |
void |
setPickLast()
User shall pick endpoint. |
void |
setStartBary(PdBary bary)
Set the starting point of the geodesic. |
void |
setStartElement(int elemindex)
Set the element where the geodesic shall start in. |
void |
unmarkVertices(PvPickEvent pos)
Unmark a set of vertices of a geometry within a given bounding box. |
boolean |
update(java.lang.Object event)
Update the class whenever a child has changed. |
| Methods inherited from class jv.object.PsObject |
addInspector, addUpdateListener, assureInspector, clearTag, clone, clone, clone, copy, getFather, getInfoPanel, getInspector, getNumObjects, hasInspector, hasTag, hasUpdateListener, instanceOf, instanceOf, removeInspector, removeUpdateListener, setName, setParent, setTag, toString, updatePanels |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public PwGeodesic()
| Method Detail |
public void init()
init in class PsObjectpublic void setGeometry(PgElementSet elemset)
elemset - must be a triangulation! may be null to
indicate that the geometry settings of this workshop shall be removed.public PgElementSet getGeometry()
setGeometry(PgElementSet)public void setDisplay(PvDisplayIf disp)
disp - may be null - then the geodesic is not shown anywhere (default)public PvDisplayIf getDisplay()
setDisplay(PvDisplayIf)public void close()
public void cancel()
public PgPolygon getPolygon()
public PgPolygonOnElementSet getPolygonOnElementSet()
public boolean update(java.lang.Object event)
update in class PsObjectjv.object.PsObjectPsObject.setParent(PsUpdateIf),
PsObject.getFather(),
PsObject.addUpdateListener(PsUpdateIf)public java.lang.String getName()
getName in interface PvPickListenerIfgetName in class PsObjectpublic void selectGeometry(PgGeometryIf geom)
selectGeometry in interface PvPickListenerIfpublic void pickDisplay(PvPickEvent pos)
pickDisplay in interface PvPickListenerIfpos - Pick event issued by the displayPvPickListenerIfpublic void dragDisplay(PvPickEvent pos)
dragDisplay in interface PvPickListenerIfpos - Pick event issued by the displayPvPickListenerIfpublic void pickInitial(PvPickEvent pos)
pickInitial in interface PvPickListenerIfpos - Pick event issued by the displayPvPickListenerIfpublic void dragInitial(PvPickEvent pos)
dragInitial in interface PvPickListenerIfpos - Pick event issued by the displayPvPickListenerIf
public void pickVertex(PgGeometryIf geom,
int index,
PdVector vertex)
pickVertex in interface PvPickListenerIfgeom - 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 PvPickListenerIfgeom - 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 PvPickListenerIfmarkBox - contains four coplanar points on the bounding prism, and direction of prism.public void unmarkVertices(PvPickEvent pos)
unmarkVertices in interface PvPickListenerIfmarkBox - contains four coplanar points on the bounding prism, and direction of prism.public void setPickFirst()
public void setPickLast()
public void setStartBary(PdBary bary)
bary - 3dim barycentric coordinates of starting point in start elementsetStartElement(int)public void setStartElement(int elemindex)
setStartBary(PdBary)public void setEndBary(PdBary bary)
bary - 3dim barycentric coordinates of endpoint in endelementsetEndElement(int)public void setEndElement(int elemindex)
setEndBary(PdBary)public void setMethodStraightest()
public static PgPolygon[] getShortestInStrip(PgElementSet geom,
PdBary start,
PdBary end,
int[] strip,
PiVector outSide,
PiVector outvertind,
PdBaryDir initialDir)
start - barycentric coordinates of starting point in element strip[0]end - barycentric coordinates of endpoint in element strip[strip.length-1]strip - array that contains the global element indices of the elements that shall be
traversed on the way from start to end. Must contain the elements in the order in which
they shall be traversed.outSide - output: contains numbers {0,1}. outSide.getEntry(i)==0 if i-th vertex
(exclusive starting and endpoint) of shortest polygon
lies on left border. ==1 if i-th vertex (exclusive starting and endpoint) of shortest polygon
lies on right border.outvertind - output: global vertex index in element set of the geometry vertex that the polygon
hits with its vertexinitialDir - output: initial barycentric direction of shortest polygon in element strip[0]
public static PgPolygonOnElementSet getShortest(PgElementSet geom,
PdBary start,
int startelem,
PdBary end,
int endelem)
geom - The element set. Must have valid neighourhood information and must be triangulated.start - Barycentric coordinates of starting point in starting elementstartelem - The starting element. Global index in geometry.end - Barycentric coordinates of endpoint in endelementendelem - The endelement. Global index in geometry.PgPolygonOnElementSet
|
JavaView® v2.12 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||