ilog.views.maps.geometry
Class IlvMapArcSegment

java.lang.Object
  extended by ilog.views.maps.geometry.IlvMapArcSegment
All Implemented Interfaces:
IlvMapSegment

public class IlvMapArcSegment
extends Object
implements IlvMapSegment

This class defines a circular arc segment. An IlvMapArcSegment is a circular arc defined by three control points called the start point, the intermediate point and the end point.

Since:
JViews 3.5

Constructor Summary
IlvMapArcSegment()
          Initializes an instance of the class.
IlvMapArcSegment(IlvCoordinate start, IlvCoordinate intermediate, IlvCoordinate end)
          Creates an arc segment that goes through the start, the intermediate, and end point given as argument.
 
Method Summary
 Rectangle2D getBounds(Rectangle2D result)
          Returns the bounds of this IlvMapSegment
 IlvCoordinate getEndPoint()
          Returns the end point of the segment.
 int getHorizontalIntersectionCount(IlvCoordinate point)
          Returns the number of intersections between an horizontal half line defined by its right extremity point and the segment.
 IlvCoordinate getIntermediatePoint()
          Returns the intermediate point of the segment.
 IlvCoordinate getStartPoint()
          Returns the start point of the segment.
 void setEndPoint(IlvCoordinate end)
          Sets the end point of the segment.
 void setIntermediatePoint(IlvCoordinate intermediate)
          Sets the intermediate point of the segment.
 void setStartPoint(IlvCoordinate start)
          Sets the start point of the segment.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlvMapArcSegment

public IlvMapArcSegment()
Initializes an instance of the class.


IlvMapArcSegment

public IlvMapArcSegment(IlvCoordinate start,
                        IlvCoordinate intermediate,
                        IlvCoordinate end)
Creates an arc segment that goes through the start, the intermediate, and end point given as argument.

Parameters:
start - The start point.
intermediate - The intermediate point.
end - The end point.
Method Detail

getStartPoint

public IlvCoordinate getStartPoint()
Returns the start point of the segment.

Specified by:
getStartPoint in interface IlvMapSegment
Returns:
The start point.

setStartPoint

public void setStartPoint(IlvCoordinate start)
Sets the start point of the segment.

Specified by:
setStartPoint in interface IlvMapSegment
Parameters:
start - The start point.

getEndPoint

public IlvCoordinate getEndPoint()
Returns the end point of the segment.

Specified by:
getEndPoint in interface IlvMapSegment
Returns:
The end point.

setEndPoint

public void setEndPoint(IlvCoordinate end)
Sets the end point of the segment.

Specified by:
setEndPoint in interface IlvMapSegment
Parameters:
end - The end point.

setIntermediatePoint

public void setIntermediatePoint(IlvCoordinate intermediate)
Sets the intermediate point of the segment.

Parameters:
intermediate - The intermediate point.

getIntermediatePoint

public IlvCoordinate getIntermediatePoint()
Returns the intermediate point of the segment.

Returns:
The intermediate point.

getHorizontalIntersectionCount

public int getHorizontalIntersectionCount(IlvCoordinate point)
Returns the number of intersections between an horizontal half line defined by its right extremity point and the segment. This function is used for point inclusion tests of IlvMapRingInterface.

Specified by:
getHorizontalIntersectionCount in interface IlvMapSegment
Parameters:
point - The point at the right extremity of the horizontal half line.
Returns:
The number of intersections between the point and the 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.

getBounds

public Rectangle2D getBounds(Rectangle2D result)
Returns the bounds of this IlvMapSegment

Specified by:
getBounds in interface IlvMapSegment
Since:
JViews 7.5


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.