org.osm2world.core.world.data
Class NoOutlineWaySegmentWorldObject

Object
  extended by NoOutlineWaySegmentWorldObject
All Implemented Interfaces:
IntersectionTestObject, WaySegmentWorldObject, WorldObject

public abstract class NoOutlineWaySegmentWorldObject
extends Object
implements WaySegmentWorldObject, IntersectionTestObject

superclass for WaySegmentWorldObjects that don't have an outline, and are not part of a network. Instead, they can be considered infinitely thin.


Field Summary
protected  MapWaySegment segment
           
 
Constructor Summary
NoOutlineWaySegmentWorldObject(MapWaySegment segment)
           
 
Method Summary
 AxisAlignedBoundingBoxXZ getAxisAlignedBoundingBoxXZ()
           
 VectorXZ getEndPosition()
          returns the end position.
 MapElement getPrimaryMapElement()
          returns the "primary" MapElement for this WorldObject; i.e.
 VectorXZ getStartPosition()
          returns the start position.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface WorldObject
getClearingAbove, getClearingBelow, getGroundState
 

Field Detail

segment

protected final MapWaySegment segment
Constructor Detail

NoOutlineWaySegmentWorldObject

public NoOutlineWaySegmentWorldObject(MapWaySegment segment)
Method Detail

getPrimaryMapElement

public MapElement getPrimaryMapElement()
Description copied from interface: WorldObject
returns the "primary" MapElement for this WorldObject; i.e. the one it is most strongly associated with. Can be null if there is no (clear) primary element for this feature.

Specified by:
getPrimaryMapElement in interface WorldObject

getStartPosition

public VectorXZ getStartPosition()
Description copied from interface: WaySegmentWorldObject
returns the start position. Might be different from MapWaySegment's start position; as node features such as crossings require space, too.

Specified by:
getStartPosition in interface WaySegmentWorldObject

getEndPosition

public VectorXZ getEndPosition()
Description copied from interface: WaySegmentWorldObject
returns the end position. See WaySegmentWorldObject.getStartPosition() for details.

Specified by:
getEndPosition in interface WaySegmentWorldObject

getAxisAlignedBoundingBoxXZ

public AxisAlignedBoundingBoxXZ getAxisAlignedBoundingBoxXZ()
Specified by:
getAxisAlignedBoundingBoxXZ in interface IntersectionTestObject