|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.partnersoft.geometry.xyz.XyzPolyline
public class XyzPolyline
A polyline consisting of at least two vertices and one line segment.
Copyright 2007 Partner Software, Inc.
| Constructor Summary | |
|---|---|
XyzPolyline(double... coords)
|
|
XyzPolyline(double[] coordsX,
double[] coordsY,
double[] coordsZ)
|
|
XyzPolyline(java.util.List<XyzPoint> points)
|
|
XyzPolyline(XyzPoint... points)
|
|
| Method Summary | |
|---|---|
boolean |
contains(XyzPoint point)
|
XyzBounds |
getBounds()
Returns an XyzBounds object representing the rectangular extents of this shape. |
java.util.Iterator<XyzPoint> |
iterator()
|
XyzPolyline |
scale(double factor)
Return a scaled version of the shape by multiplying all coordinates by the given factor in both dimensions. |
XyzPolyline |
scale(double factorX,
double factorY,
double factorZ)
|
XyzPolyline |
simplify(double granularity)
Simplify the polyline by eliminating segments whose length is less than the given granularity. |
XyzPolyline |
simplify2(double granularity)
|
XyzPolyline |
transform(XyzTransform transform)
Transform the shape using the given transform. |
XyzPolyline |
translate(double offsetX,
double offsetY,
double offsetZ)
Translate the shape by adding all coordinates to the given x, y, and z offsets. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XyzPolyline(double... coords)
public XyzPolyline(double[] coordsX,
double[] coordsY,
double[] coordsZ)
public XyzPolyline(XyzPoint... points)
public XyzPolyline(java.util.List<XyzPoint> points)
| Method Detail |
|---|
public XyzPolyline simplify(double granularity)
More accurately, what this method does is define a grid with square cells the size of the granularity. It then iterates through the polyline and eliminates points falling into the same cell as the previous point. This provides similar results to the elimination of short segments but much more efficiently. There will be edge effects, however (e.g. where point[i] is just barely to one side of a grid line and point[i + 1] is just barely to the other).
granularity - size of the discreteness grid applied to eliminate points that
are too closepublic XyzPolyline simplify2(double granularity)
public XyzPolyline scale(double factorX,
double factorY,
double factorZ)
public XyzPolyline scale(double factor)
XyzShape
scale in interface XyzShape<XyzPolyline>factor - scaling factor
public XyzPolyline translate(double offsetX,
double offsetY,
double offsetZ)
XyzShape
translate in interface XyzShape<XyzPolyline>offsetX - offset for the x dimensionoffsetY - offset for the y dimensionoffsetZ - offset for the z dimension
public XyzPolyline transform(XyzTransform transform)
XyzShape
transform in interface XyzShape<XyzPolyline>transform - affine transform to apply.
public XyzBounds getBounds()
XyzShape
getBounds in interface XyzShape<XyzPolyline>public boolean contains(XyzPoint point)
public java.util.Iterator<XyzPoint> iterator()
iterator in interface java.lang.Iterable<XyzPoint>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||