org.osm2world.core.world.data
public abstract class AbstractAreaWorldObject extends Object implements WorldObjectWithOutline, AreaWorldObject, IntersectionTestObject
AreaWorldObject
that offers some basic features:
< ul>MapArea
Modifier | Constructor and Description |
---|---|
protected |
AbstractAreaWorldObject(MapArea area) |
Modifier and Type | Method and Description |
---|---|
void |
defineEleConstraints(EleConstraintEnforcer enforcer)
lets this object add constraints for the relative elevations of its
EleConnector s. |
AxisAlignedBoundingBoxXZ |
getAxisAlignedBoundingBoxXZ() |
EleConnectorGroup |
getEleConnectors()
returns all
EleConnector s used by this WorldObject |
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.
|
MapArea |
getPrimaryMapElement()
returns the "primary"
MapElement for this WorldObject;
i.e. |
protected Collection<TriangleXYZ> |
getTriangulation()
decompose this area into counterclockwise 3d triangles.
|
protected Collection<TriangleXZ> |
getTriangulationXZ()
decompose this area into counterclockwise triangles.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getGroundState
protected final MapArea area
protected AbstractAreaWorldObject(MapArea area)
public EleConnectorGroup getEleConnectors()
WorldObject
EleConnector
s used by this WorldObjectgetEleConnectors
in interface WorldObject
public void defineEleConstraints(EleConstraintEnforcer enforcer)
WorldObject
EleConnector
s. Called after WorldObject.getEleConnectors()
.defineEleConstraints
in interface WorldObject
public SimplePolygonXZ getOutlinePolygonXZ()
WorldObjectWithOutline
getOutlinePolygonXZ
in interface WorldObjectWithOutline
public PolygonXYZ getOutlinePolygon()
WorldObjectWithOutline
getOutlinePolygon
in interface WorldObjectWithOutline
public AxisAlignedBoundingBoxXZ getAxisAlignedBoundingBoxXZ()
getAxisAlignedBoundingBoxXZ
in interface IntersectionTestObject
public final MapArea getPrimaryMapElement()
WorldObject
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.getPrimaryMapElement
in interface AreaWorldObject
getPrimaryMapElement
in interface WorldObject
protected Collection<TriangleXZ> getTriangulationXZ()
protected Collection<TriangleXYZ> getTriangulation()
public String toString()
toString
in class Object