public class PgVertexStar extends PsObject
element 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.
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 and Description |
---|
PgVertexStar() |
Modifier and Type | Method and Description |
---|---|
void |
copy(PsObject object)
Copy a given vertex star into this object.
|
int |
findEdge(PgElementSet geom,
int locInd)
Find index of edge connecting the vertex with an vertex in the link.
|
PiVector |
findEdges(PgElementSet elemSet,
PiVector edge)
Get indices of the edges connecting the central vertices with its link vertices.
|
PiVector |
getElement()
Get list of element indices of vertex star.
|
boolean |
getElementOrientation(PgElementSet geom,
int locInd)
Returns true, if the adjacent element is positive oriented relative
to the orientation of the vertex star.
|
static PiVector |
getElementPerVertex(PgElementSet elemSet)
Generate a PiVector
elements , such that elements.m_data[i]
references either an element incident to vertex i , or
elements.m_data[i]=-1 in case vertex i is isolated. |
int |
getFirstElemInd()
Get the index of first elemInd in m_element array of vertex star.
|
PiVector |
getLink()
Get list of vertex indices of vertex star.
|
int |
getSize()
Get number of elements in vertex star.
|
PiVector |
getVertexLocInd()
Get list of local indices of central vertex in adjacent elements.
|
void |
init()
If instance has missing name then assign default name 'Object_NUMBER' where
number is the total number of already created instances.
|
boolean |
isClosed()
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.
|
void |
makeVertexStar(PgElementSet elemSet,
int vertexInd,
int elemInd)
Create the vertex star of a vertex of an element set.
|
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.
|
void |
setSize(int size,
boolean closed)
Set number of elements in vertex star.
|
java.lang.String |
toString()
Create a multi-line string representation
with detailed information about all instance variables.
|
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
public void init()
PsObject
public java.lang.String toString()
public void copy(PsObject object)
copy
in class PsObject
PsObject.clone()
public PiVector getElement()
public PiVector getLink()
getElement()
.public PiVector getVertexLocInd()
public boolean isClosed()
public int getFirstElemInd()
public int getSize()
public void setSize(int size, boolean closed)
public static PiVector getElementPerVertex(PgElementSet elemSet)
elements
, such that elements.m_data[i]
references either an element incident to vertex i
, or
elements.m_data[i]=-1
in case vertex i
is isolated.
If vertex i
is a boundary vertex, then elements.m_data[i]
references a boundary element.elemSet
- PgElementSetelements
,
such that elements.m_data[i]
is either an element
incident to vertex i
, or -1, if vertex i
is isolated.public static PiVector[] makeVertexNeighbours(PgElementSet geom)
public PiVector findEdges(PgElementSet elemSet, PiVector edge)
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.makeVertexStar(PgElementSet, int, int)
public int findEdge(PgElementSet geom, int locInd)
geom
- Base geometry.locInd
- Local index of neighbour vertex in link.public boolean getElementOrientation(PgElementSet geom, int locInd)
locInd
- Local element index.public void makeVertexStar(PgElementSet elemSet, int vertexInd, int elemInd)
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.
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.public void reverse()
"