Package com.massifmaps.vectorelements
Class Polygon3D
java.lang.Object
com.massifmaps.vectorelements.VectorElement
com.massifmaps.vectorelements.Polygon3D
A geometric 3d polygon that can be displayed on the map.
3d polygons can be concave and have multiple overlapping holes.
3d polygons can be concave and have multiple overlapping holes.
-
Constructor Summary
ConstructorsConstructorDescriptionPolygon3D(MapPosVector poses, MapPosVectorVector holes, Polygon3DStyle style, float height) Constructs a Polygon3D object from a vector of map positions, a vector of holes and a style.Polygon3D(MapPosVector poses, Polygon3DStyle style, float height) Constructs a Polygon3D object from a vector of map positions and a style.Polygon3D(PolygonGeometry geometry, Polygon3DStyle style, float height) Constructs a Polygon3D object from a geometry object and a style. -
Method Summary
Modifier and TypeMethodDescriptionReturns the geometry object that defines the location of this vector element.floatReturns the height of this 3d polygon.getHoles()Returns the holes of the 3d polygon.getPoses()Returns the vertices that define this 3d polygon.getStyle()Returns the style of this 3d polygon.voidsetGeometry(PolygonGeometry geometry) Sets the location for this 3d polygon.voidsetHeight(float height) Sets the height for this 3d polygon.voidsetHoles(MapPosVectorVector holes) Sets the holes of the 3d polygon.voidsetPoses(MapPosVector poses) Sets the vertices that define this 3d polygon.
Note: holes are not affected by this call.voidsetStyle(Polygon3DStyle style) Sets the style for this 3d polygon.Methods inherited from class com.massifmaps.vectorelements.VectorElement
containsMetaDataKey, equals, getBounds, getId, getMetaData, getMetaDataElement, hashCode, isVisible, notifyElementChanged, setId, setMetaData, setMetaDataElement, setVisible
-
Constructor Details
-
Polygon3D
Constructs a Polygon3D object from a geometry object and a style.- Parameters:
geometry- The geometry object that defines the location and holes of this 3d polygon.style- The style that defines what this 3d polygon looks like.height- The height of this 3d polygon in meters.
-
Polygon3D
Constructs a Polygon3D object from a vector of map positions and a style.- Parameters:
poses- The vector of map positions that defines the location of this 3d polygon.style- The style that defines what this 3d polygon looks like.height- The height of this 3d polygon in meters.
-
Polygon3D
Constructs a Polygon3D object from a vector of map positions, a vector of holes and a style.- Parameters:
poses- The vector of map positions that defines the location of this 3d polygon.holes- The vector of holes that defines the locations of holes of this 3d polygon.style- The style that defines what this 3d polygon looks like.height- The height of this 3d polygon in meters.
-
-
Method Details
-
getGeometry
Description copied from class:VectorElementReturns the geometry object that defines the location of this vector element.- Overrides:
getGeometryin classVectorElement- Returns:
- The geometry object of this vector element.
-
setGeometry
Sets the location for this 3d polygon.- Parameters:
geometry- The new geometry object that defines the location and holes of this 3d polygon.
-
getPoses
Returns the vertices that define this 3d polygon.- Returns:
- The new vector of map positions that define this 3d polygon.
-
setPoses
Sets the vertices that define this 3d polygon.
Note: holes are not affected by this call.- Parameters:
poses- The new vector of map positions that define this 3d polygon.
-
getHoles
Returns the holes of the 3d polygon.- Returns:
- The list of holes of the 3d polygon.
-
setHoles
Sets the holes of the 3d polygon.- Parameters:
holes- The list of holes of the 3d polygon.
-
getHeight
public float getHeight()Returns the height of this 3d polygon.- Returns:
- The height of this 3d polygon in meters.
-
setHeight
public void setHeight(float height) Sets the height for this 3d polygon.- Parameters:
height- The new height for this 3d polygon in meters.
-
getStyle
Returns the style of this 3d polygon.- Returns:
- The style that defines what this 3d polygon looks like.
-
setStyle
Sets the style for this 3d polygon.- Parameters:
style- The new style that defines what this 3d polygon looks like.
-