|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.cau.cs.kieler.klay.layered.p5edges.SplineGenerator
public class SplineGenerator
Simple implementation for the spline calculator.
Nested Class Summary | |
---|---|
static class |
SplineGenerator.Curvature
Defines whether curvature should be increased or decreased. |
Constructor Summary | |
---|---|
SplineGenerator()
|
Method Summary | |
---|---|
BezierSpline |
generateShortSpline(KVector q,
KVector s)
Generates a spline representation for straight edges. |
BezierSpline |
generateSpline(LinkedList<KVector> pArray)
generates a simple piecewise bezier curve for given points. |
BezierSpline |
generateSpline(LinkedList<KVector> pArray,
KVector vectorQ,
KVector vectorS)
generates a simple piecewise bezier curve for given points. |
boolean |
refineSpline(LinkedList<KVector> pArray,
BezierSpline ospline,
SplineGenerator.Curvature mode)
perturb the control points of the spline in an attempt to make the spline fit. |
boolean |
straightenSpline(BezierSpline spline)
straighten_spline adjusts the control points of the spline to reduce the curvature. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SplineGenerator()
Method Detail |
---|
public BezierSpline generateSpline(LinkedList<KVector> pArray, KVector vectorQ, KVector vectorS)
pArray
- array with points which should be lay on the splinevectorQ
- outgoing tangent vector of the initial nodevectorS
- incoming tangent vector of the final node
public BezierSpline generateSpline(LinkedList<KVector> pArray)
pArray
- array with points which should be lay on the spline
public BezierSpline generateShortSpline(KVector q, KVector s)
q
- start points
- end point
public boolean refineSpline(LinkedList<KVector> pArray, BezierSpline ospline, SplineGenerator.Curvature mode)
pArray
- array with points which should be lay on the splineospline
- spline to be refinedmode
- either decrease or increase the curvature
public boolean straightenSpline(BezierSpline spline)
spline
- spline to be straightened
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |