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.Builder
builder()
Creates a Builder forExtrudeMarker
s.void
Sets the position of thisExtrudeMarker
to the center of theShape
(it's bounding box).boolean
Getter for the fill-Color
of the shape.getHoles()
Getter for the mutable collection of holes in thisExtrudeMarker
.Getter for theColor
of the border-line of the shape.int
Getter for the width of the lines of thisExtrudeMarker
.getShape()
Getter forShape
of thisExtrudeMarker
.float
Getter for the maximum height (y-coordinate) of where the shape is displayed on the map.float
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)int
hashCode()
boolean
If the depth-test is disabled, you can see the marker fully through all objects on the map.void
Sets the border- and fill- color.void
setDepthTestEnabled
(boolean enabled) If the depth-test is disabled, you can see the marker fully through all objects on the map.void
setFillColor
(Color color) Sets the fill-Color
of the shape.void
setLineColor
(Color color) Sets theColor
of the border-line of the shape.void
setLineWidth
(int width) Sets the width of the lines for thisExtrudeMarker
.void
Sets theShape
of thisExtrudeMarker
.Methods inherited from class de.bluecolored.bluemap.api.markers.ObjectMarker
getDetail, getLink, isNewTab, removeLink, setDetail, setLink
Methods inherited from class de.bluecolored.bluemap.api.markers.DistanceRangedMarker
getMaxDistance, getMinDistance, setMaxDistance, setMinDistance
Methods 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
- theShape
of 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 forShape
of 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 theShape
of 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 newShape
minY
- 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
Shape
of this marker- Returns:
- A mutable collection of hole-shapes
-
centerPosition
public void centerPosition()Sets the position of thisExtrudeMarker
to the center of theShape
(it's bounding box).(Invoke this after changing the
Shape
to 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:
true
if 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 theColor
of the border-line of the shape.- Returns:
- the line-color
-
setLineColor
Sets theColor
of the border-line of the shape.- Parameters:
color
- the new line-color
-
getFillColor
Getter for the fill-Color
of the shape.- Returns:
- the fill-color
-
setFillColor
Sets the fill-Color
of 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:
equals
in classObjectMarker
-
hashCode
public int hashCode()- Overrides:
hashCode
in classObjectMarker
-
builder
Creates a Builder forExtrudeMarker
s.- Returns:
- a new Builder
-