This implementation of the IlvMapSegmentString
class supports any sequence of IlvMapSegment
.
More...
#include <ilviews/maps/geometry/geocurvstr.h>
Public Member Functions | |
IlvMapCurveString () | |
Initializes a new, empty IlvMapCurveString instance. | |
IlvMapCurveString (const IlvMapCurveString &source) | |
Initializes a new IlvMapCurveString instance by copying an existing one. More... | |
virtual IlvMapGeometry * | copy () const |
Returns a copy of the object. More... | |
virtual IlvClassInfo * | getClassInfo () const |
Returns the IlvClassInfo of the instance. More... | |
virtual const IlvCoordinate & | getEndPoint () const |
Returns the end point of the last segment. More... | |
virtual IlUInt | getHorizontalIntersectionCount (const IlvCoordinate &) const |
Returns the number of intersections between this segment and an horizontal half line. More... | |
virtual const IlvMapSegment * | getSegment (IlUInt) const |
Returns the segment at a given index. More... | |
virtual IlUInt | getSegmentCount () const |
Returns the number of segments contained in the string. More... | |
virtual const IlvCoordinate & | getStartPoint () const |
Returns the start point of the first segment, if it exists, otherwise, it returns an IlvCoordinate set to (0,0). More... | |
void | joinSegment (IlvMapSegment *segment) |
Joins a segment at the end of the string. More... | |
virtual void | removeAll () |
Removes all the segments in the string and sets the start point to (0,0). | |
virtual void | setEndPoint (const IlvCoordinate &) |
Sets the end point of the last segment if it exists. More... | |
virtual void | setStartPoint (const IlvCoordinate &) |
Sets the start point of the first segment. More... | |
Public Member Functions inherited from IlvMapSegmentString | |
virtual const IlvMapGeometry * | getSubElement (IlUInt) const |
Returns a sub element of a collection geometry. More... | |
virtual IlUInt | getSubElementCount () const |
Returns the number of elements contained in the geometry if the geometry is a collection. More... | |
virtual IlBoolean | isCollection () const |
Checks if this geometry is a collection of other geometries. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from IlvMapGeometry | |
static IlvClassInfo * | ClassInfo () |
Returns the class info. More... | |
Protected Member Functions inherited from IlvMapSegmentString | |
IlvMapSegmentString () | |
Initializes a new IlvMapSegmentString instance. | |
Protected Member Functions inherited from IlvMapSegment | |
IlvMapSegment () | |
Initializes a new IlvMapSegment instance. | |
Protected Member Functions inherited from IlvMapCurve | |
IlvMapCurve () | |
Initializes a new, empty, curve. | |
Protected Member Functions inherited from IlvMapGeometry | |
IlvMapGeometry () | |
Constructor. More... | |
This implementation of the IlvMapSegmentString
class supports any sequence of IlvMapSegment
.
Library: ilvmaps
The instances of this class can be rendered by an IlvDefaultFeatureRenderer
or by an IlvDefaultCurveRenderer
.
IlvMapCurveString::IlvMapCurveString | ( | const IlvMapCurveString & | source | ) |
Initializes a new IlvMapCurveString
instance by copying an existing one.
source | The source segment string. |
|
virtual |
Returns a copy of the object.
IlvMapGeometry
that must be deleted by the user. Implements IlvMapSegmentString.
|
virtual |
Returns the IlvClassInfo
of the instance.
IlvClassInfo
that should not be modified nor deleted. Implements IlvMapSegmentString.
|
virtual |
Returns the end point of the last segment.
(0, 0)
is returned. Implements IlvMapSegmentString.
|
virtual |
Returns the number of intersections between this segment and an horizontal half line.
This function is used for point inclusion tests of IlvMapRing
.
point | The point at the right end of the horizontal half line. |
1
if the point is on the segment, 2
if the point is not on the segment. If the point is on the segment where the tangent is not horizontal, the intersection should not be counted. Implements IlvMapSegment.
|
virtual |
Returns the segment at a given index.
index | The index of the segment to be retrieved. index must have a value between 0 and getSegmentCount()-1 . |
IlvMapSegment
object that should not be modified nor deleted by the user. The returned IlvMapSegment
is volatile: it may be modified or deleted by the IlvMapSegmentString
itself after an other call to this function, or after any modification. Implements IlvMapSegmentString.
|
virtual |
Returns the number of segments contained in the string.
Implements IlvMapSegmentString.
|
virtual |
Returns the start point of the first segment, if it exists, otherwise, it returns an IlvCoordinate
set to (0,0).
Implements IlvMapSegmentString.
void IlvMapCurveString::joinSegment | ( | IlvMapSegment * | segment | ) |
Joins a segment at the end of the string.
The last point of the preceding segment is moved to fit the starting point of the segment given as argument.
In this operation, the IlvMapCurveString
object becomes owner of segment.
segment | The segment to be joined. |
|
virtual |
Sets the end point of the last segment if it exists.
If the end point of the last segment does not exists, this method does nothing.
end | The end point. |
Implements IlvMapSegmentString.
|
virtual |
Sets the start point of the first segment.
start | The start point. |
Implements IlvMapSegmentString.