Class ExtrudeMarker
java.lang.Object
de.bluecolored.bluemap.api.markers.Marker
de.bluecolored.bluemap.api.markers.DistanceRangedMarker
de.bluecolored.bluemap.api.markers.ObjectMarker
de.bluecolored.bluemap.api.markers.ExtrudeMarker
- All Implemented Interfaces:
DetailMarker
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionExtrudeMarker(String label, Vector3d position, Shape shape, float shapeMinY, float shapeMaxY) Creates a newExtrudeMarker.ExtrudeMarker(String label, Shape shape, float shapeMinY, float shapeMaxY) Creates a newExtrudeMarker. -
Method Summary
Modifier and TypeMethodDescriptionstatic ExtrudeMarker.Builderbuilder()Creates a Builder forExtrudeMarkers.voidSets the position of thisExtrudeMarkerto the center of theShape(it's bounding box).booleanGetter for the fill-Colorof the shape.getHoles()Getter for the mutable collection of holes in thisExtrudeMarker.Getter for theColorof the border-line of the shape.intGetter for the width of the lines of thisExtrudeMarker.getShape()Getter forShapeof thisExtrudeMarker.floatGetter for the maximum height (y-coordinate) of where the shape is displayed on the map.floatGetter for the minimum height (y-coordinate) of where the shape is displayed on the map.
(The shape will be extruded from this value togetShapeMaxY()on the map)inthashCode()booleanIf the depth-test is disabled, you can see the marker fully through all objects on the map.voidSets the border- and fill- color.voidsetDepthTestEnabled(boolean enabled) If the depth-test is disabled, you can see the marker fully through all objects on the map.voidsetFillColor(Color color) Sets the fill-Colorof the shape.voidsetLineColor(Color color) Sets theColorof the border-line of the shape.voidsetLineWidth(int width) Sets the width of the lines for thisExtrudeMarker.voidSets theShapeof thisExtrudeMarker.Methods inherited from class de.bluecolored.bluemap.api.markers.ObjectMarker
getDetail, getLink, isNewTab, removeLink, setDetail, setLinkMethods inherited from class de.bluecolored.bluemap.api.markers.DistanceRangedMarker
getMaxDistance, getMinDistance, setMaxDistance, setMinDistanceMethods inherited from class de.bluecolored.bluemap.api.markers.Marker
getLabel, getPosition, getSorting, getType, isListed, setLabel, setListed, setPosition, setPosition, setPosition, setSorting
-
Constructor Details
-
ExtrudeMarker
Creates a newExtrudeMarker.(The position of the marker will be the center of the shape (it's bounding box))
- Parameters:
label- the label of the markershape- theShapeof the markershapeMinY- the minimum y-position of the extruded shapeshapeMaxY- the maximum y-position of the extruded shape- See Also:
-
ExtrudeMarker
public ExtrudeMarker(String label, Vector3d position, Shape shape, float shapeMinY, float shapeMaxY) Creates a newExtrudeMarker.(Since the shape has its own positions, the position is only used to determine e.g. the distance to the camera)
- Parameters:
label- the label of the markerposition- the coordinates of the markershape- the shape of the markershapeMinY- the minimum y-position of the extruded shapeshapeMaxY- the maximum y-position of the extruded shape- See Also:
-
-
Method Details
-
getShape
Getter forShapeof thisExtrudeMarker.The shape is placed on the xz-plane of the map, so the y-coordinates of the
Shape's points are the z-coordinates in the map.- Returns:
- the
Shape
-
getShapeMinY
public float getShapeMinY()Getter for the minimum height (y-coordinate) of where the shape is displayed on the map.
(The shape will be extruded from this value togetShapeMaxY()on the map)- Returns:
- the min-height of the shape on the map
-
getShapeMaxY
public float getShapeMaxY()Getter for the maximum height (y-coordinate) of where the shape is displayed on the map. (The shape will be extruded fromgetShapeMinY()to this value on the map)- Returns:
- the max-height of the shape on the map
-
setShape
Sets theShapeof thisExtrudeMarker.The shape is placed on the xz-plane of the map, so the y-coordinates of the
(The shape will be extruded from minY to maxY on the map)Shape's points will be the z-coordinates in the map.- Parameters:
shape- the newShapeminY- the new min-height (y-coordinate) of the shape on the mapmaxY- the new max-height (y-coordinate) of the shape on the map- See Also:
-
getHoles
Getter for the mutable collection of holes in thisExtrudeMarker.Any shape in this collection will be a hole in the main
Shapeof this marker- Returns:
- A mutable collection of hole-shapes
-
centerPosition
public void centerPosition()Sets the position of thisExtrudeMarkerto the center of theShape(it's bounding box).(Invoke this after changing the
Shapeto make sure the markers position gets updated as well) -
isDepthTestEnabled
public boolean isDepthTestEnabled()If the depth-test is disabled, you can see the marker fully through all objects on the map. If it is enabled, you'll only see the marker when it is not behind anything.- Returns:
trueif the depthTest is enabled
-
setDepthTestEnabled
public void setDepthTestEnabled(boolean enabled) If the depth-test is disabled, you can see the marker fully through all objects on the map. If it is enabled, you'll only see the marker when it is not behind anything.- Parameters:
enabled- if the depth-test should be enabled for thisExtrudeMarker
-
getLineWidth
public int getLineWidth()Getter for the width of the lines of thisExtrudeMarker.- Returns:
- the width of the lines in pixels
-
setLineWidth
public void setLineWidth(int width) Sets the width of the lines for thisExtrudeMarker.- Parameters:
width- the new width in pixels
-
getLineColor
Getter for theColorof the border-line of the shape.- Returns:
- the line-color
-
setLineColor
Sets theColorof the border-line of the shape.- Parameters:
color- the new line-color
-
getFillColor
Getter for the fill-Colorof the shape.- Returns:
- the fill-color
-
setFillColor
Sets the fill-Colorof the shape.- Parameters:
color- the new fill-color
-
setColors
Sets the border- and fill- color.- Parameters:
lineColor- the new border-colorfillColor- the new fill-color- See Also:
-
equals
- Overrides:
equalsin classObjectMarker
-
hashCode
public int hashCode()- Overrides:
hashCodein classObjectMarker
-
builder
Creates a Builder forExtrudeMarkers.- Returns:
- a new Builder
-