Maven module :un.api : api-geometry :
Class : un.impl.geometry.s2d.Segment
Extends/Implements : un.impl.geometry.s2d.AbstractGeometry2D
Subclasses : -

A Line segment .
Specification :
author  Johann Sorel
author  Bertrand COTE


Variables : -
Functions : Segment, Segment, Segment, Segment, getDimension, getStart, setStart, getStartX, setStartX, getStartY, setStartY, getEnd, setEnd, getEndX, setEndX, getEndY, setEndY, getArea, getLength, getBoundingBox, getBoundingCircle, getCentroid, createPathIterator



public void Segment ()

public void Segment (int dimension)

public void Segment (Tuple start, Tuple end)

public void Segment (double x1, double y1, double x2, double y2)

public int getDimension ()

public Tuple getStart ()

public void setStart (Tuple start)


The x-axis coordinate of the start of the line.
public double getStartX ()

public void setStartX (double x1)


The y-axis coordinate of the start of the line.
public double getStartY ()

public void setStartY (double y1)

public Tuple getEnd ()

public void setEnd (Tuple end)


The x-axis coordinate of the end of the line.
public double getEndX ()

public void setEndX (double x2)


The y-axis coordinate of the end of the line.
public double getEndY ()

public void setEndY (double y2)


Calculate the line surface area.
return  0.
public double getArea ()


Calculate line length.
return  the line's length.
public double getLength ()


Line bounding box is a box which has as corners both start and end tuples
with a width of twice the radius.
return  BoundingBox
public BBox getBoundingBox ()


Bounding circle is centered on the middle of the line and has as radius
half-length of the line.
return
public Circle getBoundingCircle ()


Centroid is line's center.
return  Point
public Point getCentroid ()



public PathIterator createPathIterator ()