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
ConstructorsConstructorDescriptionThis default constructor creates aTLcdAISArcBandwhich has no arc band yet.TLcdAISArcBand(ILcd2DEditableArcBand aArcBand) Constructs aTLcdAISArcBandwhich delegates to the given arc band. -
Method Summary
Modifier and TypeMethodDescriptionclone()MakesObject.clone()public.booleancontains2D(double aX, double aY) Checks whether thisILcdShapecontains the given point in the 2D space.booleancontains2D(ILcdPoint aPoint) Checks whether thisILcdShapecontains the givenILcdPointin the 2D space.booleancontains3D(double aX, double aY, double aZ) Checks whether thisILcdShapecontains the given point in the 3D space.booleancontains3D(ILcdPoint aPoint) Checks whether thisILcdShapecontains the givenILcdPointin the 3D space.voidcorner2DEditablePointSFCT(int aCorner, ILcd2DEditablePoint a2DEditablePointSFCT) Computes the position of the specified corner of thisILcdArcBand.booleandoubleReturns the angle over which the arc extends (in degrees).Returns theILcdBoundsby which the geometry of thisILcdBoundedobject is bounded.Returns the center point of thisILcdArcBand.Returns the focus point of thisILcdShape.doubleReturns the maximum radius of thisILcdArcBand.doubleReturns the minimum radius of thisILcdArcBand.doubleReturns the start angle of the arc (in degrees).inthashCode()voidmove2D(double aX, double aY) Moves thisILcd2DEditableShapeto the given point in the 2D space.voidMoves thisILcd2DEditableShapeto the given point in the 2D space.voidmoveCornerPoint2D(int aCorner, double aX, double aY) Moves the specified corner point to a new location.voidsetArcAngle(double aArcAngle) Sets the angle over which thisILcd2DEditableArcBandextends (in degrees).voidsetArcBand(ILcd2DEditableArcBand aArcBand) Sets the delegate arc band to to given arc band.voidsetMaxRadius(double aMaxRadius) Sets the maximum radius of thisILcd2DEditableArcBand.voidsetMinRadius(double aMinRadius) Sets the minimum radius of thisILcd2DEditableArcBand.voidsetStartAngle(double aStartAngle) Sets the start angle of thisILcd2DEditableArcBand(in degrees).voidtranslate2D(double aDeltaX, double aDeltaY) Translates thisILcd2DEditableShapefrom its current position over the given translation vector in the 2D space.
-
Constructor Details
-
TLcdAISArcBand
public TLcdAISArcBand()This default constructor creates aTLcdAISArcBandwhich has no arc band yet. It is necessary to callsetArcBandbefore the created arc band can be used. Otherwise anyILcd2DEditableArcBandoperation will throw a null pointer exception. -
TLcdAISArcBand
Constructs aTLcdAISArcBandwhich 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:ILcd2DEditableArcBandSets the minimum radius of thisILcd2DEditableArcBand.- Specified by:
setMinRadiusin interfaceILcd2DEditableArcBand- Parameters:
aMinRadius- the new minimum radius.
-
setMaxRadius
public void setMaxRadius(double aMaxRadius) Description copied from interface:ILcd2DEditableArcBandSets the maximum radius of thisILcd2DEditableArcBand.- Specified by:
setMaxRadiusin interfaceILcd2DEditableArcBand- Parameters:
aMaxRadius- the new maximum radius.
-
setStartAngle
public void setStartAngle(double aStartAngle) Description copied from interface:ILcd2DEditableArcBandSets the start angle of thisILcd2DEditableArcBand(in degrees). The angle is measured from 3 o'clock position, positive counter-clockwise.- Specified by:
setStartAnglein interfaceILcd2DEditableArcBand- Parameters:
aStartAngle- the new start angle.
-
setArcAngle
public void setArcAngle(double aArcAngle) Description copied from interface:ILcd2DEditableArcBandSets the angle over which thisILcd2DEditableArcBandextends (in degrees). The angle is positive counter-clockwise.- Specified by:
setArcAnglein interfaceILcd2DEditableArcBand- Parameters:
aArcAngle- the new arc angle.
-
moveCornerPoint2D
public void moveCornerPoint2D(int aCorner, double aX, double aY) Description copied from interface:ILcd2DEditableArcBandMoves the specified corner point to a new location. The shape of the arc band changes accordingly.- Specified by:
moveCornerPoint2Din 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:ILcdArcBandReturns the center point of thisILcdArcBand.- Specified by:
getCenterin interfaceILcdArcBand- Returns:
- the center point of this
ILcdArcBand.
-
getMinRadius
public double getMinRadius()Description copied from interface:ILcdArcBandReturns the minimum radius of thisILcdArcBand.- Specified by:
getMinRadiusin interfaceILcdArcBand- Returns:
- the minimum radius of this
ILcdArcBand.
-
getMaxRadius
public double getMaxRadius()Description copied from interface:ILcdArcBandReturns the maximum radius of thisILcdArcBand.- Specified by:
getMaxRadiusin interfaceILcdArcBand- Returns:
- the maximum radius of this
ILcdArcBand.
-
getStartAngle
public double getStartAngle()Description copied from interface:ILcdArcBandReturns the start angle of the arc (in degrees). The angle is measured from 3 o'clock position, positive counter-clockwise.- Specified by:
getStartAnglein 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:ILcdArcBandReturns the angle over which the arc extends (in degrees). The angle is positive counter-clockwise.- Specified by:
getArcAnglein interfaceILcdArcBand- Returns:
- the angle over which the arc extends (in degrees). The angle is positive counter-clockwise.
-
corner2DEditablePointSFCT
Description copied from interface:ILcdArcBandComputes the position of the specified corner of thisILcdArcBand.- Specified by:
corner2DEditablePointSFCTin 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- anILcd2DEditablePointinto which the result is written as a side-effect.
-
getFocusPoint
Description copied from interface:ILcdShapeReturns the focus point of thisILcdShape.- Specified by:
getFocusPointin interfaceILcdShape- Returns:
- the focus point of this
ILcdShape.
-
contains2D
Description copied from interface:ILcdShapeChecks whether thisILcdShapecontains the givenILcdPointin the 2D space. Only the first two dimensions of theILcdShapeand theILcdPointare considered.- Specified by:
contains2Din interfaceILcdShape- Parameters:
aPoint- theILcdPointto test.- Returns:
- the boolean result of the containment test.
- See Also:
-
contains2D
public boolean contains2D(double aX, double aY) Description copied from interface:ILcdShapeChecks whether thisILcdShapecontains the given point in the 2D space. Only the first two dimensions of theILcdShapeare considered.- Specified by:
contains2Din 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:ILcdShapeChecks whether thisILcdShapecontains the givenILcdPointin the 3D space.- Specified by:
contains3Din interfaceILcdShape- Parameters:
aPoint- theILcdPointto 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:ILcdShapeChecks whether thisILcdShapecontains the given point in the 3D space.- Specified by:
contains3Din 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:ILcdBoundedReturns theILcdBoundsby which the geometry of thisILcdBoundedobject 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
undefinedbounds. You can create undefined bounds using the default constructors ofTLcdLonLatBoundsorTLcdXYBounds.- Specified by:
getBoundsin interfaceILcdBounded- Returns:
- the
ILcdBoundsby which the geometry of thisILcdBoundedobject is bounded.
-
move2D
Description copied from interface:ILcd2DEditableShapeMoves thisILcd2DEditableShapeto 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 theILcdShapeand theILcdPointare considered. The third dimension is left unchanged.- Specified by:
move2Din interfaceILcd2DEditableShape- Parameters:
aPoint- theILcdPointto move to.- See Also:
-
move2D
public void move2D(double aX, double aY) Description copied from interface:ILcd2DEditableShapeMoves thisILcd2DEditableShapeto 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 theILcdShapeare considered. The third dimension is left unchanged.- Specified by:
move2Din 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:ILcd2DEditableShapeTranslates thisILcd2DEditableShapefrom its current position over the given translation vector in the 2D space. Only the first two dimensions of theILcdShapeare considered. The third dimension is left unchanged.- Specified by:
translate2Din interfaceILcd2DEditableShape- Parameters:
aDeltaX- the x coordinate of the translation vector.aDeltaY- the y coordinate of the translation vector.
-
clone
Description copied from interface:ILcdCloneableMakes
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:
clonein interfaceILcdCloneable- Overrides:
clonein classObject- See Also:
-
equals
-
hashCode
public int hashCode()
-