|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jaitools.jts.AbstractSmoother
public abstract class AbstractSmoother
Base class for Bezier smoothing of JTS Geometry objects.
| Nested Class Summary | |
|---|---|
protected static class |
AbstractSmoother.InterpPoint
Class to hold interpolation parameters for a given point. |
| Field Summary | |
|---|---|
protected SmootherControl |
control
The current SmootherControl instance. |
static SmootherControl |
DEFAULT_CONTROL
Default smoothing control. |
protected com.vividsolutions.jts.geom.GeometryFactory |
geomFactory
The current GeometryFactory being used. |
protected Map<Integer,WeakReference<AbstractSmoother.InterpPoint[]>> |
lookup
Cache of previously calculated interpolation parameters |
| Constructor Summary | |
|---|---|
AbstractSmoother(com.vividsolutions.jts.geom.GeometryFactory geomFactory)
Creates a new smoother that will use the given GeometryFactory. |
|
| Method Summary | |
|---|---|
protected com.vividsolutions.jts.geom.Coordinate[] |
cubicBezier(com.vividsolutions.jts.geom.Coordinate start,
com.vividsolutions.jts.geom.Coordinate end,
com.vividsolutions.jts.geom.Coordinate ctrl1,
com.vividsolutions.jts.geom.Coordinate ctrl2,
int nv)
Calculates vertices along a cubic Bazier curve given start point, end point and two control points. |
protected AbstractSmoother.InterpPoint[] |
getInterpPoints(int npoints)
Gets the interpolation parameters for a Bezier curve approximated by the given number of vertices. |
void |
setControl(SmootherControl control)
Sets a new Control object to for smoothing. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final SmootherControl DEFAULT_CONTROL
protected SmootherControl control
protected final com.vividsolutions.jts.geom.GeometryFactory geomFactory
GeometryFactory being used.
protected Map<Integer,WeakReference<AbstractSmoother.InterpPoint[]>> lookup
| Constructor Detail |
|---|
public AbstractSmoother(com.vividsolutions.jts.geom.GeometryFactory geomFactory)
GeometryFactory.
geomFactory - factory to use for creating smoothed objects
IllegalArgumentException - if geomFactory is null| Method Detail |
|---|
public void setControl(SmootherControl control)
Control object to for smoothing.
control - the control to use for smoothing; if null the
default control will be set
protected com.vividsolutions.jts.geom.Coordinate[] cubicBezier(com.vividsolutions.jts.geom.Coordinate start,
com.vividsolutions.jts.geom.Coordinate end,
com.vividsolutions.jts.geom.Coordinate ctrl1,
com.vividsolutions.jts.geom.Coordinate ctrl2,
int nv)
start - start positionend - end positionctrl1 - first control pointctrl2 - second control pointnv - number of vertices including the start and end points
protected AbstractSmoother.InterpPoint[] getInterpPoints(int npoints)
npoints - number of vertices
InterpPoint objects holding the parameter values
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||