Package globus.glmap
Class GLMapBBox
- java.lang.Object
-
- globus.glmap.GLMapBBox
-
- All Implemented Interfaces:
java.io.Serializable
@ParametersAreNonnullByDefault public class GLMapBBox extends java.lang.Object implements java.io.SerializableGLMapBBoxdefines some rectangular area of map- See Also:
- Serialized Form
-
-
Method Summary
Modifier and Type Method Description voidaddBBox(GLMapBBox bbox)Join this bbox with givenvoidaddPoint(double x, double y)Add point to bboxvoidaddPoint(MapPoint pt)Add point to bboxMapPointcenter()Center of bboxbooleanequals(java.lang.Object other)inthashCode()booleanintersects(GLMapBBox b)voidrotate(double mapAngle)
-
-
-
Constructor Detail
-
GLMapBBox
public GLMapBBox()
Default constructor. Initialize empty bounding box
-
GLMapBBox
public GLMapBBox(double origin_x, double origin_y, double size_x, double size_y)Initialize bbox with given data- Parameters:
origin_x- X coordinate of the origin of the bounding boxorigin_y- Y coordinate of the origin of the bounding boxsize_x- X size of the bounding boxsize_y- Y size of the bounding box
-
GLMapBBox
public GLMapBBox(GLMapBBox bbox)
Copy constructor- Parameters:
bbox- bbox to copy
-
-
Method Detail
-
center
public MapPoint center()
Center of bbox- Returns:
- center of bbox
-
addBBox
public void addBBox(@Nullable GLMapBBox bbox)Join this bbox with given- Parameters:
bbox- bbox to add
-
addPoint
public void addPoint(double x, double y)Add point to bbox- Parameters:
x- x coordinate of pointy- y coordinate of point
-
addPoint
public void addPoint(MapPoint pt)
Add point to bbox- Parameters:
pt- point to add
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
rotate
public void rotate(double mapAngle)
-
intersects
public boolean intersects(GLMapBBox b)
-
-