All Packages Class Hierarchy This Package Previous Next Index
Class att.grappa.BezierSpline
java.lang.Object
|
+----java.util.Vector
|
+----att.grappa.LineVector
|
+----att.grappa.BezierSpline
- public class BezierSpline
- extends LineVector
Calculates and stores a bezier spline of degree 3 from a Vector of
control points.
- Version:
- 1.1, 30 Sep 1999; Copyright 1996 - 1999 by AT&T Corp.
- Author:
- John Mocenigo, Research @ AT&T Labs
-
BezierSpline()
- Construct an empty (uncomputed) bezier spline.
-
BezierSpline(Vector)
- Construct a bezier spline for the given vector of control points.
-
BezierSpline(Vector, int)
- Construct a bezier spline for the given vector of control points.
-
BezierSpline(Vector, int, int)
- Construct a bezier spline for the given vector of control points.
-
firstPoint()
- Get the first spline point.
-
getBezierPrecision()
- Gets the current bezier precision.
-
getDegree()
- Get the degree of this spline.
-
getPointAt(int)
- Get the spline point at the given offset.
-
getPrecision()
- Get the precision of this spline.
-
lastPoint()
- Get the last spline point.
-
setBezierPrecision(int)
- Sets the bezier precision to the specified value.
-
setSpline(Vector)
- Compute the bezier spline for the given vector of control points.
-
setSpline(Vector, int, int)
- Construct a bezier spline for the given vector of control points.
BezierSpline
public BezierSpline()
- Construct an empty (uncomputed) bezier spline.
BezierSpline
public BezierSpline(Vector linePoints)
- Construct a bezier spline for the given vector of control points.
- Parameters:
- a - vector of Point objects that specifies the control points for
bezier spline.
BezierSpline
public BezierSpline(Vector linePoints,
int start)
- Construct a bezier spline for the given vector of control points.
- Parameters:
- a - vector of Point objects that specifies the control points for
bezier spline.
- start - start with points beginning at this offset
BezierSpline
public BezierSpline(Vector linePoints,
int start,
int count)
- Construct a bezier spline for the given vector of control points.
- Parameters:
- a - vector of Point objects that specifies the control points for
bezier spline.
- start - start with points beginning at this offset
- count - the number of points in the vector to use
setBezierPrecision
public static int setBezierPrecision(int prec)
- Sets the bezier precision to the specified value. The precision
determines how many spline points, in addition to the control points,
are to be computed are to be computed for each control point.
The default is 15.
- Parameters:
- prec - the new precision value
- Returns:
- the previous precision value
getBezierPrecision
public static int getBezierPrecision()
- Gets the current bezier precision.
- Returns:
- the current precision value
setSpline
public BezierSpline setSpline(Vector linePoints)
- Compute the bezier spline for the given vector of control points.
- Parameters:
- a - vector of Point objects that specifies the control points for
bezier spline.
setSpline
public BezierSpline setSpline(Vector linePoints,
int start,
int count)
- Construct a bezier spline for the given vector of control points.
- Parameters:
- a - vector of Point objects that specifies the control points for
bezier spline.
- start - start with points beginning at this offset
- count - the number of points in the vector to use
getPointAt
public Point getPointAt(int idx)
- Get the spline point at the given offset.
- Parameters:
- idx - the index of the spline point to return (0 is the first point)
- Returns:
- the spline point at the specified index
- Overrides:
- getPointAt in class LineVector
firstPoint
public Point firstPoint()
- Get the first spline point.
- Returns:
- the first spline point
- Overrides:
- firstPoint in class LineVector
lastPoint
public Point lastPoint()
- Get the last spline point.
- Returns:
- the last spline point
- Overrides:
- lastPoint in class LineVector
getDegree
public int getDegree()
- Get the degree of this spline.
- Returns:
- the degree of the spline
getPrecision
public int getPrecision()
- Get the precision of this spline.
- Returns:
- the precision of the spline
All Packages Class Hierarchy This Package Previous Next Index