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

Object
  extended by TunnelModule.TunnelEntrance
All Implemented Interfaces:
IntersectionTestObject, NodeWorldObject, TerrainBoundaryWorldObject, WorldObject, WorldObjectWithOutline
Enclosing class:
TunnelModule

public static class TunnelModule.TunnelEntrance
extends Object
implements NodeWorldObject, TerrainBoundaryWorldObject


Constructor Summary
TunnelModule.TunnelEntrance(MapNode node, MapWaySegment tunnelSegment)
           
 
Method Summary
 AxisAlignedBoundingBoxXZ getAxisAlignedBoundingBoxXZ()
          returns the axis aligned bounding box that contains the entire object
 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.
 GroundState getGroundState()
          returns whether this feature is on, above or below the ground.
 PolygonXYZ getOutlinePolygon()
          returns a counterclockwise polygon defining the object's ground footprint.
 SimplePolygonXZ getOutlinePolygonXZ()
          returns a counterclockwise polygon defining the object's ground footprint, projected onto the XZ plane.
 MapElement getPrimaryMapElement()
          returns the "primary" MapElement for this WorldObject; i.e.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TunnelModule.TunnelEntrance

public TunnelModule.TunnelEntrance(MapNode node,
                                   MapWaySegment tunnelSegment)
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

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

getAxisAlignedBoundingBoxXZ

public AxisAlignedBoundingBoxXZ getAxisAlignedBoundingBoxXZ()
Description copied from interface: TerrainBoundaryWorldObject
returns the axis aligned bounding box that contains the entire object

Specified by:
getAxisAlignedBoundingBoxXZ in interface IntersectionTestObject
Specified by:
getAxisAlignedBoundingBoxXZ in interface TerrainBoundaryWorldObject

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

getOutlinePolygonXZ

public SimplePolygonXZ getOutlinePolygonXZ()
Description copied from interface: WorldObjectWithOutline
returns a counterclockwise polygon defining the object's ground footprint, projected onto the XZ plane.

Specified by:
getOutlinePolygonXZ in interface WorldObjectWithOutline
Returns:
outline polygon; null if this world object doesn't cover any area