jvx.geom
Class PgVertexStar
- java.lang.Object
-
- jv.object.PsObject
-
- jvx.geom.PgVertexStar
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, PsUpdateIf
public class PgVertexStar extends PsObject
Vertex star of a vertex describes all elements which join a single vertex. The class contains information aboutelement indices of all elements around central vertex in counter-clockwise orientation. vertex indices of all vertices in link in counter-clockwise orientation. local indices of central vertex in each element.- See Also:
- Serialized Form
- Author:
- Konrad Polthier
- Version:
- 05.07.06, 2.30 revised (fk) Method
findElementsadded.
02.07.06, 2.20 revised (kp) Instance variable m_vertexInd removed since never used.
16.01.02, 2.10 revised (ep) Internationalization.
01.04.00, 2.00 revised (kp) Moved from package jv.rsrc to jvx.rsrc.
13.09.99, 1.05 revised (kp) Revisions 1.01 and 1.02 merged into JavaView.
03.09.99, 1.04 revised (ur) Private reference to element set removed.
16.08.99, 1.03 revised (ur) makeVertexStar: Enabled using for not orientable ElementSets.
16.08.99, 1.02 revised (ep) MethodgetFirstElemIndadded.
14.08.99, 1.01 revised (ep) MethodisClosedadded.
18.07.99, 1.00 created (kp)
-
-
Field Summary
-
Fields inherited from class jv.object.PsObject
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
-
-
Constructor Summary
Constructors Constructor and Description PgVertexStar()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidcopy(PsObject object)Copy a given vertex star into this object.intfindEdge(PgElementSet geom, int locInd)Find index of edge connecting the vertex with a vertex in the link.PiVectorfindEdges(PgElementSet elemSet, PiVector edge)Get indices of the edges connecting the central vertices with its link vertices.PiVectorgetElement()Get list of element indices of vertex star.booleangetElementOrientation(PgElementSet geom, int locInd)Returns true, if the adjacent element is positive oriented relative to the orientation of the vertex star.static PiVectorgetElementPerVertex(PgElementSet elemSet)For all vertices compute the index of an incident element.intgetFirstElemInd()Get the index of first elemInd in m_element array of vertex star.PiVectorgetLink()Get list of vertex indices of vertex star.intgetSize()Get number of elements in vertex star.PiVectorgetVertexLocInd()Get list of local indices of central vertex in adjacent elements.voidinit()If instance has missing name then assign default name 'Object_NUMBER' where number is the total number of already created instances.booleanisClosed()Returns whether vertex star around a point is closed.static PiVector[]makeVertexNeighbours(PgElementSet geom)Generate a PiVector[] which contains a list of adjacent vertices for each vertex of the geometry.voidmakeVertexStar(PgElementSet elemSet, int vertexInd, int elemInd)Create the vertex star of a vertex of an element set.voidreverse()Reverses the pass through the vertex star, e.g. the order of the neighbour elements and vertices will change between counterclockwise and clockwise.voidsetSize(int size, boolean closed)Set number of elements in vertex star.java.lang.StringtoString()Create a multi-line string representation with detailed information about all instance variables.-
Methods inherited from class jv.object.PsObject
addInspector, addUpdateListener, assureInspector, clearTag, clone, clone, clone, getFather, getInfoPanel, getInspector, getName, getNumObjects, getSymbol, hasInspector, hasTag, hasUpdateListener, instanceOf, instanceOf, newInspector, newInspector, removeInspector, removeInspector, removeUpdateListener, setName, setParent, setSymbol, setTag, update, updatePanels
-
-
-
-
Method Detail
-
init
public void init()
Description copied from class:PsObjectIf instance has missing name then assign default name 'Object_NUMBER' where number is the total number of already created instances.
-
toString
public java.lang.String toString()
Create a multi-line string representation with detailed information about all instance variables.
-
copy
public void copy(PsObject object)
Copy a given vertex star into this object.- Overrides:
copyin classPsObject- See Also:
PsObject.clone()
-
getElement
public PiVector getElement()
Get list of element indices of vertex star.
-
getLink
public PiVector getLink()
Get list of vertex indices of vertex star. Vertices i and (i+1) in this list belong to element i ofgetElement().
-
getVertexLocInd
public PiVector getVertexLocInd()
Get list of local indices of central vertex in adjacent elements.
-
isClosed
public boolean isClosed()
Returns whether vertex star around a point is closed. Vertex star is closed if and only if point lies in the interior of a surface. If point lies on the surface boundary then the vertex star is not closed.
-
getFirstElemInd
public int getFirstElemInd()
Get the index of first elemInd in m_element array of vertex star. If no first elemInd is supplied by user, then, if star is closed the m_firstElemInd is the first element of the surface referencing the central vertex, or, if star is not closed, the element on the boundary is taken such that one walks through the star counter-clockwise.
-
getSize
public int getSize()
Get number of elements in vertex star.
-
setSize
public void setSize(int size, boolean closed)Set number of elements in vertex star.
-
getElementPerVertex
public static PiVector getElementPerVertex(PgElementSet elemSet)
For all vertices compute the index of an incident element. Method returns a PiVectorelementsof length number of vertices, such thatelements.m_data[i]either is the index of an element incident to vertexi, or is-1in case vertexiis isolated. If vertexiis a boundary vertex, then a boundary element is given.- Parameters:
elemSet- PgElementSet- Returns:
- A PiVector
elements, such thatelements.m_data[i]is either an element incident to vertexi, or -1, if vertexiis isolated. - Author:
- Felix Kaelberer
- Version:
- 05.07.06, 1.00 created (fk)
-
makeVertexNeighbours
public static PiVector[] makeVertexNeighbours(PgElementSet geom)
Generate a PiVector[] which contains a list of adjacent vertices for each vertex of the geometry.- Author:
- Matthias Nieser
- Version:
- 16.05.08, 1.10 revised (fk) avoid PiVector.addEntry().
05.03.08, 1.00 created (mn)
-
findEdges
public PiVector findEdges(PgElementSet elemSet, PiVector edge)
Get indices of the edges connecting the central vertices with its link vertices. The provided vertex star must have been made with the same underlying element set.- Parameters:
elemSet- The element set, which was used to create the vertex star.edge- The output PiVector which is filled with edge indices. May be null.- Returns:
- PiVector of indices of the edges incident to the central vertex.
- See Also:
makeVertexStar(PgElementSet, int, int)- Author:
- Felix Kaelberer
- Version:
- 07.01.2008, 2.00 revised (mn) Method shortened. Support handling of non-closed vertex stars.
18.04.2007, 1.00 created (fk)
-
findEdge
public int findEdge(PgElementSet geom, int locInd)
Find index of edge connecting the vertex with a vertex in the link.- Parameters:
geom- Base geometry.locInd- Local index of neighbour vertex in link.- Returns:
- Global index of edge connecting the two vertices or -1 in case of error.
- Author:
- Matthias Nieser
- Version:
- 07.01.08, 1.00 created (mn)
-
getElementOrientation
public boolean getElementOrientation(PgElementSet geom, int locInd)
Returns true, if the adjacent element is positive oriented relative to the orientation of the vertex star.- Parameters:
locInd- Local element index.- Author:
- Matthias Nieser
- Version:
- 07.01.08, 1.00 created (mn)
-
makeVertexStar
public void makeVertexStar(PgElementSet elemSet, int vertexInd, int elemInd)
Create the vertex star of a vertex of an element set.If
elemInd!=-1, then, if star is closed, elemInd is the first element referencing the central vertex, or, if star is not closed, the element on those boundary is taken such that one walks through the star counter-clockwise.For efficiency applications are advised to supply the index of an element in the argument list. This avoids an initial run through the set of elements.
If neighbourhood is incorrect then warnings are issued.
- Parameters:
elemSet- PgElementSetvertexInd- Index of vertex in global vertex array of elemSetelemInd- Index of element in global element array which references the vertex, might be -1.- Author:
- Konrad Polthier
- Version:
- 15.05.04, 1.30 revised (kp) Better checks for incorrect neighbourhood.
26.05.02, 1.20 revised (kp) Adjacent elements with many common edges allowed.
16.08.99, 1.10 revised (ur) Enabled usage for not oriented surfaces.
31.12.97, 1.00 created (kp)
-
reverse
public void reverse()
Reverses the pass through the vertex star, e.g. the order of the neighbour elements and vertices will change between counterclockwise and clockwise.- Author:
- Matthias Nieser
- Version:
- 28.11.07, 1.00 created (mn)
-
-
"