org.osm2world.core.world.modules
Class TunnelModule.Tunnel

Object
  extended by TunnelModule.Tunnel
All Implemented Interfaces:
Renderable, RenderableToAllTargets, WaySegmentWorldObject, WorldObject
Enclosing class:
TunnelModule

public static class TunnelModule.Tunnel
extends Object
implements WaySegmentWorldObject, RenderableToAllTargets


Constructor Summary
TunnelModule.Tunnel(MapWaySegment segment, AbstractNetworkWaySegmentWorldObject primaryRepresentation)
           
 
Method Summary
 double getClearingAbove(VectorXZ pos)
          returns the amount of free space above the base elevation required by this feature.
 double getClearingBelow(VectorXZ pos)
          returns the amount of free space below the base elevation required by this feature.
 VectorXZ getEndPosition()
          returns the end position.
 GroundState getGroundState()
          returns whether this feature is on, above or below the ground.
 MapElement getPrimaryMapElement()
          returns the "primary" MapElement for this WorldObject; i.e.
 VectorXZ getStartPosition()
          returns the start position.
 void renderTo(Target<?> target)
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TunnelModule.Tunnel

public TunnelModule.Tunnel(MapWaySegment segment,
                           AbstractNetworkWaySegmentWorldObject primaryRepresentation)
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

getEndPosition

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

Specified by:
getEndPosition in interface WaySegmentWorldObject

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

getClearingAbove

public double getClearingAbove(VectorXZ pos)
Description copied from interface: WorldObject
returns the amount of free space above the base elevation required by this feature. If pos isn't on this representation, the clearing for a somewhat nearby point on the feature should be returned.

Specified by:
getClearingAbove in interface WorldObject

getClearingBelow

public double getClearingBelow(VectorXZ pos)
Description copied from interface: WorldObject
returns the amount of free space below the base elevation required by this feature. If pos isn't on this representation, the clearing for a somewhat nearby point on the feature should be returned.

Specified by:
getClearingBelow in interface WorldObject

getGroundState

public GroundState getGroundState()
Description copied from interface: WorldObject
returns whether this feature is on, above or below the ground. This is relevant for elevation calculations, because the elevation of features o.t.g. is directly determined by terrain elevation data. Elevation of features above/below t.g. depends on elevation of features o.t.g. as well as other features above/below t.g.

Specified by:
getGroundState in interface WorldObject

renderTo

public void renderTo(Target<?> target)
Specified by:
renderTo in interface RenderableToAllTargets