java.lang.Object
de.grogra.graph.impl.Edge
de.grogra.graph.impl.Node
de.grogra.imp3d.objects.Null
de.grogra.imp3d.objects.ColoredNull
de.grogra.imp3d.objects.Point
de.grogra.imp3d.objects.GRSVertex
- All Implemented Interfaces:
Transformation
,Pickable
,Renderable
,Manageable
,PersistenceCapable
,Shareable
,UserFields
,XObject
,Map
,Serializable
A
GRSVertex
is used in conjunction with a
GRSMesh
to define a graph rotation system. It has
a cyclic list of neighbors stored in neighbors
.- Author:
- Ole Kniemeyer
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class de.grogra.graph.impl.Node
Node.AccessorBridge, Node.FieldAttributeAccessor, Node.NType
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Node.NType
protected ObjectList<GRSVertex>
Cyclic neighborhood of this vertex.static final Node.NType.Field
protected float
u coordinate of vertexstatic final Node.NType.Field
protected float
v coordinate of vertexstatic final Node.NType.Field
Fields inherited from class de.grogra.imp3d.objects.ColoredNull
color, color$FIELD
Fields inherited from class de.grogra.imp3d.objects.Null
transform, transform$FIELD, TRANSFORMING_MASK, transforming$FIELD, USED_BITS
Fields inherited from class de.grogra.graph.impl.Node
ADDITIONAL_FIELDS, bits, DELETED, EXTENT_BIT, EXTENT_MASK, extentIndex$FIELD, extentTail$FIELD, HAS_OBSERVERS, IS_INTERPRETIVE, isInterpretive$FIELD, LAST_EXTENT_INDEX, layer$FIELD, MARK, mark$FIELD, MAX_RESOLUTION, MIME_TYPE, MIN_RESOLUTION, MIN_UNUSED_SPECIAL_OF_SOURCE, MIN_UNUSED_SPECIAL_OF_TARGET, name$FIELD, RESOLUTION_BIT, RESOLUTION_MASK, resolution$FIELD
Fields inherited from interface de.grogra.util.Map
DEFAULT_VALUE, EMPTY_MAP
-
Constructor Summary
ConstructorsConstructorDescriptionGRSVertex
(double x, double y, double z) Creates a newGRSVertex
at the specifed location. -
Method Summary
Modifier and TypeMethodDescriptionfirst()
Returns the first neighbor of the cyclic list of neighbors.getNeighbor
(int i) Returns the neighbor having indexi
.int
Returns the index ofv
in the cyclic list of neighbors.protected Node.NType
This method returns theNode.NType
which describes the managed fields of the class of this node.float
getU()
float
getV()
neighbors
(ObjectConsumer<? super GRSVertex> cons) Yields all neighbors tocons
.protected Node
This method returns a new instance of the class of this node.Returns the vertex which is thej
-th successor of this vertex in the neighbor list ofref
.Returns the vertex which follows this vertex in the neighbor list ofref
.Returns the neighbor which is thej
-th successor ofn
in the cyclic list of neighbors.Returns the neighbor which followsn
in the cyclic list of neighbors.Returns the vertex which is thej
-th predecessor of this vertex in the neighbor list ofref
.Returns the vertex which precedes this vertex in the neighbor list ofref
.Returns the neighbor which is thej
-th predecessor ofn
in the cyclic list of neighbors.Returns the neighbor which precedesn
in the cyclic list of neighbors.void
setNeighbors
(ObjectList<GRSVertex> value) void
setU
(float value) void
setV
(float value) int
valence()
Returns the number of neighbors in the cyclic list of neighbors.Methods inherited from class de.grogra.imp3d.objects.ColoredNull
getColor, setColor, setColor, setColor
Methods inherited from class de.grogra.imp3d.objects.Null
getLocalTransformation, getTransform, getTranslation, isTransforming, postTransform, preTransform, setRotation, setScale, setTransform, setTransform, setTransform, setTransform, setTransform, setTransform, setTransform, setTransform, setTransforming, setTranslation
Methods inherited from class de.grogra.graph.impl.Node
addEdgeBitsTo, addReference, appendBranchNode, appendBranchNode, appendReferencesTo, clone, clone, cloneGraph, dump, dumpTree, dup, dupFrom, dupnew, dupUnmanagedFields, edgeChanged, fieldModified, findAdjacent, findRefinementType, get, getAccessor, getAccessor, getAttributes, getAxisParent, getBoolean, getBranch, getBranchLength, getBranchNode, getBranchTail, getByte, getChar, getCommonAncestor, getCurrentGraphState, getDirectChildCount, getDouble, getEdgeAttributeAccessor, getEdgeAttributes, getEdgeBitsTo, getEdgeTo, getExtentIndex, getFirst, getFirstEdge, getFloat, getGraph, getId, getIgnored, getIndex, getInstantiator, getInt, getLayer, getLong, getManageableType, getName, getNeighbor, getNext, getNType, getObject, getOrCreateEdgeTo, getOrNull, getPersistenceManager, getPredecessor, getProvider, getResolution, getShort, getSource, getStamp, getSuccessor, getSymbol, getSymbolColor, getTarget, getTransaction, getUserField, getUserFieldCount, getXClass, getXData, hasName, initProvider, initXClass, insertBranchNode, insertBranchNode, instantiateGraph, isAncestorOf, isDirection, isEncoarseOf, isManagingInstance, isMarked, isRoot, isSource, isTarget, manageableReadResolve, manageableWriteReplace, paramString, removeAll, removeEdgeBitsTo, removeFromChain, removeFromChain, removeReference, setBranch, setBranch, setExtentIndex, setGraphForDeserialization, setIgnored, setLayer, setMark, setName, setResolution, setSuccessor, setSuccessor, specialEdgeAdded, specialEdgeRefModified, specialEdgeRemoved, toString, writeReplace
Methods inherited from class de.grogra.graph.impl.Edge
addEdgeBits, getBitMark, getEdgeBits, getEdgeKeys, getObjectMark, getSpecialEdgeDescriptor, parseEdgeKeys, remove, removeEdgeBits, setBitMark, setEdgeBits, setObjectMark, testEdgeBits
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface de.grogra.persistence.PersistenceCapable
getBitMark, getObjectMark, setBitMark, setObjectMark
-
Field Details
-
neighbors
Cyclic neighborhood of this vertex. This contains all neighboring vertices (those that are connected with this vertex by an edge of the polygon mesh). The neighbors are sorted in a cyclic way, namely in counter-clockwise order when seen from above of the mesh. -
u
protected float uu coordinate of vertex -
v
protected float vv coordinate of vertex -
$TYPE
-
neighbors$FIELD
-
u$FIELD
-
v$FIELD
-
-
Constructor Details
-
GRSVertex
public GRSVertex() -
GRSVertex
-
GRSVertex
public GRSVertex(double x, double y, double z) Creates a newGRSVertex
at the specifed location. The transformation is set to aTVector3d
initialized with(x, y, z)
.- Parameters:
x
- relative x coordinatey
- relative y coordinatez
- relative z coordinate
-
-
Method Details
-
getNeighborIndex
Returns the index ofv
in the cyclic list of neighbors.- Parameters:
v
- a vertex- Returns:
- index of
v
in neighbor list, or -1 ifv
is not contained
-
valence
public int valence()Returns the number of neighbors in the cyclic list of neighbors.- Returns:
- number of neighbors
-
neighbors
Yields all neighbors tocons
. This may be used as an XL generator method.- Parameters:
cons
- consumer which receives the neighbors- Returns:
null
-
getNeighbor
Returns the neighbor having indexi
.- Parameters:
i
- index of neighbor- Returns:
- neighbor
i
in cyclic list
-
nextTo
Returns the neighbor which followsn
in the cyclic list of neighbors.- Parameters:
n
- a neighbor- Returns:
- successor of
n
, ornull
ifn
is not a neighbor of this vertex
-
prevTo
Returns the neighbor which precedesn
in the cyclic list of neighbors.- Parameters:
n
- a neighbor- Returns:
- predecessor of
n
, ornull
ifn
is not a neighbor of this vertex
-
nextTo
Returns the neighbor which is thej
-th successor ofn
in the cyclic list of neighbors.- Parameters:
j
- distance fromn
in cyclic neighbor listn
- a neighbor- Returns:
j
-th successor ofn
, ornull
ifn
is not a neighbor of this vertex
-
prevTo
Returns the neighbor which is thej
-th predecessor ofn
in the cyclic list of neighbors.- Parameters:
j
- distance fromn
in cyclic neighbor listn
- a neighbor- Returns:
j
-th predecessor ofn
, ornull
ifn
is not a neighbor of this vertex
-
first
Returns the first neighbor of the cyclic list of neighbors.- Returns:
- first neighbor of this vertex, or
null
if it has no neighbors
-
next
Returns the vertex which follows this vertex in the neighbor list ofref
. Same asref.nextTo (this)
.- Parameters:
ref
- vertex of whichthis
is a neighbor- Returns:
- successor of
this
inref
's neighbor list, ornull
ifthis
is not a neighbor ofref
-
prev
Returns the vertex which precedes this vertex in the neighbor list ofref
. Same asref.prevTo (this)
.- Parameters:
ref
- vertex of whichthis
is a neighbor- Returns:
- predecessor of
this
inref
's neighbor list, ornull
ifthis
is not a neighbor ofref
-
next
Returns the vertex which is thej
-th successor of this vertex in the neighbor list ofref
. Same asref.nextTo (j, this)
.- Parameters:
ref
- vertex of whichthis
is a neighbor- Returns:
j
-th successor ofthis
inref
's neighbor list, ornull
ifthis
is not a neighbor ofref
.
-
prev
Returns the vertex which is thej
-th predecessor of this vertex in the neighbor list ofref
. Same asref.prevTo (j, this)
.- Parameters:
ref
- vertex of whichthis
is a neighbor- Returns:
j
-th predecessor ofthis
inref
's neighbor list, ornull
ifthis
is not a neighbor ofref
.
-
getNTypeImpl
Description copied from class:Node
This method returns theNode.NType
which describes the managed fields of the class of this node. This method has to be implemented in every concrete subclass.- Overrides:
getNTypeImpl
in classPoint
- Returns:
- type describing the managed fields of the class of this node
-
newInstance
Description copied from class:Node
This method returns a new instance of the class of this node. This method has to be implemented in every concrete subclass.- Overrides:
newInstance
in classPoint
- Returns:
- new instance of class of this node
-
getU
public float getU() -
setU
public void setU(float value) -
getV
public float getV() -
setV
public void setV(float value) -
getNeighbors
-
setNeighbors
-