com.partnersoft.v3x.graphics
Class DoublePolyline

java.lang.Object
  extended by com.partnersoft.v3x.graphics.DoublePolyline

public class DoublePolyline
extends java.lang.Object

A double-precision polyline object.


Constructor Summary
DoublePolyline()
           
DoublePolyline(java.util.ArrayList newPoints)
           
DoublePolyline(DoubleBuffer buffer)
           
DoublePolyline(FloatBuffer buffer)
           
 
Method Summary
 void addPoint(double x, double y)
           
 void addPoint(DoublePoint newPoint)
           
 void addPointByBearing(double theta, double distance)
           
 java.util.ArrayList clipOutRectangle(DoubleRectangle rectangle)
          Clips a rectangle out of the polyline to a rectangle, producing zero or more resultant polylines that are outside the rectangle.
 java.util.ArrayList clipToRectangle(DoubleRectangle rectangle)
          Clips the polyline to a rectangle, producing zero or more resultant polylines that are within the rectangle.
 java.lang.Object clone()
           
 double getLength()
           
 int getNumberOfPoints()
           
 int getNumberOfSegments()
           
 java.util.ArrayList getPoints()
           
 void reduceDetail(double granularity)
          Attempts to reduce the complexity of the line by eliminating points which add nothing to the detail at a certain granularity.
 void scale(double scaleFactor)
           
 void setPoints(java.util.ArrayList newPoints)
           
 DoublePolyline subsection(int startSegment, int endSegment)
          Returns a DoublePolyline that is a subsection of the current one.
 FloatBuffer toFloatBuffer()
           
 java.lang.String toString()
           
 void translate(double xOffset, double yOffset)
           
 void translateAndScale(double xOffset, double yOffset, double scaleFactor)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DoublePolyline

public DoublePolyline()

DoublePolyline

public DoublePolyline(java.util.ArrayList newPoints)

DoublePolyline

public DoublePolyline(DoubleBuffer buffer)

DoublePolyline

public DoublePolyline(FloatBuffer buffer)
Method Detail

toFloatBuffer

public FloatBuffer toFloatBuffer()

getPoints

public java.util.ArrayList getPoints()

setPoints

public void setPoints(java.util.ArrayList newPoints)

addPoint

public void addPoint(DoublePoint newPoint)

addPoint

public void addPoint(double x,
                     double y)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getNumberOfPoints

public int getNumberOfPoints()

getNumberOfSegments

public int getNumberOfSegments()

getLength

public double getLength()

translate

public void translate(double xOffset,
                      double yOffset)

scale

public void scale(double scaleFactor)

translateAndScale

public void translateAndScale(double xOffset,
                              double yOffset,
                              double scaleFactor)

addPointByBearing

public void addPointByBearing(double theta,
                              double distance)

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

reduceDetail

public void reduceDetail(double granularity)
Attempts to reduce the complexity of the line by eliminating points which add nothing to the detail at a certain granularity.


clipToRectangle

public java.util.ArrayList clipToRectangle(DoubleRectangle rectangle)
Clips the polyline to a rectangle, producing zero or more resultant polylines that are within the rectangle.


clipOutRectangle

public java.util.ArrayList clipOutRectangle(DoubleRectangle rectangle)
Clips a rectangle out of the polyline to a rectangle, producing zero or more resultant polylines that are outside the rectangle.


subsection

public DoublePolyline subsection(int startSegment,
                                 int endSegment)
Returns a DoublePolyline that is a subsection of the current one.