public class TLcdGML32Curve extends TLcdGML32AbstractCurve implements ILcdEditableCompositeCurve, ILcdInvalidateable
Modifier and Type | Field and Description |
---|---|
static TLcdDataProperty |
SEGMENTS_PROPERTY
Data property that maps to the
segments element. |
SRS_PROPERTY
DESCRIPTION_PROPERTY, DESCRIPTION_REFERENCE_PROPERTY, ID_PROPERTY, IDENTIFIER_PROPERTY, META_DATA_PROPERTY_PROPERTY, NAME_PROPERTY
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 |
---|
TLcdGML32Curve() |
TLcdGML32Curve(ILcdModelReference aSrs)
Constructs a curve and initializes its
model reference (srs).
|
TLcdGML32Curve(TLcdDataType aType) |
TLcdGML32Curve(TLcdDataType aDataType,
ILcdModelReference aSrs)
Constructs a curve and initializes its
model reference (srs).
|
Modifier and Type | Method and Description |
---|---|
TLcdGML32Curve |
clone()
Returns a deep clone of this object.
|
TLcdDataObject |
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. |
boolean |
equals(Object o) |
ILcdBounds |
getBounds()
Returns the
ILcdBounds by which the geometry of this ILcdBounded object
is bounded. |
List<ILcdCurve> |
getCurves()
Returns a list with the curve's elements.
|
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.
|
List<TLcdGML32AbstractCurveSegment> |
getSegments()
Returns the role value contained in the value of the
SEGMENTS_PROPERTY property. |
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.
|
int |
hashCode() |
void |
invalidateObject()
Invalidates all cached values of this object.
|
void |
setSegments(List<TLcdGML32AbstractCurveSegment> aValue)
Sets the value of the property that maps to the
segments element. |
void |
setSrs(ILcdModelReference aValue)
Sets the value of the
SRS_PROPERTY property. |
void |
setValue(TLcdDataProperty aProperty,
Object aValue)
Sets the value of the given property for this data object.
|
getEndTangent, getLength, getStartTangent
getSrs, toString
getDescription, getDescriptionReference, getId, getIdentifier, getMetaDataProperty, getName, setDescription, setDescriptionReference, setId, setIdentifier
getDataType, getValue, getValue, hasValue, hasValue, setValue
public static final TLcdDataProperty SEGMENTS_PROPERTY
segments
element.
The possible values for this property are instances of TLcdGML32CurveSegmentArrayProperty
.public TLcdGML32Curve()
public TLcdGML32Curve(TLcdDataType aType)
public TLcdGML32Curve(ILcdModelReference aSrs)
aSrs
- the model reference for this objectsetSrs(ILcdModelReference)
public TLcdGML32Curve(TLcdDataType aDataType, ILcdModelReference aSrs)
aDataType
- the data type of this curveaSrs
- the model reference for this objectsetSrs(ILcdModelReference)
public void setSrs(ILcdModelReference aValue)
TLcdGML32AbstractGeometry
SRS_PROPERTY
property.setSrs
in class TLcdGML32AbstractGeometry
aValue
- the value to set for the SRS_PROPERTY
property.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 void invalidateObject()
ILcdInvalidateable
invalidateObject
in interface ILcdInvalidateable
public List<ILcdCurve> getCurves()
ILcdCompositeCurve
The returned list is not guaranteed to be editable. See ILcdEditableCompositeCurve
for an editable variant of this interface.
Note that this adding curves to the result of calling this method may throw a
ClassCastException
or IllegalArgumentException
in case the class of the curve(s) to add is not
compatible with the implementation of the composite curve. Implementations should
specify in their documentation all restrictions that apply in this context.
getCurves
in interface ILcdCompositeCurve
public ILcdPoint getStartPoint()
ILcdCurve
This is equivalent to computePointSFCT(0)
.
getStartPoint
in interface ILcdCompositeCurve
getStartPoint
in interface ILcdCurve
getStartPoint
in class TLcdGML32AbstractCurve
public ILcdPoint getEndPoint()
ILcdCurve
This is equivalent to computePointSFCT(1)
.
getEndPoint
in interface ILcdCompositeCurve
getEndPoint
in interface ILcdCurve
getEndPoint
in class TLcdGML32AbstractCurve
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 TLcdGML32AbstractCurve
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 TLcdGML32AbstractCurve
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 TLcdGML32AbstractCurve
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 TLcdGML32AbstractCurve
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
computePointSFCT
in class TLcdGML32AbstractCurve
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 ILcdCompositeCurve
getInterpolation
in interface ILcdCurve
getInterpolation
in class TLcdGML32AbstractCurve
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
getLineSegmentIntersectionCount
in class TLcdGML32AbstractCurve
aP1
- the first point of the line segmentaP2
- the second point of the line segmentpublic ILcdPoint getFocusPoint()
ILcdShape
ILcdShape
.getFocusPoint
in interface ILcdShape
getFocusPoint
in class TLcdGML32AbstractGeometry
ILcdShape
.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
contains2D
in class TLcdGML32AbstractGeometry
aX
- the x coordinate of the point.aY
- the y coordinate of the point.public boolean contains3D(double aX, double aY, double aZ)
ILcdShape
ILcdShape
contains the given point in
the 3D space.contains3D
in interface ILcdShape
contains3D
in class TLcdGML32AbstractGeometry
aX
- the x coordinate of the point.aY
- the y coordinate of the point.aZ
- the z coordinate of the point.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
contains2D
in class TLcdGML32AbstractGeometry
aPoint
- the ILcdPoint
to test.ILcdShape.contains2D(double, double)
public boolean contains3D(ILcdPoint aPoint)
ILcdShape
ILcdShape
contains the given ILcdPoint
in the 3D space.contains3D
in interface ILcdShape
contains3D
in class TLcdGML32AbstractGeometry
aPoint
- the ILcdPoint
to test.ILcdShape.contains3D(double, double, double)
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
getBounds
in class TLcdGML32AbstractGeometry
ILcdBounds
by which the geometry of this ILcdBounded
object
is bounded.public TLcdGML32Curve clone()
TLcdDataObject
TLcdDataObject.clone(Map)
.clone
in interface ILcdCloneable
clone
in class TLcdDataObject
Object.clone()
public TLcdDataObject 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 List<TLcdGML32AbstractCurveSegment> getSegments()
SEGMENTS_PROPERTY
property. Returns null
if the value of the SEGMENTS_PROPERTY
property is null
.
This property element contains a list of curve segments. The order of the elements is significant and shall be preserved when processing the array.
SEGMENTS_PROPERTY
property.TLcdGML32CurveSegmentArrayProperty
public void setSegments(List<TLcdGML32AbstractCurveSegment> aValue)
segments
element. to a new instance of the association class TLcdGML32CurveSegmentArrayProperty
initialized with the given role value. In case the given role value is null
, the SEGMENTS_PROPERTY
property is set to null
.
This property element contains a list of curve segments. The order of the elements is significant and shall be preserved when processing the array.
aValue
- the role value to set for the SEGMENTS_PROPERTY
property.