za.co.luma.geom
Class Segment

java.lang.Object
  extended by za.co.luma.geom.Segment

public class Segment
extends java.lang.Object

This class represents a finite line segment, that is, the segment between two points.

Author:
Herman Tulleken (herman@luma.co.za)

Constructor Summary
Segment(Vector2DDouble start, Vector2DDouble end)
          Construct a new segment from two given points.
 
Method Summary
 Vector2DDouble getEnd()
          Gets the end point of this segment.
 Vector2DDouble getStart()
          Gets the start point of this segment.
 void setEnd(Vector2DDouble end)
          Sets the end point of this segment.
 void setStart(Vector2DDouble start)
          Sets the start point for this segment.
 java.lang.String toString()
          Returns "[start, end]".
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Segment

public Segment(Vector2DDouble start,
               Vector2DDouble end)
Construct a new segment from two given points.

Method Detail

getEnd

public Vector2DDouble getEnd()
Gets the end point of this segment.


setEnd

public void setEnd(Vector2DDouble end)
Sets the end point of this segment.


getStart

public Vector2DDouble getStart()
Gets the start point of this segment.


setStart

public void setStart(Vector2DDouble start)
Sets the start point for this segment.


toString

public java.lang.String toString()
Returns "[start, end]".

Overrides:
toString in class java.lang.Object