ilog.views.maps.geometry
Class IlvMapLinearSegment

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

public class IlvMapLinearSegment
extends Object
implements IlvMapSegment

This class defines a linear segment.

Since:
JViews 3.5

Constructor Summary
IlvMapLinearSegment()
          Initializes an instance of the class.
IlvMapLinearSegment(IlvCoordinate start, IlvCoordinate end)
          Creates a linear segment by specifying the start and end point.
 
Method Summary
 Rectangle2D getBounds(Rectangle2D result)
          Returns the bounds of this IlvMapSegment
 IlvCoordinate getEndPoint()
          Returns the end point of this segment.
 int getHorizontalIntersectionCount(IlvCoordinate p)
          Returns the number of intersections between an horizontal half line defined by its right extremity point and the segment.
 IlvCoordinate getStartPoint()
          Returns the start point of this segment.
 void setEndPoint(IlvCoordinate end)
          Sets the end point of this segment.
 void setStartPoint(IlvCoordinate start)
          Sets the start point of this segment.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlvMapLinearSegment

public IlvMapLinearSegment()
Initializes an instance of the class.


IlvMapLinearSegment

public IlvMapLinearSegment(IlvCoordinate start,
                           IlvCoordinate end)
Creates a linear segment by specifying the start and end point.

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

getStartPoint

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

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

setStartPoint

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

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

getEndPoint

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

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

setEndPoint

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

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

getHorizontalIntersectionCount

public int getHorizontalIntersectionCount(IlvCoordinate p)
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:
p - The point at the right extremity of the horizontal half line.
Returns:
The number of intersections between the point and the segment.

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.