public class TLcdNVG20ArcBandRing extends TLcdDataObject implements ILcd2DEditableArcBand, ILcdCache, ILcdRing, ILcdInvalidateable
ILcd2DEditableArcBand
that represents an NVG 2.0 ArcBand Ring.Modifier and Type | Field and Description |
---|---|
static TLcdDataProperty |
END_ANGLE_NVG_PROPERTY
Data property that maps to the
endangle attribute. |
static TLcdDataProperty |
MAX_RADIUS_PROPERTY
Data property that maps to the
maxr attribute. |
static TLcdDataProperty |
MIN_RADIUS_PROPERTY
Data property that maps to the
minr attribute. |
static TLcdDataProperty |
START_ANGLE_NVG_PROPERTY
Data property that maps to the
startangle attribute. |
static TLcdDataProperty |
X_PROPERTY
Data property that maps to the
cx attribute. |
static TLcdDataProperty |
Y_PROPERTY
Data property that maps to the
cy attribute. |
MAX_RADIUS_END_CORNER, MAX_RADIUS_START_CORNER, MIN_RADIUS_END_CORNER, MIN_RADIUS_START_CORNER
INTERPOLATION_CIRCLE_BY_3POINTS, INTERPOLATION_CIRCLE_BY_CENTERPOINT, INTERPOLATION_CIRCULARARC_BY_3POINTS, INTERPOLATION_CIRCULARARC_BY_BULGE, INTERPOLATION_CIRCULARARC_BY_CENTERPOINT, INTERPOLATION_ELLIPTICAL, INTERPOLATION_GEODESIC, INTERPOLATION_LINEAR, INTERPOLATION_MIXED, INTERPOLATION_RHUMB
Constructor and Description |
---|
TLcdNVG20ArcBandRing() |
TLcdNVG20ArcBandRing(TLcdDataType aDataType)
Creates a new instance of TLcdNVG20ArcBandRing with the given data type.
|
Modifier and Type | Method and Description |
---|---|
void |
clearCache()
Clears the cache.
|
TLcdNVG20ArcBandRing |
clone()
Returns a deep clone of this object.
|
TLcdNVG20ArcBandRing |
clone(Map aObjectDictionary)
Returns a deep clone of this object.
|
void |
computePointSFCT(double aParam,
ILcd3DEditablePoint aPointSFCT)
Computes a point of the curve, defined by the given parameter.
|
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 . |
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. |
Object |
getCachedObject(Object aKey)
Looks up and returns the cached Object corresponding to the given key.
|
ILcdPoint |
getCenter()
Returns the center point of this
ILcdArcBand . |
double |
getEndAngleNVG()
Returns the value of the property that maps to the
endangle attribute. |
ILcdPoint |
getEndPoint()
Retrieves the end point of the curve.
|
double |
getEndTangent2D()
Returns the angle of the curve's tangent at the end point,
in degrees counterclockwise from the direction at 3 o'clock.
|
ILcdPoint |
getFocusPoint()
Returns the focus point of this
ILcdShape . |
String |
getInterpolation()
Returns the interpolation method used by this curve.
|
double |
getLength2D(double aParam1,
double aParam2)
Returns the length between two points of the curve,
defined by the given parameters.
|
int |
getLineSegmentIntersectionCount(ILcdPoint aP1,
ILcdPoint aP2)
Returns the number of intersections between this curve and a line segment
defined by the two specified points.
|
double |
getMaxRadius()
Returns the value of the property that maps to the
maxr attribute. |
double |
getMinRadius()
Returns the value of the property that maps to the
minr attribute. |
double |
getStartAngle()
Returns the start angle of the arc (in degrees).
|
double |
getStartAngleNVG()
Returns the value of the property that maps to the
startangle attribute. |
ILcdPoint |
getStartPoint()
Retrieves the start point of the curve.
|
double |
getStartTangent2D()
Returns the angle of the curve's tangent at the start point,
in degrees counterclockwise from the direction at 3 o'clock.
|
double |
getTangent2D(double aParam)
Returns the angle of the curve's tangent in the point defined
by the given parameter, in degrees counterclockwise from the
direction at 3 o'clock.
|
double |
getX()
Returns the value of the property that maps to the
cx attribute. |
double |
getY()
Returns the value of the property that maps to the
cy attribute. |
void |
insertIntoCache(Object aKey,
Object aObject)
Inserts a cache Object corresponding to the given key Object.
|
void |
invalidateObject()
Invalidates all cached values of this object.
|
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.
|
Object |
removeCachedObject(Object aKey)
Looks up and removes the cached Object corresponding to the given key.
|
void |
setArcAngle(double aArcAngle)
Sets the angle over which this
ILcd2DEditableArcBand extends (in degrees). |
void |
setEndAngleNVG(double aValue)
Sets the value of the property that maps to the
endangle attribute. |
void |
setMaxRadius(double aValue)
Sets the value of the property that maps to the
maxr attribute. |
void |
setMinRadius(double aValue)
Sets the value of the property that maps to the
minr attribute. |
void |
setStartAngle(double aStartAngle)
Sets the start angle of this
ILcd2DEditableArcBand (in degrees). |
void |
setStartAngleNVG(double aValue)
Sets the value of the property that maps to the
startangle attribute. |
void |
setValue(TLcdDataProperty aProperty,
Object aValue)
Sets the value of the given property for this data object.
|
void |
setX(double aValue)
Sets the value of the property that maps to the
cx attribute. |
void |
setY(double aValue)
Sets the value of the property that maps to the
cy attribute. |
void |
translate2D(double aDeltaX,
double aDeltaY)
Translates this
ILcd2DEditableShape from its current position over the given translation
vector in the 2D space. |
getDataType, getValue, getValue, hasValue, hasValue, setValue, toString
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getMaxRadius, getMinRadius
public static final TLcdDataProperty X_PROPERTY
cx
attribute.
The possible values for this property are instances of double
.public static final TLcdDataProperty Y_PROPERTY
cy
attribute.
The possible values for this property are instances of double
.public static final TLcdDataProperty END_ANGLE_NVG_PROPERTY
endangle
attribute.
The possible values for this property are instances of double
.public static final TLcdDataProperty MAX_RADIUS_PROPERTY
maxr
attribute.
The possible values for this property are instances of double
.public static final TLcdDataProperty MIN_RADIUS_PROPERTY
minr
attribute.
The possible values for this property are instances of double
.public static final TLcdDataProperty START_ANGLE_NVG_PROPERTY
startangle
attribute.
The possible values for this property are instances of double
.public TLcdNVG20ArcBandRing()
public TLcdNVG20ArcBandRing(TLcdDataType aDataType)
aDataType
- the data type for the ArcBand Ring.public TLcdNVG20ArcBandRing clone()
TLcdDataObject.clone(Map)
.clone
in interface ILcdCloneable
clone
in class TLcdDataObject
Object.clone()
public TLcdNVG20ArcBandRing clone(Map aObjectDictionary)
TLcdDataObject
ILcdDataObject
, the value is cloned by first creating a new instance via
the value.getDataType().newInstance()
method, and then cloning its properties one by one.ILcdDeepCloneable
or
ILcdCloneable
then this interface is used to clone the value.clone
in interface ILcdDeepCloneable
clone
in class TLcdDataObject
aObjectDictionary
- the Object dictionary that keeps track of the objects for which a clone has already been made,
and their corresponding clone Object.public void setX(double aValue)
cx
attribute.
The x-axis (longitude) coordinate of the center point.
aValue
- the value to set for the X_PROPERTY
property.public void setY(double aValue)
cy
attribute.
The y-axis (latitude) coordinate of the center point
aValue
- the value to set for the Y_PROPERTY
property.public void setMinRadius(double aValue)
minr
attribute.
The radius of the smaller circle, in meters. This number should be positive.
setMinRadius
in interface ILcd2DEditableArcBand
aValue
- the value to set for the MIN_RADIUS_PROPERTY
property.public void setMaxRadius(double aValue)
maxr
attribute.
The radius of the larger circle, in meters. This number should be positive.
setMaxRadius
in interface ILcd2DEditableArcBand
aValue
- the value to set for the MAX_RADIUS_PROPERTY
property.public void setStartAngleNVG(double aValue)
startangle
attribute.
The angle of the first radial.
aValue
- the value to set for the START_ANGLE_NVG_PROPERTY
property.public void setEndAngleNVG(double aValue)
endangle
attribute.
The angle of the second radial.
aValue
- the value to set for the END_ANGLE_NVG_PROPERTY
property.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 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 void insertIntoCache(Object aKey, Object aObject)
ILcdCache
insertIntoCache
in interface ILcdCache
aKey
- the key Object that will be used to identify the Object.
The key must therefore be a unique identifier, typically the caller
itself: insertIntoCache(this, ...)
.aObject
- the Object to be cached.public Object getCachedObject(Object aKey)
ILcdCache
getCachedObject
in interface ILcdCache
aKey
- the key Object that was used for storing the cache Object.public Object removeCachedObject(Object aKey)
ILcdCache
removeCachedObject
in interface ILcdCache
aKey
- the key Object that was used for storing the cache Object.public void clearCache()
ILcdCache
clearCache
in interface ILcdCache
public ILcdPoint getStartPoint()
ILcdCurve
This is equivalent to computePointSFCT(0)
.
getStartPoint
in interface ILcdCurve
public ILcdPoint getEndPoint()
ILcdCurve
This is equivalent to computePointSFCT(1)
.
getEndPoint
in interface ILcdCurve
public double getStartTangent2D()
ILcdCurve
The tangent orientation is from the start point towards the rest of the shape.
This is the same as getTangent2D(0)
.
getStartTangent2D
in interface ILcdCurve
public double getEndTangent2D()
ILcdCurve
The tangent orientation is from the end point, away from the curve before it.
This is the same as getTangent2D(1)
.
getEndTangent2D
in interface ILcdCurve
public double getTangent2D(double aParam)
ILcdCurve
The tangent orientation is from the point at parameter aParam
towards the rest of the shape.
ILcdCurve.getStartTangent2D()
.ILcdCurve.getEndTangent2D()
.getTangent2D
in interface ILcdCurve
aParam
- a value of the closed interval [0,1]public double getLength2D(double aParam1, double aParam2)
ILcdCurve
aParam1 == aParam2
, the length is 0.aParam1 == 0 and aParam2 == 1
, the length is the whole length of the curve.aParam1 > aParam2
, the length is (aParam1 to 1
) + (0 to aParam2
).getLength2D
in interface ILcdCurve
aParam1
- a value of the closed interval [0,1]aParam2
- a value of the closed interval [0,1]public void computePointSFCT(double aParam, ILcd3DEditablePoint aPointSFCT)
ILcdCurve
ILcdCurve.getStartPoint()
.ILcdCurve.getEndPoint()
.computePointSFCT
in interface ILcdCurve
aParam
- a value of the closed interval [0,1]aPointSFCT
- the point to store the computed curve point inpublic String getInterpolation()
ILcdCurve
A set of predefined constants are defined in this interface,
which are used by the default ILcdCurve
implementations
provided by LuciadLightspeed.
Custom implementations can define their own constants, and use them to interpret the interpolation of the curve.
getInterpolation
in interface ILcdCurve
public int getLineSegmentIntersectionCount(ILcdPoint aP1, ILcdPoint aP2)
ILcdCurve
This information can be used to perform containment calculations, if this curve is closed or if this curve is part of a composite closed curve. By determining the number of intersections between this curve and a line segment starting from a given point in a fixed direction, one can determine whether a point is located within the closed curve by using the even-odd rule.
getLineSegmentIntersectionCount
in interface ILcdCurve
aP1
- the first point of the line segmentaP2
- the second point of the line segmentpublic void setValue(TLcdDataProperty aProperty, Object aValue)
ILcdDataObject
Sets the value of the given property for this data object. The implementation is allowed to throw an exception if the given value can't be set.
The given property must be declared in thedata object's type
or in one of its super types. In
other words, getDataType().getProperties().contains( aProperty ) should always be true.
Otherwise, the implementation should throw an IllegalArgumentException
.setValue
in interface ILcdDataObject
setValue
in class TLcdDataObject
aProperty
- the property for which the value is to be setaValue
- the value to setTLcdDataType.getProperty(String)
public void invalidateObject()
ILcdInvalidateable
invalidateObject
in interface ILcdInvalidateable
public double getX()
cx
attribute.
The x-axis (longitude) coordinate of the center point.
X_PROPERTY
property.public double getY()
cy
attribute.
The y-axis (latitude) coordinate of the center point
Y_PROPERTY
property.public double getEndAngleNVG()
endangle
attribute.
The angle of the second radial.
END_ANGLE_NVG_PROPERTY
property.public double getMaxRadius()
maxr
attribute.
The radius of the larger circle, in meters. This number should be positive.
MAX_RADIUS_PROPERTY
property.public double getMinRadius()
minr
attribute.
The radius of the smaller circle, in meters. This number should be positive.
MIN_RADIUS_PROPERTY
property.public double getStartAngleNVG()
startangle
attribute.
The angle of the first radial.
START_ANGLE_NVG_PROPERTY
property.