![]() |
![]() |
![]() |
Clutter Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties |
enum ClutterRotateAxis; enum ClutterRotateDirection; struct ClutterBehaviourRotate; struct ClutterBehaviourRotateClass; ClutterBehaviour * clutter_behaviour_rotate_new (ClutterAlpha *alpha
,ClutterRotateAxis axis
,ClutterRotateDirection direction
,gdouble angle_start
,gdouble angle_end
); void clutter_behaviour_rotate_set_axis (ClutterBehaviourRotate *rotate
,ClutterRotateAxis axis
); ClutterRotateAxis clutter_behaviour_rotate_get_axis (ClutterBehaviourRotate *rotate
); void clutter_behaviour_rotate_set_direction (ClutterBehaviourRotate *rotate
,ClutterRotateDirection direction
); ClutterRotateDirection clutter_behaviour_rotate_get_direction (ClutterBehaviourRotate *rotate
); void clutter_behaviour_rotate_set_bounds (ClutterBehaviourRotate *rotate
,gdouble angle_start
,gdouble angle_end
); void clutter_behaviour_rotate_get_bounds (ClutterBehaviourRotate *rotate
,gdouble *angle_start
,gdouble *angle_end
); void clutter_behaviour_rotate_set_center (ClutterBehaviourRotate *rotate
,gint x
,gint y
,gint z
); void clutter_behaviour_rotate_get_center (ClutterBehaviourRotate *rotate
,gint *x
,gint *y
,gint *z
);
"angle-end" gdouble : Read / Write "angle-start" gdouble : Read / Write "axis" ClutterRotateAxis : Read / Write "center-x" gint : Read / Write "center-y" gint : Read / Write "center-z" gint : Read / Write "direction" ClutterRotateDirection : Read / Write
A ClutterBehaviourRotate rotate actors between a starting and ending angle on a given axis.
The ClutterBehaviourRotate is available since version 0.4.
typedef enum { /*< prefix=CLUTTER >*/ CLUTTER_X_AXIS, CLUTTER_Y_AXIS, CLUTTER_Z_AXIS } ClutterRotateAxis;
Axis of a rotation.
Rotate around the X axis | |
Rotate around the Y axis | |
Rotate around the Z axis |
Since 0.4
typedef enum { /*< prefix=CLUTTER_ROTATE >*/ CLUTTER_ROTATE_CW, CLUTTER_ROTATE_CCW } ClutterRotateDirection;
Direction of a rotation.
Since 0.4
struct ClutterBehaviourRotate;
The ClutterBehaviourRotate struct contains only private data and should be accessed using the provided API
Since 0.4
struct ClutterBehaviourRotateClass { };
The ClutterBehaviourRotateClass struct contains only private data
Since 0.4
ClutterBehaviour * clutter_behaviour_rotate_new (ClutterAlpha *alpha
,ClutterRotateAxis axis
,ClutterRotateDirection direction
,gdouble angle_start
,gdouble angle_end
);
Creates a new ClutterBehaviourRotate. 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.
If alpha
is not NULL
, the ClutterBehaviour will take ownership
of the ClutterAlpha instance. In the case when alpha
is NULL
,
it can be set later with clutter_behaviour_set_alpha()
.
|
a ClutterAlpha instance, or NULL . [allow-none]
|
|
the rotation axis |
|
the rotation direction |
|
the starting angle in degrees, between 0 and 360. |
|
the final angle in degrees, between 0 and 360. |
Returns : |
the newly created ClutterBehaviourRotate. |
Since 0.4
void clutter_behaviour_rotate_set_axis (ClutterBehaviourRotate *rotate
,ClutterRotateAxis axis
);
Sets the axis used by the rotate behaviour.
|
a ClutterBehaviourRotate |
|
a ClutterRotateAxis |
Since 0.4
ClutterRotateAxis clutter_behaviour_rotate_get_axis (ClutterBehaviourRotate *rotate
);
Retrieves the ClutterRotateAxis used by the rotate behaviour.
|
a ClutterBehaviourRotate |
Returns : |
the rotation axis |
Since 0.4
void clutter_behaviour_rotate_set_direction (ClutterBehaviourRotate *rotate
,ClutterRotateDirection direction
);
Sets the rotation direction used by the rotate behaviour.
|
a ClutterBehaviourRotate |
|
the rotation direction |
Since 0.4
ClutterRotateDirection clutter_behaviour_rotate_get_direction
(ClutterBehaviourRotate *rotate
);
Retrieves the ClutterRotateDirection used by the rotate behaviour.
|
a ClutterBehaviourRotate |
Returns : |
the rotation direction |
Since 0.4
void clutter_behaviour_rotate_set_bounds (ClutterBehaviourRotate *rotate
,gdouble angle_start
,gdouble angle_end
);
Sets the initial and final angles of a rotation behaviour; angles >= 360 degrees get clamped to the canonical interval <0, 360).
|
a ClutterBehaviourRotate |
|
initial angle in degrees, between 0 and 360. |
|
final angle in degrees, between 0 and 360. |
Since 0.4
void clutter_behaviour_rotate_get_bounds (ClutterBehaviourRotate *rotate
,gdouble *angle_start
,gdouble *angle_end
);
Retrieves the rotation boundaries of the rotate behaviour.
|
a ClutterBehaviourRotate |
|
return value for the initial angle |
|
return value for the final angle |
Since 0.4
void clutter_behaviour_rotate_set_center (ClutterBehaviourRotate *rotate
,gint x
,gint y
,gint z
);
Sets the center of rotation. The coordinates are relative to the plane
normal to the rotation axis set with clutter_behaviour_rotate_set_axis()
.
|
a ClutterBehaviourRotate |
|
X axis center of rotation |
|
Y axis center of rotation |
|
Z axis center of rotation |
Since 0.4
void clutter_behaviour_rotate_get_center (ClutterBehaviourRotate *rotate
,gint *x
,gint *y
,gint *z
);
Retrieves the center of rotation set using
clutter_behaviour_rotate_set_center()
.
|
a ClutterBehaviourRotate |
|
return location for the X center of rotation. [out] |
|
return location for the Y center of rotation. [out] |
|
return location for the Z center of rotation. [out] |
Since 0.4
"angle-end"
property "angle-end" gdouble : Read / Write
The final angle to where the rotation should end.
Allowed values: [0,360]
Default value: 0
Since 0.4
"angle-start"
property "angle-start" gdouble : Read / Write
The initial angle from whence the rotation should start.
Allowed values: [0,360]
Default value: 0
Since 0.4
"axis"
property"axis" ClutterRotateAxis : Read / Write
The axis of rotation.
Default value: CLUTTER_Z_AXIS
Since 0.4
"center-x"
property "center-x" gint : Read / Write
The x center of rotation.
Allowed values: >= -2147483647
Default value: 0
Since 0.4
"center-y"
property "center-y" gint : Read / Write
The y center of rotation.
Allowed values: >= -2147483647
Default value: 0
Since 0.4
"center-z"
property "center-z" gint : Read / Write
The z center of rotation.
Allowed values: >= -2147483647
Default value: 0
Since 0.4
"direction"
property"direction" ClutterRotateDirection : Read / Write
The direction of the rotation.
Default value: CLUTTER_ROTATE_CW
Since 0.4