public class TLcdNVG15Arc extends TLcdNVG15Ellipse implements ILcd2DEditableArc, ILcdCurve, ILcdInvalidateable, ILcdCache
ILcd2DEditableArc
that represents an NVG 1.5 Arc.Modifier and Type | Field and Description |
---|---|
static TLcdDataProperty |
A_PROPERTY
Data property that maps to the
rx attribute. |
static TLcdDataProperty |
B_PROPERTY
Data property that maps to the
ry attribute. |
static TLcdDataProperty |
END_ANGLE_NVG_PROPERTY
Data property that maps to the
endangle attribute. |
static TLcdDataProperty |
LABEL_PROPERTY
Data property that maps to the
label attribute. |
static TLcdDataProperty |
MODIFIERS_PROPERTY
Data property that maps to the
modifiers attribute. |
static TLcdDataProperty |
ROT_ANGLE_PROPERTY
Data property that maps to the
rotation attribute. |
static TLcdDataProperty |
START_ANGLE_NVG_PROPERTY
Data property that maps to the
startangle attribute. |
static TLcdDataProperty |
STYLE_PROPERTY
Data property that maps to the
style attribute. |
static TLcdDataProperty |
SYMBOL_PROPERTY
Data property that maps to the
symbol attribute. |
static TLcdDataProperty |
URI_PROPERTY
Data property that maps to the
uri 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. |
EXTENDED_DATA_PROPERTY, METADATA_PROPERTY
ARC_END_CORNER, ARC_START_CORNER, MAJOR_RADIUS_CORNER, MAJOR_RADIUS_OPPOSITE_CORNER, MINOR_RADIUS_CORNER, MINOR_RADIUS_OPPOSITE_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
MAJOR_RADIUS_CORNER, MAJOR_RADIUS_OPPOSITE_CORNER, MINOR_RADIUS_CORNER, MINOR_RADIUS_OPPOSITE_CORNER
Constructor and Description |
---|
TLcdNVG15Arc() |
TLcdNVG15Arc(TLcdDataType aDataType)
Creates a new instance of TLcdNVG15Arc with the given data type.
|
Modifier and Type | Method and Description |
---|---|
void |
clearCache()
Clears the cache.
|
TLcdNVG15Arc |
clone()
Returns a deep clone of this object.
|
TLcdNVG15Arc |
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 aILcdPoint)
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 aILcdPoint)
Checks whether this
ILcdShape contains the given ILcdPoint in the 3D space. |
void |
corner2DEditablePointSFCT(int aIndex,
ILcd2DEditablePoint aILcd2DEditablePoint)
Computes the position of the specified corner of this
ILcdEllipse . |
double |
getA()
Returns the value of the property that maps to the
rx attribute. |
double |
getArcAngle()
Returns the angle over which the arc extends (in degrees).
|
double |
getB()
Returns the value of the property that maps to the
ry attribute. |
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 of this
ILcdEllipse . |
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.
|
String |
getLabel()
Returns the value of the property that maps to the
label attribute. |
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.
|
TLcdNVGModifiers |
getModifiers()
Returns the value of the property that maps to the
modifiers attribute. |
double |
getRotAngle()
Returns the value of the property that maps to the
rotation 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.
|
TLcdNVGStyle |
getStyle()
Returns the value of the property that maps to the
style attribute. |
TLcdNVGSymbol |
getSymbol()
Returns the value of the property that maps to the
symbol attribute. |
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.
|
URI |
getUri()
Returns the value of the property that maps to the
uri attribute. |
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. |
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 the arc extends (in degrees).
|
void |
setEndAngleNVG(double aValue)
Sets the value of the property that maps to the
endangle attribute. |
void |
setLabel(String aValue)
Sets the value of the property that maps to the
label attribute. |
void |
setModifiers(TLcdNVGModifiers aValue)
Sets the value of the property that maps to the
modifiers attribute. |
void |
setStartAngle(double aStartAngle)
Sets the start angle of the arc (in degrees).
|
void |
setStartAngleNVG(double aValue)
Sets the value of the property that maps to the
startangle attribute. |
void |
setStyle(TLcdNVGStyle aValue)
Sets the value of the property that maps to the
style attribute. |
void |
setSymbol(TLcdNVGSymbol aValue)
Sets the value of the property that maps to the
symbol attribute. |
void |
setUri(URI aValue)
Sets the value of the property that maps to the
uri attribute. |
void |
setValue(TLcdDataProperty aProperty,
Object aValue)
Sets the value of the given property for this data object.
|
void |
translate2D(double aDeltaX,
double aDeltaY)
Translates this
ILcd2DEditableShape from its current position over the given translation
vector in the 2D space. |
void |
updateForCornerPoint2D(int aIndex,
ILcdPoint aILcdPoint)
Updates the ellipse for the specified corner point location.
|
getEllipsoid, setA, setB, setEllipsoid, setRotAngle, setX, setY
getAPP6CodedFromMapObject, getMS2525CodedFromMapObject, setSymbolFromAPP6, setSymbolFromMS2525
getExtendedData, getMetadata, setExtendedData, setMetadata
getParent, setParent
getDataType, getValue, getValue, hasValue, hasValue, setValue, toString
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
setA, setB, setRotAngle
getA, getB, getRotAngle
getA, getB, getRotAngle
public static final TLcdDataProperty END_ANGLE_NVG_PROPERTY
endangle
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 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 ROT_ANGLE_PROPERTY
rotation
attribute.
The possible values for this property are instances of double
.public static final TLcdDataProperty A_PROPERTY
rx
attribute.
The possible values for this property are instances of double
.public static final TLcdDataProperty B_PROPERTY
ry
attribute.
The possible values for this property are instances of double
.public static final TLcdDataProperty MODIFIERS_PROPERTY
modifiers
attribute.
The possible values for this property are instances of TLcdNVGModifiers
.public static final TLcdDataProperty SYMBOL_PROPERTY
symbol
attribute.
The possible values for this property are instances of TLcdNVGSymbol
.public static final TLcdDataProperty LABEL_PROPERTY
label
attribute.
The possible values for this property are instances of String
.public static final TLcdDataProperty STYLE_PROPERTY
style
attribute.
The possible values for this property are instances of TLcdNVGStyle
.public static final TLcdDataProperty URI_PROPERTY
uri
attribute.
The possible values for this property are instances of URI
.public TLcdNVG15Arc()
public TLcdNVG15Arc(TLcdDataType aDataType)
aDataType
- the data type for the arcpublic void invalidateObject()
ILcdInvalidateable
invalidateObject
in interface ILcdInvalidateable
invalidateObject
in class TLcdNVG15Ellipse
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
move2D
in class TLcdNVG15Ellipse
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
move2D
in class TLcdNVG15Ellipse
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
translate2D
in class TLcdNVG15Ellipse
aDeltaX
- the x coordinate of the translation vector.aDeltaY
- the y coordinate of the translation vector.public void setStartAngleNVG(double aValue)
startangle
attribute.
The startangle of the arc on the ellipse
aValue
- the value to set for the START_ANGLE_NVG_PROPERTY
property.public void setEndAngleNVG(double aValue)
endangle
attribute.
The endangle of the arc on the ellipse
aValue
- the value to set for the END_ANGLE_NVG_PROPERTY
property.public TLcdNVG15Arc clone()
TLcdDataObject.clone(Map)
.clone
in interface ILcdCloneable
clone
in class TLcdNVG15Ellipse
Object.clone()
public TLcdNVG15Arc 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 TLcdNVG15Ellipse
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 setStartAngle(double aStartAngle)
setStartAngle
in interface ILcd2DEditableArc
aStartAngle
- the new start angle.public double getStartAngle()
getStartAngle
in interface ILcdArc
public boolean contains3D(double aX, double aY, double aZ)
ILcdShape
contains the given point in
the 3D space.contains3D
in interface ILcdShape
contains3D
in class TLcdNVG15Ellipse
aX
- the x coordinate of the point.aY
- the y coordinate of the point.aZ
- the z coordinate of the point.public void setArcAngle(double aArcAngle)
setArcAngle
in interface ILcd2DEditableArc
aArcAngle
- the new arc angle.public void updateForCornerPoint2D(int aIndex, ILcdPoint aILcdPoint)
updateForCornerPoint2D
in interface ILcd2DEditableArc
updateForCornerPoint2D
in interface ILcd2DEditableEllipse
updateForCornerPoint2D
in class TLcdNVG15Ellipse
aIndex
- a constant indicating which corner is to be moved:
ILcdEllipse.MAJOR_RADIUS_CORNER
,
ILcdEllipse.MINOR_RADIUS_CORNER
,
ILcdEllipse.MAJOR_RADIUS_OPPOSITE_CORNER
,
ILcdEllipse.MINOR_RADIUS_OPPOSITE_CORNER
.aILcdPoint
- the new coordinate of the point.public ILcdPoint getCenter()
ILcdEllipse
.getCenter
in interface ILcdArc
getCenter
in interface ILcdEllipse
getCenter
in class TLcdNVG15Ellipse
ILcdEllipse
.public double getArcAngle()
getArcAngle
in interface ILcdArc
public void corner2DEditablePointSFCT(int aIndex, ILcd2DEditablePoint aILcd2DEditablePoint)
ILcdEllipse
.corner2DEditablePointSFCT
in interface ILcdArc
corner2DEditablePointSFCT
in interface ILcdEllipse
corner2DEditablePointSFCT
in class TLcdNVG15Ellipse
aIndex
- the corner:
ILcdEllipse.MAJOR_RADIUS_CORNER
,
ILcdEllipse.MINOR_RADIUS_CORNER
,
ILcdEllipse.MAJOR_RADIUS_OPPOSITE_CORNER
,
ILcdEllipse.MINOR_RADIUS_OPPOSITE_CORNER
.aILcd2DEditablePoint
- an ILcd2DEditablePoint
into which
the result is written as a side-effect.public ILcdPoint getFocusPoint()
ILcdShape
.getFocusPoint
in interface ILcdShape
getFocusPoint
in class TLcdNVG15Ellipse
ILcdShape
.public boolean contains2D(ILcdPoint aILcdPoint)
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
contains2D
in class TLcdNVG15Ellipse
aILcdPoint
- the ILcdPoint
to test.ILcdShape.contains2D(double, double)
public boolean contains2D(double aX, double aY)
ILcdShape
contains the given point in
the 2D space. Only the first two dimensions of the ILcdShape
are considered.contains2D
in interface ILcdShape
contains2D
in class TLcdNVG15Ellipse
aX
- the x coordinate of the point.aY
- the y coordinate of the point.public boolean contains3D(ILcdPoint aILcdPoint)
ILcdShape
contains the given ILcdPoint
in the 3D space.contains3D
in interface ILcdShape
contains3D
in class TLcdNVG15Ellipse
aILcdPoint
- the ILcdPoint
to test.ILcdShape.contains3D(double, double, double)
public ILcdBounds getBounds()
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
getBounds
in class TLcdNVG15Ellipse
ILcdBounds
by which the geometry of this ILcdBounded
object
is bounded.public ILcdPoint getStartPoint()
ILcdCurve
This is equivalent to computePointSFCT(0)
.
getStartPoint
in interface ILcdCurve
getStartPoint
in class TLcdNVG15Ellipse
public ILcdPoint getEndPoint()
ILcdCurve
This is equivalent to computePointSFCT(1)
.
getEndPoint
in interface ILcdCurve
getEndPoint
in class TLcdNVG15Ellipse
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
getStartTangent2D
in class TLcdNVG15Ellipse
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
getEndTangent2D
in class TLcdNVG15Ellipse
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
getTangent2D
in class TLcdNVG15Ellipse
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
getLength2D
in class TLcdNVG15Ellipse
aParam1
- a value of the closed interval [0,1]aParam2
- a value of the closed interval [0,1]public 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
getInterpolation
in class TLcdNVG15Ellipse
public void computePointSFCT(double aParam, ILcd3DEditablePoint aPointSFCT)
ILcdCurve
ILcdCurve.getStartPoint()
.ILcdCurve.getEndPoint()
.computePointSFCT
in interface ILcdCurve
computePointSFCT
in class TLcdNVG15Ellipse
aParam
- a value of the closed interval [0,1]aPointSFCT
- the point to store the computed curve point inpublic 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
getLineSegmentIntersectionCount
in class TLcdNVG15Ellipse
aP1
- the first point of the line segmentaP2
- the second point of the line segmentpublic void clearCache()
ILcdCache
clearCache
in interface ILcdCache
clearCache
in class TLcdNVG15Ellipse
public Object removeCachedObject(Object aKey)
ILcdCache
removeCachedObject
in interface ILcdCache
removeCachedObject
in class TLcdNVG15Ellipse
aKey
- the key Object that was used for storing the cache Object.public Object getCachedObject(Object aKey)
ILcdCache
getCachedObject
in interface ILcdCache
getCachedObject
in class TLcdNVG15Ellipse
aKey
- the key Object that was used for storing the cache Object.public void insertIntoCache(Object aKey, Object aObject)
ILcdCache
insertIntoCache
in interface ILcdCache
insertIntoCache
in class TLcdNVG15Ellipse
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 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 double getEndAngleNVG()
endangle
attribute.
The endangle of the arc on the ellipse
END_ANGLE_NVG_PROPERTY
property.public double getStartAngleNVG()
startangle
attribute.
The startangle of the arc on the ellipse
START_ANGLE_NVG_PROPERTY
property.public double getX()
cx
attribute.
Longitude in decimal degrees using WGS-84 datum of center point of the ellipse.
X_PROPERTY
property.public double getY()
cy
attribute.
Latitude in decimal degrees using WGS-84 datum of center point of the ellipse.
Y_PROPERTY
property.public double getRotAngle()
rotation
attribute.
Rotation of the ellipse
ROT_ANGLE_PROPERTY
property.public double getA()
rx
attribute.
Radius of the ellipse along the X axis (East/West) prior to the rotation.
A_PROPERTY
property.public double getB()
ry
attribute.
Radius of the ellipse along the Y axis (North/South) prior to the rotation.
B_PROPERTY
property.public TLcdNVGModifiers getModifiers()
modifiers
attribute.
Modifiers to the specified symbology, possibly including rendering hints.
MODIFIERS_PROPERTY
property.public void setModifiers(TLcdNVGModifiers aValue)
modifiers
attribute.
Modifiers to the specified symbology, possibly including rendering hints.
aValue
- the value to set for the MODIFIERS_PROPERTY
property.public TLcdNVGSymbol getSymbol()
symbol
attribute.
The symbol attribute is used to associate symbology with a given shape. Its format is the name of a standard followed by a colon and the text representation of the element in that standard. That standard can be used to derive the graphical representation of the element.
SYMBOL_PROPERTY
property.public void setSymbol(TLcdNVGSymbol aValue)
symbol
attribute.
The symbol attribute is used to associate symbology with a given shape. Its format is the name of a standard followed by a colon and the text representation of the element in that standard. That standard can be used to derive the graphical representation of the element.
aValue
- the value to set for the SYMBOL_PROPERTY
property.public String getLabel()
label
attribute.
A textual representation of this element.
LABEL_PROPERTY
property.public void setLabel(String aValue)
label
attribute.
A textual representation of this element.
aValue
- the value to set for the LABEL_PROPERTY
property.public TLcdNVGStyle getStyle()
style
attribute.
CSS based style description which indicates how this element should be rendered graphically.
STYLE_PROPERTY
property.public void setStyle(TLcdNVGStyle aValue)
style
attribute.
CSS based style description which indicates how this element should be rendered graphically.
aValue
- the value to set for the STYLE_PROPERTY
property.public URI getUri()
uri
attribute.
URI schema that uniquely identifies the object. See the URI Scheme for more details.
URI_PROPERTY
property.public void setUri(URI aValue)
uri
attribute.
URI schema that uniquely identifies the object. See the URI Scheme for more details.
aValue
- the value to set for the URI_PROPERTY
property.