org.vectomatic.common.model.geometry
Class BezierSegment

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

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

Class to represent a Bezier spline segment in Path


Field Summary
 
Fields inherited from class org.vectomatic.common.model.geometry.Segment
_bbox, _pts
 
Constructor Summary
BezierSegment()
           
BezierSegment(BezierSegment segment)
           
BezierSegment(Point[] pts)
           
 
Method Summary
 Segment clone()
           
 boolean equals(Object obj)
           
 Point getEndControlPoint()
           
 Point getStartControlPoint()
           
 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

BezierSegment

public BezierSegment()

BezierSegment

public BezierSegment(Point[] pts)

BezierSegment

public BezierSegment(BezierSegment segment)
Method Detail

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

getStartControlPoint

public Point getStartControlPoint()

getEndControlPoint

public Point getEndControlPoint()

toString

public String toString()
Overrides:
toString 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.