Views
Maps Package API Reference Guide
Product Documentation:
Views Documentation Home
List of all members | Public Member Functions
IlvMapLineString Class Reference

This subclass of IlvMapSegmentString is optimized to handle strings containing only IlvMapLinearSegment instances. More...

#include <ilviews/maps/geometry/geolinestr.h>

Inheritance diagram for IlvMapLineString:
IlvMapSegmentString IlvMapSegment IlvMapCurve IlvMapGeometry

Public Member Functions

 IlvMapLineString ()
 Initializes a new IlvMapLineString instance and sets the start point to (0, 0).
 
 IlvMapLineString (const IlvCoordinate &startPoint)
 Initializes a new IlvMapLineString instance of the class and specifies the first point of the string. More...
 
 IlvMapLineString (const IlvMapLineString &source)
 Initializes a new IlvMapLineString instance string by copying an existing one. More...
 
virtual IlvMapGeometrycopy () const
 Returns a copy of the object. More...
 
virtual IlvClassInfogetClassInfo () const
 Returns the IlvClassInfo of the instance. More...
 
virtual const IlvCoordinategetEndPoint () 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...
 
const IlvMapLinearSegmentgetLinearSegment (IlUInt index) const
 Returns the linear segment at a given. More...
 
const IlvCoordinategetPoint (IlUInt index) const
 Returns the point at a given index in the string. More...
 
IlUInt getPointCount () const
 Returns the number of points contained in the string. More...
 
virtual const IlvMapSegmentgetSegment (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 IlvCoordinategetStartPoint () const
 Returns the start point of the first segment, if it exists, otherwise, it returns an IlvCoordinate set to (0,0). More...
 
void lineTo (const IlvCoordinate &end)
 Appends a new linear segment to 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 IlvMapGeometrygetSubElement (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 IlvClassInfoClassInfo ()
 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...
 

Detailed Description

This subclass of IlvMapSegmentString is optimized to handle strings containing only IlvMapLinearSegment instances.

Library: ilvmaps

The instances of this class can be rendered by an IlvDefaultFeatureRenderer or by an IlvDefaultCurveRenderer.

See also
IlvMapCurveString.

Constructor & Destructor Documentation

◆ IlvMapLineString() [1/2]

IlvMapLineString::IlvMapLineString ( const IlvCoordinate startPoint)

Initializes a new IlvMapLineString instance of the class and specifies the first point of the string.

Parameters
startPointThe start point.

◆ IlvMapLineString() [2/2]

IlvMapLineString::IlvMapLineString ( const IlvMapLineString source)

Initializes a new IlvMapLineString instance string by copying an existing one.

Parameters
sourceThe source line string.

Member Function Documentation

◆ copy()

virtual IlvMapGeometry* IlvMapLineString::copy ( ) const
virtual

Returns a copy of the object.

Returns
An IlvMapGeometry that must be deleted by the user.

Implements IlvMapSegmentString.

◆ getClassInfo()

virtual IlvClassInfo* IlvMapLineString::getClassInfo ( ) const
virtual

Returns the IlvClassInfo of the instance.

Returns
An IlvClassInfo that should not be modified nor deleted.

Implements IlvMapSegmentString.

◆ getEndPoint()

virtual const IlvCoordinate& IlvMapLineString::getEndPoint ( ) const
virtual

Returns the end point of the last segment.

Returns
The end point. If there is no end point, the point (0, 0) is returned.

Implements IlvMapSegmentString.

◆ getHorizontalIntersectionCount()

virtual IlUInt IlvMapLineString::getHorizontalIntersectionCount ( const IlvCoordinate point) const
virtual

Returns the number of intersections between this segment and an horizontal half line.

This function is used for point inclusion tests of IlvMapRing.

Parameters
pointThe point at the right end of the horizontal half line.
Returns
The number of intersections between the point and this segment. Tangent intersections should be counted as: 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.

◆ getLinearSegment()

const IlvMapLinearSegment* IlvMapLineString::getLinearSegment ( IlUInt  index) const

Returns the linear segment at a given.

Parameters
indexThe index of the segment to be retrieved. This must have a value between 0 and getSegmentCount() - 1.
Returns
An IlvMapLinearSegment 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 istelf after another call to this function, or after any modification.

◆ getPoint()

const IlvCoordinate& IlvMapLineString::getPoint ( IlUInt  index) const

Returns the point at a given index in the string.

Parameters
indexThe index. It must take a value between 0 and getPointCount() - 1.
Returns
The point at location index in the string.

◆ getPointCount()

IlUInt IlvMapLineString::getPointCount ( ) const

Returns the number of points contained in the string.

Returns
The number of points contained in the string.

◆ getSegment()

virtual const IlvMapSegment* IlvMapLineString::getSegment ( IlUInt  index) const
virtual

Returns the segment at a given index.

Parameters
indexThe index of the segment to be retrieved. index must have a value between 0 and getSegmentCount()-1.
Returns
An 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.

◆ getSegmentCount()

virtual IlUInt IlvMapLineString::getSegmentCount ( ) const
virtual

Returns the number of segments contained in the string.

Returns
The number of segments.

Implements IlvMapSegmentString.

◆ getStartPoint()

virtual const IlvCoordinate& IlvMapLineString::getStartPoint ( ) const
virtual

Returns the start point of the first segment, if it exists, otherwise, it returns an IlvCoordinate set to (0,0).

Returns
The start point.

Implements IlvMapSegmentString.

◆ lineTo()

void IlvMapLineString::lineTo ( const IlvCoordinate end)

Appends a new linear segment to the string.

Parameters
endThe coordinate of the end of the new segment.

◆ setEndPoint()

virtual void IlvMapLineString::setEndPoint ( const IlvCoordinate end)
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.

Parameters
endThe end point.

Implements IlvMapSegmentString.

◆ setStartPoint()

virtual void IlvMapLineString::setStartPoint ( const IlvCoordinate start)
virtual

Sets the start point of the first segment.

Parameters
startThe start point.

Implements IlvMapSegmentString.