|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.cau.cs.kieler.core.math.BezierSpline
public class BezierSpline
Represents a piecewise bezier spline. This means a collection of bezier curves adding up to a smooth spline.
Nested Class Summary | |
---|---|
class |
BezierSpline.BezierCurve
Represents a part of the whole spline consisting of start and end point, and two control points. |
Constructor Summary | |
---|---|
BezierSpline()
Default Constructor. |
Method Summary | |
---|---|
void |
addCurve(BezierSpline.BezierCurve curve)
Add a new piece of bezierCurve to the whole spline. |
void |
addCurve(KVector startPnt,
KVector fstCtrPnt,
KVector sndCtrPnt,
KVector endPnt)
Adds a new curve to this piecewise bezier spline. |
void |
addSpline(BezierSpline spline,
boolean beginning)
add a whole piecewise spline to this spline. |
KVector[] |
getBasePoints()
returns just the base points, including start and end point. |
LinkedList<BezierSpline.BezierCurve> |
getCurves()
Returns piecewise curves. |
KVector |
getEndPoint()
returns the last point of the last piece of the spline. |
KVector[] |
getInnerPoints()
returns the inner points of this piecewise bezier spline. |
KVector[] |
getPolylineApprx(int accuracy)
Returns a sequence of points, representing this spline as an approximated polyline. |
KVector |
getStartPoint()
returns the first point of the first piece of the spline. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BezierSpline()
Method Detail |
---|
public void addCurve(BezierSpline.BezierCurve curve)
curve
- BezierCurve to addpublic void addSpline(BezierSpline spline, boolean beginning)
spline
- spline being addedbeginning
- if true, the new spline is added at the beginning, otherwise at the endpublic void addCurve(KVector startPnt, KVector fstCtrPnt, KVector sndCtrPnt, KVector endPnt)
startPnt
- starting pointfstCtrPnt
- first control pointsndCtrPnt
- snd control pointendPnt
- end pointpublic KVector getStartPoint()
public KVector getEndPoint()
public KVector[] getInnerPoints()
public KVector[] getBasePoints()
public KVector[] getPolylineApprx(int accuracy)
accuracy
- number of points per curve
public LinkedList<BezierSpline.BezierCurve> getCurves()
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |