Package com.luciad.ais.shape
Class TLcdAISArcBand
java.lang.Object
com.luciad.ais.shape.TLcdAISArcBand
- All Implemented Interfaces:
ILcdArcBand
,ILcdBounded
,ILcdShape
,ILcd2DEditableArcBand
,ILcd2DEditableShape
,ILcdCloneable
,Serializable
,Cloneable
- Direct Known Subclasses:
TLcdSector
An generic arc band class that delegates to another
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.- Since:
- 2022.0
- See Also:
-
Field Summary
Fields inherited from interface com.luciad.shape.ILcdArcBand
MAX_RADIUS_END_CORNER, MAX_RADIUS_START_CORNER, MIN_RADIUS_END_CORNER, MIN_RADIUS_START_CORNER
-
Constructor Summary
ConstructorDescriptionThis default constructor creates aTLcdAISArcBand
which has no arc band yet.TLcdAISArcBand
(ILcd2DEditableArcBand aArcBand) Constructs aTLcdAISArcBand
which delegates to the given arc band. -
Method Summary
Modifier and TypeMethodDescriptionclone()
MakesObject.clone()
public.boolean
contains2D
(double aX, double aY) Checks whether thisILcdShape
contains the given point in the 2D space.boolean
contains2D
(ILcdPoint aPoint) Checks whether thisILcdShape
contains the givenILcdPoint
in the 2D space.boolean
contains3D
(double aX, double aY, double aZ) Checks whether thisILcdShape
contains the given point in the 3D space.boolean
contains3D
(ILcdPoint aPoint) Checks whether thisILcdShape
contains the givenILcdPoint
in the 3D space.void
corner2DEditablePointSFCT
(int aCorner, ILcd2DEditablePoint a2DEditablePointSFCT) Computes the position of the specified corner of thisILcdArcBand
.boolean
double
Returns the angle over which the arc extends (in degrees).Returns theILcdBounds
by which the geometry of thisILcdBounded
object is bounded.Returns the center point of thisILcdArcBand
.Returns the focus point of thisILcdShape
.double
Returns the maximum radius of thisILcdArcBand
.double
Returns the minimum radius of thisILcdArcBand
.double
Returns the start angle of the arc (in degrees).int
hashCode()
void
move2D
(double aX, double aY) Moves thisILcd2DEditableShape
to the given point in the 2D space.void
Moves thisILcd2DEditableShape
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 thisILcd2DEditableArcBand
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 thisILcd2DEditableArcBand
.void
setMinRadius
(double aMinRadius) Sets the minimum radius of thisILcd2DEditableArcBand
.void
setStartAngle
(double aStartAngle) Sets the start angle of thisILcd2DEditableArcBand
(in degrees).void
translate2D
(double aDeltaX, double aDeltaY) Translates thisILcd2DEditableShape
from its current position over the given translation vector in the 2D space.
-
Constructor Details
-
TLcdAISArcBand
public TLcdAISArcBand()This default constructor creates aTLcdAISArcBand
which has no arc band yet. It is necessary to callsetArcBand
before the created arc band can be used. Otherwise anyILcd2DEditableArcBand
operation will throw a null pointer exception. -
TLcdAISArcBand
Constructs aTLcdAISArcBand
which delegates to the given arc band.- Parameters:
aArcBand
- the arc band to delegate to
-
-
Method Details
-
setArcBand
Sets the delegate arc band to to given arc band.- Parameters:
aArcBand
- the arc band to delegate to
-
setMinRadius
public void setMinRadius(double aMinRadius) Description copied from interface:ILcd2DEditableArcBand
Sets the minimum radius of thisILcd2DEditableArcBand
.- Specified by:
setMinRadius
in interfaceILcd2DEditableArcBand
- Parameters:
aMinRadius
- the new minimum radius.
-
setMaxRadius
public void setMaxRadius(double aMaxRadius) Description copied from interface:ILcd2DEditableArcBand
Sets the maximum radius of thisILcd2DEditableArcBand
.- Specified by:
setMaxRadius
in interfaceILcd2DEditableArcBand
- Parameters:
aMaxRadius
- the new maximum radius.
-
setStartAngle
public void setStartAngle(double aStartAngle) Description copied from interface:ILcd2DEditableArcBand
Sets the start angle of thisILcd2DEditableArcBand
(in degrees). The angle is measured from 3 o'clock position, positive counter-clockwise.- Specified by:
setStartAngle
in interfaceILcd2DEditableArcBand
- Parameters:
aStartAngle
- the new start angle.
-
setArcAngle
public void setArcAngle(double aArcAngle) Description copied from interface:ILcd2DEditableArcBand
Sets the angle over which thisILcd2DEditableArcBand
extends (in degrees). The angle is positive counter-clockwise.- Specified by:
setArcAngle
in interfaceILcd2DEditableArcBand
- Parameters:
aArcAngle
- the new arc angle.
-
moveCornerPoint2D
public void moveCornerPoint2D(int aCorner, double aX, double aY) Description copied from interface:ILcd2DEditableArcBand
Moves the specified corner point to a new location. The shape of the arc band changes accordingly.- Specified by:
moveCornerPoint2D
in interfaceILcd2DEditableArcBand
- Parameters:
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
, orILcdArcBand.MAX_RADIUS_END_CORNER
.aX
- the new x coordinate of the point.aY
- the new y coordinate of the point.
-
getCenter
Description copied from interface:ILcdArcBand
Returns the center point of thisILcdArcBand
.- Specified by:
getCenter
in interfaceILcdArcBand
- Returns:
- the center point of this
ILcdArcBand
.
-
getMinRadius
public double getMinRadius()Description copied from interface:ILcdArcBand
Returns the minimum radius of thisILcdArcBand
.- Specified by:
getMinRadius
in interfaceILcdArcBand
- Returns:
- the minimum radius of this
ILcdArcBand
.
-
getMaxRadius
public double getMaxRadius()Description copied from interface:ILcdArcBand
Returns the maximum radius of thisILcdArcBand
.- Specified by:
getMaxRadius
in interfaceILcdArcBand
- Returns:
- the maximum radius of this
ILcdArcBand
.
-
getStartAngle
public double getStartAngle()Description copied from interface:ILcdArcBand
Returns the start angle of the arc (in degrees). The angle is measured from 3 o'clock position, positive counter-clockwise.- Specified by:
getStartAngle
in interfaceILcdArcBand
- Returns:
- the start angle of the arc (in degrees). The angle is measured from 3 o'clock position, positive counter-clockwise.
-
getArcAngle
public double getArcAngle()Description copied from interface:ILcdArcBand
Returns the angle over which the arc extends (in degrees). The angle is positive counter-clockwise.- Specified by:
getArcAngle
in interfaceILcdArcBand
- Returns:
- the angle over which the arc extends (in degrees). The angle is positive counter-clockwise.
-
corner2DEditablePointSFCT
Description copied from interface:ILcdArcBand
Computes the position of the specified corner of thisILcdArcBand
.- Specified by:
corner2DEditablePointSFCT
in interfaceILcdArcBand
- Parameters:
aCorner
- the corner:ILcdArcBand.MIN_RADIUS_START_CORNER
,ILcdArcBand.MAX_RADIUS_START_CORNER
,ILcdArcBand.MIN_RADIUS_END_CORNER
, orILcdArcBand.MAX_RADIUS_END_CORNER
.a2DEditablePointSFCT
- anILcd2DEditablePoint
into which the result is written as a side-effect.
-
getFocusPoint
Description copied from interface:ILcdShape
Returns the focus point of thisILcdShape
.- Specified by:
getFocusPoint
in interfaceILcdShape
- Returns:
- the focus point of this
ILcdShape
.
-
contains2D
Description copied from interface:ILcdShape
Checks whether thisILcdShape
contains the givenILcdPoint
in the 2D space. Only the first two dimensions of theILcdShape
and theILcdPoint
are considered.- Specified by:
contains2D
in interfaceILcdShape
- Parameters:
aPoint
- theILcdPoint
to test.- Returns:
- the boolean result of the containment test.
- See Also:
-
contains2D
public boolean contains2D(double aX, double aY) Description copied from interface:ILcdShape
Checks whether thisILcdShape
contains the given point in the 2D space. Only the first two dimensions of theILcdShape
are considered.- Specified by:
contains2D
in interfaceILcdShape
- Parameters:
aX
- the x coordinate of the point.aY
- the y coordinate of the point.- Returns:
- the boolean result of the containment test.
-
contains3D
Description copied from interface:ILcdShape
Checks whether thisILcdShape
contains the givenILcdPoint
in the 3D space.- Specified by:
contains3D
in interfaceILcdShape
- Parameters:
aPoint
- theILcdPoint
to test.- Returns:
- the boolean result of the containment test.
- See Also:
-
contains3D
public boolean contains3D(double aX, double aY, double aZ) Description copied from interface:ILcdShape
Checks whether thisILcdShape
contains the given point in the 3D space.- Specified by:
contains3D
in interfaceILcdShape
- Parameters:
aX
- the x coordinate of the point.aY
- the y coordinate of the point.aZ
- the z coordinate of the point.- Returns:
- the boolean result of the containment test.
-
getBounds
Description copied from interface:ILcdBounded
Returns theILcdBounds
by which the geometry of thisILcdBounded
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 ofTLcdLonLatBounds
orTLcdXYBounds
.- Specified by:
getBounds
in interfaceILcdBounded
- Returns:
- the
ILcdBounds
by which the geometry of thisILcdBounded
object is bounded.
-
move2D
Description copied from interface:ILcd2DEditableShape
Moves thisILcd2DEditableShape
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 theILcdShape
and theILcdPoint
are considered. The third dimension is left unchanged.- Specified by:
move2D
in interfaceILcd2DEditableShape
- Parameters:
aPoint
- theILcdPoint
to move to.- See Also:
-
move2D
public void move2D(double aX, double aY) Description copied from interface:ILcd2DEditableShape
Moves thisILcd2DEditableShape
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 theILcdShape
are considered. The third dimension is left unchanged.- Specified by:
move2D
in interfaceILcd2DEditableShape
- Parameters:
aX
- the x coordinate of the point.aY
- the y coordinate of the point.
-
translate2D
public void translate2D(double aDeltaX, double aDeltaY) Description copied from interface:ILcd2DEditableShape
Translates thisILcd2DEditableShape
from its current position over the given translation vector in the 2D space. Only the first two dimensions of theILcdShape
are considered. The third dimension is left unchanged.- Specified by:
translate2D
in interfaceILcd2DEditableShape
- Parameters:
aDeltaX
- the x coordinate of the translation vector.aDeltaY
- the y coordinate of the translation vector.
-
clone
Description copied from interface:ILcdCloneable
Makes
When for example extending fromObject.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 ); } }
- Specified by:
clone
in interfaceILcdCloneable
- Overrides:
clone
in classObject
- See Also:
-
equals
-
hashCode
public int hashCode()
-