org.vectomatic.common.model.geometry
Class LineSegment

java.lang.Object
  extended by org.vectomatic.common.model.geometry.Segment
      extended by org.vectomatic.common.model.geometry.LineSegment
All Implemented Interfaces:
com.google.gwt.user.client.rpc.IsSerializable

public class LineSegment
extends Segment
implements com.google.gwt.user.client.rpc.IsSerializable

Class to represent a line segment in Path


Field Summary
 
Fields inherited from class org.vectomatic.common.model.geometry.Segment
_bbox, _pts
 
Constructor Summary
LineSegment()
           
LineSegment(LineSegment segment)
           
LineSegment(Point[] pts)
           
 
Method Summary
 Segment clone()
           
 boolean equals(Object obj)
           
 int hashCode()
           
 void nearestPointOnSegment(Point p, Point dest)
          Returns the closest point on the segment to the specified point
 String toString()
           
 
Methods inherited from class org.vectomatic.common.model.geometry.Segment
getBoundingBox, getEndPoint, getStartPoint, getVertices, squaredDistanceToPoint
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LineSegment

public LineSegment()

LineSegment

public LineSegment(Point[] pts)

LineSegment

public LineSegment(LineSegment segment)
Method Detail

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

nearestPointOnSegment

public void nearestPointOnSegment(Point p,
                                  Point dest)
Description copied from class: Segment
Returns the closest point on the segment to the specified point

Specified by:
nearestPointOnSegment in class Segment
Parameters:
p - An arbitrary point p
dest - The closest point on the segment to p

clone

public Segment clone()
Specified by:
clone in class Segment


Copyright © 2010. All Rights Reserved.