|
JavaView® v2.00.008 | ||||||||
| 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 getCurve().
| Field Summary | |
protected PvDisplayIf |
m_disp
|
protected PdBary |
m_endbary
|
protected PuInteger |
m_endElem
|
protected PgElementSet |
m_geom
|
protected boolean |
m_pick
|
protected boolean |
m_pickFirst
|
protected PgPolygon |
m_poly
|
protected PdBary |
m_startbary
|
protected PuInteger |
m_startElem
|
| Fields inherited from class jv.object.PsObject |
HAS_CONFIG_PANEL, HAS_INFO_PANEL, HAS_MATERIAL_PANEL, INSPECTOR_INFO, INSPECTOR_INFO_EXT, IS_DELETED, IS_FIXED, IS_SELECTED, IS_USED, m_infoPanel, m_name, m_panelList, m_parent, m_tag, m_updateList, NUM_TAGS |
| Constructor Summary | |
PwGeodesic()
|
|
| Method Summary | |
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. |
protected void |
fixpolygon()
|
protected static int[] |
getConnectingStrip(PgElementSet geom,
int startelem,
int endelem)
Gets a strip from startelem to endelem by marking the elements (beginning with startelem) and their neighbours with the 'distance' to the starting element (measured in 'number of elements') until the endelement is reached. |
java.lang.String |
getName()
The name of a listeners allows the display to issue verbal debug messages. |
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()
If instance has missing name then assign default name 'object_NUMBER' where number is the total number of already created instances. |
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)
|
void |
setGeometry(PgElementSet elemset)
|
void |
setPickFirst()
|
void |
setPickLast()
|
protected void |
showWay(int startelem,
PdBary startbary,
int endelem,
PdBary endbary)
|
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, 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, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected PgElementSet m_geom
protected PvDisplayIf m_disp
protected PuInteger m_startElem
protected PuInteger m_endElem
protected PdBary m_startbary
protected PdBary m_endbary
protected PgPolygon m_poly
protected boolean m_pickFirst
protected boolean m_pick
| Constructor Detail |
public PwGeodesic()
| Method Detail |
public void init()
PsObjectinit in class PsObjectpublic void setGeometry(PgElementSet elemset)
public void setDisplay(PvDisplayIf disp)
public void close()
protected void fixpolygon()
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 displayPvPickListenerIf
protected void showWay(int startelem,
PdBary startbary,
int endelem,
PdBary endbary)
public 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()
protected static int[] getConnectingStrip(PgElementSet geom,
int startelem,
int endelem)
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.00.008 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||