org.osm2world.core.world.network
Class VisibleConnectorNodeWorldObject
Object
VisibleConnectorNodeWorldObject
- All Implemented Interfaces:
- IntersectionTestObject, NodeWorldObject, WorldObject, WorldObjectWithOutline
- Direct Known Subclasses:
- RoadModule.RoadCrossingAtConnector
public abstract class VisibleConnectorNodeWorldObject
- extends Object
- implements NodeWorldObject, IntersectionTestObject, WorldObjectWithOutline
Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
node
protected final MapNode node
informationProvided
protected boolean informationProvided
cutVector
protected VectorXZ cutVector
startPos
protected VectorXZ startPos
endPos
protected VectorXZ endPos
startWidth
protected float startWidth
endWidth
protected float endWidth
VisibleConnectorNodeWorldObject
public VisibleConnectorNodeWorldObject(MapNode node)
getLength
public abstract float getLength()
- returns the length required by this node representation.
Adjacent lines will be pushed back accordingly.
If this is 0, this has the same effect as an invisible
connector node (adjacent line representations
directly touching each other). Examples where non-zero values
are needed include crossings at nodes in roads.
Needs to be provided by the implementing class before the
calculation in
NetworkCalculator
starts.
setInformation
public void setInformation(VectorXZ cutVector,
VectorXZ startPos,
VectorXZ endPos,
float startWidth,
float endWidth)
- sets the results of
NetworkCalculator
's calculations.
Most methods in this class cannot be used until this method
has provided the required information!
getOutline
public List<VectorXYZ> getOutline(int from,
int to)
- provides outline for the areas covered by the connector.
The from and to indices refer to the list
returned by the underlying
MapNode
's
MapNode.getConnectedSegments()
method.
TODO: method necessary after Terrain change?
getOutlinePolygon
public PolygonXYZ getOutlinePolygon()
- Description copied from interface:
WorldObjectWithOutline
- returns a counterclockwise polygon defining the object's ground footprint.
- Specified by:
getOutlinePolygon
in interface WorldObjectWithOutline
- Returns:
- outline polygon; null if this world object doesn't cover any area
getAxisAlignedBoundingBoxXZ
public AxisAlignedBoundingBoxXZ getAxisAlignedBoundingBoxXZ()
- Specified by:
getAxisAlignedBoundingBoxXZ
in interface IntersectionTestObject
toString
public String toString()
- Overrides:
toString
in class Object