public class TLcdAISArcBand extends Object implements ILcd2DEditableArcBand
ILcd2DEditableArcBand
instance.
This allows the use of different ILcd2DEditableArcBand
implementations within
a single arc band class. For example, TLcdAISArcBand
can mimic a geodetic or a cartesian
arc band by setting the delegate arc band to an instance of TLcdLonLatArcBand
or
TLcdXYArcBand
respectively. This is the typical use in AIS, because it allows a
single domain object to be used in geodetic and grid references by just changing the type of the delegate arc band.MAX_RADIUS_END_CORNER, MAX_RADIUS_START_CORNER, MIN_RADIUS_END_CORNER, MIN_RADIUS_START_CORNER
Constructor and Description |
---|
TLcdAISArcBand()
This default constructor creates a
TLcdAISArcBand which has no arc band yet. |
TLcdAISArcBand(ILcd2DEditableArcBand aArcBand)
Constructs a
TLcdAISArcBand which delegates to the given arc band. |
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Makes
Object.clone() public. |
boolean |
contains2D(double aX,
double aY)
Checks whether this
ILcdShape contains the given point in
the 2D space. |
boolean |
contains2D(ILcdPoint aPoint)
Checks whether this
ILcdShape contains the given ILcdPoint in the 2D space. |
boolean |
contains3D(double aX,
double aY,
double aZ)
Checks whether this
ILcdShape contains the given point in
the 3D space. |
boolean |
contains3D(ILcdPoint aPoint)
Checks whether this
ILcdShape contains the given ILcdPoint in the 3D space. |
void |
corner2DEditablePointSFCT(int aCorner,
ILcd2DEditablePoint a2DEditablePointSFCT)
Computes the position of the specified corner of this
ILcdArcBand . |
boolean |
equals(Object aObject) |
double |
getArcAngle()
Returns the angle over which the arc extends (in degrees).
|
ILcdBounds |
getBounds()
Returns the
ILcdBounds by which the geometry of this ILcdBounded object
is bounded. |
ILcdPoint |
getCenter()
Returns the center point of this
ILcdArcBand . |
ILcdPoint |
getFocusPoint()
Returns the focus point of this
ILcdShape . |
double |
getMaxRadius()
Returns the maximum radius of this
ILcdArcBand . |
double |
getMinRadius()
Returns the minimum radius of this
ILcdArcBand . |
double |
getStartAngle()
Returns the start angle of the arc (in degrees).
|
int |
hashCode() |
void |
move2D(double aX,
double aY)
Moves this
ILcd2DEditableShape to the given point in the 2D space. |
void |
move2D(ILcdPoint aPoint)
Moves this
ILcd2DEditableShape to the given point in the 2D space. |
void |
moveCornerPoint2D(int aCorner,
double aX,
double aY)
Moves the specified corner point to a new location.
|
void |
setArcAngle(double aArcAngle)
Sets the angle over which this
ILcd2DEditableArcBand extends (in degrees). |
void |
setArcBand(ILcd2DEditableArcBand aArcBand)
Sets the delegate arc band to to given arc band.
|
void |
setMaxRadius(double aMaxRadius)
Sets the maximum radius of this
ILcd2DEditableArcBand . |
void |
setMinRadius(double aMinRadius)
Sets the minimum radius of this
ILcd2DEditableArcBand . |
void |
setStartAngle(double aStartAngle)
Sets the start angle of this
ILcd2DEditableArcBand (in degrees). |
void |
translate2D(double aDeltaX,
double aDeltaY)
Translates this
ILcd2DEditableShape from its current position over the given translation
vector in the 2D space. |
public TLcdAISArcBand()
TLcdAISArcBand
which has no arc band yet.
It is necessary to call setArcBand
before the created arc band can
be used. Otherwise any ILcd2DEditableArcBand
operation will throw a null pointer exception.public TLcdAISArcBand(ILcd2DEditableArcBand aArcBand)
TLcdAISArcBand
which delegates to the given arc band.aArcBand
- the arc band to delegate topublic void setArcBand(ILcd2DEditableArcBand aArcBand)
aArcBand
- the arc band to delegate topublic void setMinRadius(double aMinRadius)
ILcd2DEditableArcBand
ILcd2DEditableArcBand
.setMinRadius
in interface ILcd2DEditableArcBand
aMinRadius
- the new minimum radius.public void setMaxRadius(double aMaxRadius)
ILcd2DEditableArcBand
ILcd2DEditableArcBand
.setMaxRadius
in interface ILcd2DEditableArcBand
aMaxRadius
- the new maximum radius.public void setStartAngle(double aStartAngle)
ILcd2DEditableArcBand
ILcd2DEditableArcBand
(in degrees).
The angle is measured from 3 o'clock position, positive
counter-clockwise.setStartAngle
in interface ILcd2DEditableArcBand
aStartAngle
- the new start angle.public void setArcAngle(double aArcAngle)
ILcd2DEditableArcBand
ILcd2DEditableArcBand
extends (in degrees).
The angle is positive counter-clockwise.setArcAngle
in interface ILcd2DEditableArcBand
aArcAngle
- the new arc angle.public void moveCornerPoint2D(int aCorner, double aX, double aY)
ILcd2DEditableArcBand
moveCornerPoint2D
in interface ILcd2DEditableArcBand
aCorner
- a constant indicating which corner is to be moved:
ILcdArcBand.MIN_RADIUS_START_CORNER
,
ILcdArcBand.MAX_RADIUS_START_CORNER
,
ILcdArcBand.MIN_RADIUS_END_CORNER
, or
ILcdArcBand.MAX_RADIUS_END_CORNER
.aX
- the new x coordinate of the point.aY
- the new y coordinate of the point.public ILcdPoint getCenter()
ILcdArcBand
ILcdArcBand
.getCenter
in interface ILcdArcBand
ILcdArcBand
.public double getMinRadius()
ILcdArcBand
ILcdArcBand
.getMinRadius
in interface ILcdArcBand
ILcdArcBand
.public double getMaxRadius()
ILcdArcBand
ILcdArcBand
.getMaxRadius
in interface ILcdArcBand
ILcdArcBand
.public double getStartAngle()
ILcdArcBand
getStartAngle
in interface ILcdArcBand
public double getArcAngle()
ILcdArcBand
getArcAngle
in interface ILcdArcBand
public void corner2DEditablePointSFCT(int aCorner, ILcd2DEditablePoint a2DEditablePointSFCT)
ILcdArcBand
ILcdArcBand
.corner2DEditablePointSFCT
in interface ILcdArcBand
aCorner
- the corner:
ILcdArcBand.MIN_RADIUS_START_CORNER
,
ILcdArcBand.MAX_RADIUS_START_CORNER
,
ILcdArcBand.MIN_RADIUS_END_CORNER
, or
ILcdArcBand.MAX_RADIUS_END_CORNER
.a2DEditablePointSFCT
- an ILcd2DEditablePoint
into which the result is written as a
side-effect.public ILcdPoint getFocusPoint()
ILcdShape
ILcdShape
.getFocusPoint
in interface ILcdShape
ILcdShape
.public boolean contains2D(ILcdPoint aPoint)
ILcdShape
ILcdShape
contains the given ILcdPoint
in the 2D space.
Only the first two dimensions of the ILcdShape
and the ILcdPoint
are considered.contains2D
in interface ILcdShape
aPoint
- the ILcdPoint
to test.ILcdShape.contains2D(double, double)
public boolean contains2D(double aX, double aY)
ILcdShape
ILcdShape
contains the given point in
the 2D space. Only the first two dimensions of the ILcdShape
are considered.contains2D
in interface ILcdShape
aX
- the x coordinate of the point.aY
- the y coordinate of the point.public boolean contains3D(ILcdPoint aPoint)
ILcdShape
ILcdShape
contains the given ILcdPoint
in the 3D space.contains3D
in interface ILcdShape
aPoint
- the ILcdPoint
to test.ILcdShape.contains3D(double, double, double)
public boolean contains3D(double aX, double aY, double aZ)
ILcdShape
ILcdShape
contains the given point in
the 3D space.contains3D
in interface ILcdShape
aX
- the x coordinate of the point.aY
- the y coordinate of the point.aZ
- the z coordinate of the point.public ILcdBounds getBounds()
ILcdBounded
ILcdBounds
by which the geometry of this ILcdBounded
object
is bounded.
If the geometry does not allow retrieving valid bounds (for example a polyline with 0 points)
the return value is unspecified.
It is highly recommended to return an undefined
bounds.
You can create undefined bounds using the default constructors
of TLcdLonLatBounds
or TLcdXYBounds
.
getBounds
in interface ILcdBounded
ILcdBounds
by which the geometry of this ILcdBounded
object
is bounded.public void move2D(ILcdPoint aPoint)
ILcd2DEditableShape
ILcd2DEditableShape
to the given point in the 2D space. The focus point
is used as the handle by which the shape is moved. Only the first
two dimensions of the ILcdShape
and the ILcdPoint
are considered.
The third dimension is left unchanged.move2D
in interface ILcd2DEditableShape
aPoint
- the ILcdPoint
to move to.ILcd2DEditableShape.move2D(double, double)
public void move2D(double aX, double aY)
ILcd2DEditableShape
ILcd2DEditableShape
to the given point in the 2D space. The focus point
is used as the handle by which the shape is moved. Only the first
two dimensions of the ILcdShape
are considered.
The third dimension is left unchanged.move2D
in interface ILcd2DEditableShape
aX
- the x coordinate of the point.aY
- the y coordinate of the point.public void translate2D(double aDeltaX, double aDeltaY)
ILcd2DEditableShape
ILcd2DEditableShape
from its current position over the given translation
vector in the 2D space. Only the first two dimensions of the ILcdShape
are considered.
The third dimension is left unchanged.translate2D
in interface ILcd2DEditableShape
aDeltaX
- the x coordinate of the translation vector.aDeltaY
- the y coordinate of the translation vector.public Object clone()
ILcdCloneable
Makes Object.clone()
public.
java.lang.Object
, it can be implemented like this:
public Object clone() {
try {
return super.clone();
} catch ( CloneNotSupportedException e ) {
// Cannot happen: extends from Object and implements Cloneable (see also Object.clone)
throw new RuntimeException( e );
}
}
clone
in interface ILcdCloneable
clone
in class Object
Object.clone()