org.openmali.curves
Class BezierCurve2
java.lang.Object
org.openmali.curves.BezierCurve2
public class BezierCurve2
- extends java.lang.Object
A quadric Bezier Curve (degree 2)
B(t) = (1-t)^2*P0 + 2*t*(1-t)*P1 + t^2*P2 0 < t < 1
- Since:
- 04 sept. 2007
- Author:
- Ludovic Marce
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BezierCurve2
public BezierCurve2(Point3f startPoint,
Point3f midPoint,
Point3f endPoint)
BezierCurve2
public BezierCurve2(Point3f[] points)
getBasePoints
public final Point3f[] getBasePoints()
- Returns:
- the array of base-points for this Bezier Curve.
getBasePoint
public final Point3f getBasePoint(int i)
- Returns:
- the n-th base-point for this Bezier Curve.
getPoint
public final Point3f getPoint(float i,
Point3f p)
- Parameters:
i - with 0 < t < 1p - the point output object to write the calculated point on the Bezier Curve to
getPoint
public final Point3f getPoint(float i)
- Parameters:
i - with 0 < t < 1
- Returns:
- one point on the Bezier curve
getPoints
public final Point3f[] getPoints(Point3f[] result)
- Parameters:
result - result.length Point3fs from the Bezier Curve
getPoints
public final Point3f[] getPoints(int numPoints)
- Parameters:
numPoints -
- Returns:
- numPoints * Point3f from the Bezier curve