Class ShapeMarker
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.ShapeMarker
- All Implemented Interfaces:
DetailMarker
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionShapeMarker
(String label, Vector3d position, Shape shape, float shapeY) Creates a newShapeMarker
.ShapeMarker
(String label, Shape shape, float shapeY) Creates a newShapeMarker
. -
Method Summary
Modifier and TypeMethodDescriptionstatic ShapeMarker.Builder
builder()
Creates a Builder forShapeMarker
s.void
Sets the position of thisShapeMarker
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 thisShapeMarker
.Getter for theColor
of the border-line of the shape.int
Getter for the width of the border-line of thisShapeMarker
.getShape()
Getter forShape
of thisShapeMarker
.float
Getter for the height (y-coordinate) of where the shape is displayed 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 border-line for thisShapeMarker
.void
Sets theShape
of thisShapeMarker
.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
-
ShapeMarker
Creates a newShapeMarker
.(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 markershapeY
- the y-position of the shape- See Also:
-
ShapeMarker
Creates a newShapeMarker
.(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 markershapeY
- the y-position of the shape- See Also:
-
-
Method Details
-
getShape
Getter forShape
of thisShapeMarker
.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
-
getShapeY
public float getShapeY()Getter for the height (y-coordinate) of where the shape is displayed on the map.- Returns:
- the height of the shape on the map
-
setShape
Sets theShape
of thisShapeMarker
.The shape is placed on the xz-plane of the map, so the y-coordinates of the
Shape
's points will be the z-coordinates in the map.- Parameters:
shape
- the newShape
y
- the new height (y-coordinate) of the shape on the map- See Also:
-
getHoles
Getter for the mutable collection of holes in thisShapeMarker
.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 thisShapeMarker
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 thisShapeMarker
-
getLineWidth
public int getLineWidth()Getter for the width of the border-line of thisShapeMarker
.- Returns:
- the width of the line in pixels
-
setLineWidth
public void setLineWidth(int width) Sets the width of the border-line for thisShapeMarker
.- 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 forShapeMarker
s.- Returns:
- a new Builder
-