Next: , Previous: ClutterBehaviourPath, Up: Top


10 ClutterBehaviourRotate

A behaviour controlling rotation

10.1 Overview

A <clutter-behaviour-rotate> rotate actors between a starting and ending angle on a given axis.

The <clutter-behaviour-rotate> is available since version 0.4.

10.2 Usage

— Class: <clutter-behaviour-rotate>

Derives from <clutter-behaviour>.

This class defines the following slots:

angle-start
Initial angle
angle-end
Final angle
axis
Axis of rotation
direction
Direction of rotation
center-x
X center of rotation
center-y
Y center of rotation
center-z
Z center of rotation
— Function: clutter-behaviour-rotate-new (alpha <clutter-alpha>) (axis <clutter-rotate-axis>) (direction <clutter-rotate-direction>) (angle_start double) (angle_end double)   (ret <clutter-behaviour>)

Creates a new <clutter-behaviour-rotate>. This behaviour will rotate actors bound to it on axis, following direction, between angle-start and angle-end. Angles >= 360 degrees will be clamped to the canonical interval <0, 360), if angle_start == angle_end, the behaviour will carry out a single rotation of 360 degrees.

alpha
a <clutter-alpha>, or ‘#f
axis
the rotation axis
direction
the rotation direction
angle-start
the starting angle in degrees, between 0 and 360.
angle-end
the final angle in degrees, between 0 and 360.
ret
the newly created <clutter-behaviour-rotate>.

Since 0.4

— Function: clutter-behaviour-rotate-set-axis (self <clutter-behaviour-rotate>) (axis <clutter-rotate-axis>)
— Method: set-axis

Sets the axis used by the rotate behaviour.

rotate
a <clutter-behaviour-rotate>
axis
a <clutter-rotate-axis>

Since 0.4

— Function: clutter-behaviour-rotate-get-axis (self <clutter-behaviour-rotate>)   (ret <clutter-rotate-axis>)
— Method: get-axis

Retrieves the <clutter-rotate-axis> used by the rotate behaviour.

rotate
a <clutter-behaviour-rotate>
ret
the rotation axis

Since 0.4

— Function: clutter-behaviour-rotate-set-bounds (self <clutter-behaviour-rotate>) (angle_start double) (angle_end double)
— Method: set-bounds

Sets the initial and final angles of a rotation behaviour; angles >= 360 degrees get clamped to the canonical interval <0, 360).

rotate
a <clutter-behaviour-rotate>
angle-start
initial angle in degrees, between 0 and 360.
angle-end
final angle in degrees, between 0 and 360.

Since 0.4

— Function: clutter-behaviour-rotate-get-bounds (self <clutter-behaviour-rotate>)   (angle_start double) (angle_end double)
— Method: get-bounds

Retrieves the rotation boundaries of the rotate behaviour.

rotate
a <clutter-behaviour-rotate>
angle-start
return value for the initial angle
angle-end
return value for the final angle

Since 0.4

— Function: clutter-behaviour-rotate-set-center (self <clutter-behaviour-rotate>) (int) (int) (int)
— Method: set-center

Sets the center of rotation. The coordinates are relative to the plane normal to the rotation axis set with clutter-behaviour-rotate-set-axis.

rotate
a <clutter-behaviour-rotate>
x
X axis center of rotation
y
Y axis center of rotation
z
Z axis center of rotation

Since 0.4

— Function: clutter-behaviour-rotate-get-center (self <clutter-behaviour-rotate>)   (int) (int) (int)
— Method: get-center

Retrieves the center of rotation set using clutter-behaviour-rotate-set-center.

rotate
a <clutter-behaviour-rotate>
x
return location for the X center of rotation
y
return location for the Y center of rotation
z
return location for the Z center of rotation

Since 0.4