org.osm2world.core.map_data.data
public class MapSegment extends Object
Modifier and Type | Field and Description |
---|---|
protected MapNode |
endNode |
protected MapNode |
startNode |
Constructor and Description |
---|
MapSegment(MapNode startNode,
MapNode endNode) |
Modifier and Type | Method and Description |
---|---|
VectorXZ |
getCenter()
returns the center of the line
|
VectorXZ |
getDirection()
returns a normalized vector indicating the line's horizontal direction
|
MapNode |
getEndNode() |
LineSegmentXZ |
getLineSegment() |
MapNode |
getOtherNode(MapNode node) |
VectorXZ |
getRightNormal()
returns a the result of applying
VectorXZ.rightNormal()
to vector returned by getDirection() |
List<MapNode> |
getStartEndNodes() |
MapNode |
getStartNode() |
boolean |
isConnectedTo(MapArea other)
returns true if this MapSegment shares a node with a MapArea
|
boolean |
isConnectedTo(MapSegment other)
returns true if this MapSegment shares a node with another MapSegment
|
boolean |
sharesBothNodes(MapSegment other)
returns true if this MapSegment shares both nodes with another MapSegment
|
public MapNode getStartNode()
public MapNode getEndNode()
public List<MapNode> getStartEndNodes()
public LineSegmentXZ getLineSegment()
public VectorXZ getDirection()
public VectorXZ getRightNormal()
VectorXZ.rightNormal()
to vector returned by getDirection()
public VectorXZ getCenter()
public boolean isConnectedTo(MapSegment other)
public boolean isConnectedTo(MapArea other)
public boolean sharesBothNodes(MapSegment other)