Next: ClutterBehaviourDepth, Previous: ClutterBackend, Up: Top
A behaviour interpolating position along a B-Spline
<clutter-behaviour-bspline> interpolates actors along a defined B-Spline
path.
A bezier spline is a set of cubic bezier curves defined by a sequence of control
points given when creating a new <clutter-behaviour-bspline> instance.
Additional bezier curves can be added to the end of the bspline using
clutter_behaviour_bspline_append_* family of functions, control points can be
moved using clutter-behaviour-bspline-adjust. The bspline can be split
into two with clutter-behaviour-bspline-split, and bsplines can be
concatenated using clutter-behaviour-bspline-join.
Each time the behaviour reaches a point on the path, the "knot-reached" signal is emitted.
Derives from
<clutter-scriptable>,<clutter-behaviour>.This class defines no direct slots.
<clutter-knot>)This signal is emitted at the end of each frame.
Since 0.2
<clutter-alpha>) (knots <clutter-knot>) (n_knots unsigned-int) (ret <clutter-behaviour>)Creates a new bezier spline behaviour. You can use this behaviour to drive actors along the bezier spline, described by the knots control points.
Bspline is defined by 3n + 1 points, n >=1; any trailing points passed into this function are stored internally and used during any subsequent clutter_behaviour_bspline_append_* operations.
- alpha
- a
<clutter-alpha>, or ‘#f’- knots
- a list of
<clutter-knots>representing individual control points- n-knots
- the number of control points
- ret
- a
<clutter-behaviour>Since 0.4
<clutter-behaviour-bspline>) (offset unsigned-int)Truncates the bezier spline at the control point; if the control point at offset is not one of the on-curve points, the bspline will be truncated at the nearest preceeding on-curve point.
- bs
- a
<clutter-behaviour-bspline>- offset
- offset of control where the bspline should be truncated
Since 0.4
<clutter-behaviour-bspline>) (bs2 <clutter-behaviour-bspline>)Joins a copy of bezier spline bs2 onto the end of bezier spline bs1; bs2 is not modified.
- bs1
- a
<clutter-behaviour-bspline>- bs2
- a
<clutter-behaviour-bspline>Since 0.4
<clutter-behaviour-bspline>) (offset unsigned-int) (ret <clutter-behaviour>)Splits a bezier spline into two at the control point at offset; if the control point at offset is not one of the on-curve bezier points, the bspline will be split at the nearest on-curve point before the offset. The original bspline is shortened appropriately.
- bs
- a
<clutter-behaviour-bspline>- offset
- an offset of the control point at which to split the spline.
- ret
- new ClutterBehaviourBspline.
Since 0.4
<clutter-behaviour-bspline>)Empties a bspline.
- bs
- a
<clutter-behaviour-bspline>Since 0.4
<clutter-behaviour-bspline>) (offset unsigned-int) (knot <clutter-knot>)Change the coordinaces of control point at index to those represented by the knot.
- bs
- a
<clutter-behaviour-bspline>- offset
- an index of control point to ajdust
- knot
- a
<clutter-knot>with new coordinances for the control point.Since 0.4