org.osm2world.core.world.network
public abstract class JunctionNodeWorldObject extends OutlineNodeWorldObject
Modifier and Type | Field and Description |
---|---|
protected List<VectorXZ> |
cutCenters |
protected List<VectorXZ> |
cutVectors |
protected boolean |
informationProvided |
protected List<Float> |
widths |
node
Constructor and Description |
---|
JunctionNodeWorldObject(MapNode node) |
Modifier and Type | Method and Description |
---|---|
protected VectorXZ |
getCutNode(int i,
boolean right)
calculates the left or right node of a cut
(Only available if junction information for this representation has been
provided using
setInformation(List, List, List) ). |
List<VectorXZ> |
getOutline(int from,
int to)
provides outline for the areas covered by the junction.
|
SimplePolygonXZ |
getOutlinePolygonXZ()
returns a counterclockwise polygon defining the object's ground footprint,
projected onto the XZ plane.
|
void |
setInformation(List<VectorXZ> cutCenters,
List<VectorXZ> cutVectors,
List<Float> widths)
sets the results of
NetworkCalculator 's calculations. |
defineEleConstraints, getAxisAlignedBoundingBoxXZ, getEleConnectors, getOutlinePolygon, getPrimaryMapElement, getTriangulation, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getGroundState
protected boolean informationProvided
protected List<VectorXZ> cutVectors
protected List<VectorXZ> cutCenters
protected List<Float> widths
public JunctionNodeWorldObject(MapNode node)
public void setInformation(List<VectorXZ> cutCenters, List<VectorXZ> cutVectors, List<Float> widths)
NetworkCalculator
's calculations.
Cut information will not be created for all way/area segments.
The lists can therefore contain null entries.cutCenters
- centers of the cuts to each;
indices are the same as for the GridNode's MapNode.getConnectedSegments()
cutVectors
- vectors describing indicating the cut line,
pointing to the right from the node's pov;
for indices see junctionCutCenterswidths
- widths of the junction cut;
for indices see junctionCutCenterspublic SimplePolygonXZ getOutlinePolygonXZ()
WorldObjectWithOutline
getOutlinePolygonXZ
in interface WorldObjectWithOutline
getOutlinePolygonXZ
in class OutlineNodeWorldObject
protected VectorXZ getCutNode(int i, boolean right)
setInformation(List, List, List)
).public List<VectorXZ> getOutline(int from, int to)
MapNode
's
MapNode.getConnectedSegments()
method.