ClutterBehaviourRotate

ClutterBehaviourRotate — A behaviour class to rotate actors

Synopsis




enum                ClutterRotateAxis;
enum                ClutterRotateDirection;
ClutterBehaviour*   clutter_behaviour_rotate_new        (ClutterAlpha *alpha,
                                                         ClutterRotateAxis axis,
                                                         ClutterRotateDirection direction,
                                                         gdouble angle_begin,
                                                         gdouble angle_end);
ClutterBehaviour*   clutter_behaviour_rotate_newx       (ClutterAlpha *alpha,
                                                         ClutterRotateAxis axis,
                                                         ClutterRotateDirection direction,
                                                         ClutterFixed angle_begin,
                                                         ClutterFixed 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_begin,
                                                         gdouble angle_end);
void                clutter_behaviour_rotate_set_boundsx
                                                        (ClutterBehaviourRotate *rotate,
                                                         ClutterFixed angle_begin,
                                                         ClutterFixed angle_end);
void                clutter_behaviour_rotate_get_bounds (ClutterBehaviourRotate *rotate,
                                                         gdouble *angle_begin,
                                                         gdouble *angle_end);
void                clutter_behaviour_rotate_get_boundsx
                                                        (ClutterBehaviourRotate *rotate,
                                                         ClutterFixed *angle_begin,
                                                         ClutterFixed *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);


Description

A ClutterBehaviourRotate rotate actors between a starting and ending angle on a given axis.

The ClutterBehaviourRotate is available since version 0.4.

Details

enum ClutterRotateAxis

typedef enum { /*< prefix=CLUTTER >*/
  CLUTTER_X_AXIS,
  CLUTTER_Y_AXIS,
  CLUTTER_Z_AXIS
} ClutterRotateAxis;

Axis of a rotation.

CLUTTER_X_AXIS Rotate around the X axis
CLUTTER_Y_AXIS Rotate around the Y axis
CLUTTER_Z_AXIS Rotate around the Z axis

Since 0.4


enum ClutterRotateDirection

typedef enum { /*< prefix=CLUTTER_ROTATE >*/
  CLUTTER_ROTATE_CW,
  CLUTTER_ROTATE_CCW
} ClutterRotateDirection;

Direction of a rotation.

CLUTTER_ROTATE_CW Clockwise rotation
CLUTTER_ROTATE_CCW Counter-clockwise rotation

Since 0.4


clutter_behaviour_rotate_new ()

ClutterBehaviour*   clutter_behaviour_rotate_new        (ClutterAlpha *alpha,
                                                         ClutterRotateAxis axis,
                                                         ClutterRotateDirection direction,
                                                         gdouble angle_begin,
                                                         gdouble angle_end);

Creates a new ClutterBehaviourRotate. This behaviour will rotate actors bound to it on axis, following direction, between angle_begin and angle_end.

alpha : a ClutterAlpha, or NULL
axis : the rotation axis
direction : the rotation direction
angle_begin : the starting angle
angle_end : the final angle
Returns : the newly created ClutterBehaviourRotate.

Since 0.4


clutter_behaviour_rotate_newx ()

ClutterBehaviour*   clutter_behaviour_rotate_newx       (ClutterAlpha *alpha,
                                                         ClutterRotateAxis axis,
                                                         ClutterRotateDirection direction,
                                                         ClutterFixed angle_begin,
                                                         ClutterFixed angle_end);

Creates a new ClutterBehaviourRotate. This is the fixed point version of clutter_behaviour_rotate_new().

alpha : a ClutterAlpha or NULL
axis : the rotation axis
direction : the rotation direction
angle_begin : the starting angle, in fixed point notation
angle_end : the final angle, in fixed point notation
Returns : the newly created ClutterBehaviourRotate.

Since 0.4


clutter_behaviour_rotate_set_axis ()

void                clutter_behaviour_rotate_set_axis   (ClutterBehaviourRotate *rotate,
                                                         ClutterRotateAxis axis);

Sets the axis used by the rotate behaviour.

rotate : a ClutterBehaviourRotate
axis : a ClutterRotateAxis

Since 0.4


clutter_behaviour_rotate_get_axis ()

ClutterRotateAxis   clutter_behaviour_rotate_get_axis   (ClutterBehaviourRotate *rotate);

Retrieves the ClutterRotateAxis used by the rotate behaviour.

rotate : a ClutterBehaviourRotate
Returns : the rotation axis

Since 0.4


clutter_behaviour_rotate_set_direction ()

void                clutter_behaviour_rotate_set_direction
                                                        (ClutterBehaviourRotate *rotate,
                                                         ClutterRotateDirection direction);

Sets the rotation direction used by the rotate behaviour.

rotate : a ClutterBehaviourRotate
direction : the rotation direction

Since 0.4


clutter_behaviour_rotate_get_direction ()

ClutterRotateDirection clutter_behaviour_rotate_get_direction
                                                        (ClutterBehaviourRotate *rotate);

Retrieves the ClutterRotateDirection used by the rotate behaviour.

rotate : a ClutterBehaviourRotate
Returns : the rotation direction

Since 0.4


clutter_behaviour_rotate_set_bounds ()

void                clutter_behaviour_rotate_set_bounds (ClutterBehaviourRotate *rotate,
                                                         gdouble angle_begin,
                                                         gdouble angle_end);

Sets the initial and final angles of a rotation behaviour.

rotate : a ClutterBehaviourRotate
angle_begin : initial angle
angle_end : final angle

Since 0.4


clutter_behaviour_rotate_set_boundsx ()

void                clutter_behaviour_rotate_set_boundsx
                                                        (ClutterBehaviourRotate *rotate,
                                                         ClutterFixed angle_begin,
                                                         ClutterFixed angle_end);

Fixed point version of clutter_behaviour_rotate_set_bounds().

rotate : a ClutterBehaviourRotate
angle_begin : initial angle, in fixed point notation
angle_end : final angle, in fixed point notation

Since 0.4


clutter_behaviour_rotate_get_bounds ()

void                clutter_behaviour_rotate_get_bounds (ClutterBehaviourRotate *rotate,
                                                         gdouble *angle_begin,
                                                         gdouble *angle_end);

Retrieves the rotation boundaries of the rotate behaviour.

rotate : a ClutterBehaviourRotate
angle_begin : return value for the initial angle
angle_end : return value for the final angle

Since 0.4


clutter_behaviour_rotate_get_boundsx ()

void                clutter_behaviour_rotate_get_boundsx
                                                        (ClutterBehaviourRotate *rotate,
                                                         ClutterFixed *angle_begin,
                                                         ClutterFixed *angle_end);

Retrieves the rotation boundaries of the rotate behaviour. This is the fixed point notation version of clutter_behaviour_rotate_get_bounds().

rotate : a ClutterBehaviourRotate
angle_begin : return value for the initial angle
angle_end : return value for the final angle

Since 0.4


clutter_behaviour_rotate_set_center ()

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().

rotate : a ClutterBehaviourRotate
x : X axis center of rotation
y : Y axis center of rotation
z : Z axis center of rotation

Since 0.4


clutter_behaviour_rotate_get_center ()

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().

rotate : a ClutterBehaviourRotate
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