Package toxi.geom
Class BezierCurve3D
java.lang.Object
toxi.geom.BezierCurve3D
Standard multi-segment bezier curve implementation with optional automatic
handle alignment between segments. Also provides curve tangent calculation
feature. Can be used to create closed curves. Usage of this class is very
similar to
Spline3D
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
alignHandlesForPoint
(int id) static Vec3D
computePointInSegment
(Vec3D a, Vec3D b, Vec3D c, Vec3D d, float t) static Vec3D
computeTangentInSegment
(Vec3D a, Vec3D b, Vec3D c, Vec3D d, float t) boolean
isClosed()
toLineStrip3D
(int res) Computes a list of intermediate curve points for all segments.
-
Constructor Details
-
BezierCurve3D
public BezierCurve3D() -
BezierCurve3D
-
-
Method Details
-
computePointInSegment
-
computeTangentInSegment
-
add
-
alignAllHandles
public void alignAllHandles() -
alignHandlesForPoint
public void alignHandlesForPoint(int id) -
isClosed
public boolean isClosed()- Returns:
- true, if the curve is closed. I.e. the first and last control point coincide.
-
toLineStrip3D
Computes a list of intermediate curve points for all segments. For each curve segment the given number of points will be produced.- Parameters:
res
- number of points per segment- Returns:
- list of Vec3Ds
-