ClutterBehaviourEllipse
3
CLUTTER Library

# ClutterBehaviourEllipse

A behaviour interpolating position along an ellipse

## Synopsis

                        ClutterBehaviourEllipse;
                        ClutterBehaviourEllipseClass;
    ClutterBehaviour *  clutter_behaviour_ellipse_new       (ClutterAlpha *alpha,
                                                             gint x,
                                                             gint y,
                                                             gint width,
                                                             gint height,
                                                             ClutterRotateDirection direction,
                                                             gdouble start,
                                                             gdouble end);
    void                clutter_behaviour_ellipse_set_center
                                                            (ClutterBehaviourEllipse *self,
                                                             gint x,
                                                             gint y);
    void                clutter_behaviour_ellipse_get_center
                                                            (ClutterBehaviourEllipse *self,
                                                             gint *x,
                                                             gint *y);
    void                clutter_behaviour_ellipse_set_angle_start
                                                            (ClutterBehaviourEllipse *self,
                                                             gdouble angle_start);
    gdouble             clutter_behaviour_ellipse_get_angle_start
                                                            (ClutterBehaviourEllipse *self);
    void                clutter_behaviour_ellipse_set_angle_end
                                                            (ClutterBehaviourEllipse *self,
                                                             gdouble angle_end);
    gdouble             clutter_behaviour_ellipse_get_angle_end
                                                            (ClutterBehaviourEllipse *self);
    void                clutter_behaviour_ellipse_set_angle_tilt
                                                            (ClutterBehaviourEllipse *self,
                                                             ClutterRotateAxis axis,
                                                             gdouble angle_tilt);
    gdouble             clutter_behaviour_ellipse_get_angle_tilt
                                                            (ClutterBehaviourEllipse *self,
                                                             ClutterRotateAxis axis);
    void                clutter_behaviour_ellipse_set_height
                                                            (ClutterBehaviourEllipse *self,
                                                             gint height);
    gint                clutter_behaviour_ellipse_get_height
                                                            (ClutterBehaviourEllipse *self);
    void                clutter_behaviour_ellipse_set_width (ClutterBehaviourEllipse *self,
                                                             gint width);
    gint                clutter_behaviour_ellipse_get_width (ClutterBehaviourEllipse *self);
    void                clutter_behaviour_ellipse_set_tilt  (ClutterBehaviourEllipse *self,
                                                             gdouble angle_tilt_x,
                                                             gdouble angle_tilt_y,
                                                             gdouble angle_tilt_z);
    void                clutter_behaviour_ellipse_get_tilt  (ClutterBehaviourEllipse *self,
                                                             gdouble *angle_tilt_x,
                                                             gdouble *angle_tilt_y,
                                                             gdouble *angle_tilt_z);
    void                clutter_behaviour_ellipse_set_direction
                                                            (ClutterBehaviourEllipse *self,
                                                             ClutterRotateDirection direction);
    ClutterRotateDirection  clutter_behaviour_ellipse_get_direction
                                                            (ClutterBehaviourEllipse *self);

## Object Hierarchy

      GObject
       +----ClutterBehaviour
             +----ClutterBehaviourEllipse

## Properties

      "angle-end"                gdouble               : Read / Write
      "angle-start"              gdouble               : Read / Write
      "angle-tilt-x"             gdouble               : Read / Write
      "angle-tilt-y"             gdouble               : Read / Write
      "angle-tilt-z"             gdouble               : Read / Write
      "center"                   ClutterKnot*          : Read / Write
      "direction"                ClutterRotateDirection  : Read / Write
      "height"                   gint                  : Read / Write
      "width"                    gint                  : Read / Write

## Description

ClutterBehaviourEllipse interpolates actors along a path defined by an ellipse.

When applying an ellipse behaviour to an actor, the behaviour will update the actor's position and depth and set them to what is dictated by the ellipses initial position.

## Details

### ClutterBehaviourEllipse

    typedef struct _ClutterBehaviourEllipse ClutterBehaviourEllipse;

The ClutterBehaviourEllipse struct contains only private data and should be accessed using the provided API

Since 0.4

### ClutterBehaviourEllipseClass

    typedef struct {
    } ClutterBehaviourEllipseClass;

The ClutterBehaviourEllipseClass struct contains only private data

Since 0.4

### clutter_behaviour_ellipse_new ()

    ClutterBehaviour *  clutter_behaviour_ellipse_new       (ClutterAlpha *alpha,
                                                             gint x,
                                                             gint y,
                                                             gint width,
                                                             gint height,
                                                             ClutterRotateDirection direction,
                                                             gdouble start,
                                                             gdouble end);

Creates a behaviour that drives actors along an elliptical path with given center, width and height; the movement starts at `start` degrees (with 0 corresponding to 12 o'clock) and ends at `end` degrees. Angles greated than 360 degrees get clamped to the canonical interval <0, 360); if `start` is equal to `end`, the behaviour will rotate by exacly 360 degrees.

`alpha` :

  a ClutterAlpha, or `NULL`

`x` :

  x coordinace of the center

`y` :

  y coordiance of the center

`width` :

  width of the ellipse

`height` :

  height of the ellipse

`direction` :

  ClutterRotateDirection of rotation

`start` :

  angle in degrees at which movement starts, between 0 and 360

`end` :

  angle in degrees at which movement ends, between 0 and 360

Returns :

  the newly created ClutterBehaviourEllipse

Since 0.4

### clutter_behaviour_ellipse_set_center ()

    void                clutter_behaviour_ellipse_set_center
                                                            (ClutterBehaviourEllipse *self,
                                                             gint x,
                                                             gint y);

Sets the center of the elliptical path to the point represented by knot.

`self` :

  a ClutterBehaviourEllipse

`x` :

  x coordinace of centre

`y` :

  y coordinace of centre

Since 0.4

### clutter_behaviour_ellipse_get_center ()

    void                clutter_behaviour_ellipse_get_center
                                                            (ClutterBehaviourEllipse *self,
                                                             gint *x,
                                                             gint *y);

Gets the center of the elliptical path path.

`self` :

  a ClutterBehaviourEllipse

`x` :

  return location for the X coordinate of the center, or `NULL`

`y` :

  return location for the Y coordinate of the center, or `NULL`

Since 0.4

### clutter_behaviour_ellipse_set_angle_start ()

    void                clutter_behaviour_ellipse_set_angle_start
                                                            (ClutterBehaviourEllipse *self,
                                                             gdouble angle_start);

Sets the angle at which movement starts; angles >= 360 degress get clamped to the canonical interval <0, 360).

`self` :

  a ClutterBehaviourEllipse

`angle_start` :

  angle at which movement starts in degrees, between 0 and 360.

Since 0.6

### clutter_behaviour_ellipse_get_angle_start ()

    gdouble             clutter_behaviour_ellipse_get_angle_start
                                                            (ClutterBehaviourEllipse *self);

Gets the angle at which movements starts.

`self` :

  a ClutterBehaviourEllipse

Returns :

  angle in degrees

Since 0.6

### clutter_behaviour_ellipse_set_angle_end ()

    void                clutter_behaviour_ellipse_set_angle_end
                                                            (ClutterBehaviourEllipse *self,
                                                             gdouble angle_end);

Sets the angle at which movement ends; angles >= 360 degress get clamped to the canonical interval <0, 360).

`self` :

  a ClutterBehaviourEllipse

`angle_end` :

  angle at which movement ends in degrees, between 0 and 360.

Since 0.4

### clutter_behaviour_ellipse_get_angle_end ()

    gdouble             clutter_behaviour_ellipse_get_angle_end
                                                            (ClutterBehaviourEllipse *self);

Gets the at which movements ends.

`self` :

  a ClutterBehaviourEllipse

Returns :

  angle in degrees

Since 0.4

### clutter_behaviour_ellipse_set_angle_tilt ()

    void                clutter_behaviour_ellipse_set_angle_tilt
                                                            (ClutterBehaviourEllipse *self,
                                                             ClutterRotateAxis axis,
                                                             gdouble angle_tilt);

Sets the angle at which the ellipse should be tilted around it's center.

`self` :

  a ClutterBehaviourEllipse

`axis` :

  a ClutterRotateAxis

`angle_tilt` :

  tilt of the elipse around the center in the given axis in degrees.

Since 0.4

### clutter_behaviour_ellipse_get_angle_tilt ()

    gdouble             clutter_behaviour_ellipse_get_angle_tilt
                                                            (ClutterBehaviourEllipse *self,
                                                             ClutterRotateAxis axis);

Gets the tilt of the ellipse around the center in the given axis.

`self` :

  a ClutterBehaviourEllipse

`axis` :

  a ClutterRotateAxis

Returns :

  angle in degrees.

Since 0.4

### clutter_behaviour_ellipse_set_height ()

    void                clutter_behaviour_ellipse_set_height
                                                            (ClutterBehaviourEllipse *self,
                                                             gint height);

Sets the height of the elliptical path.

`self` :

  a ClutterBehaviourEllipse

`height` :

  height of the ellipse

Since 0.4

### clutter_behaviour_ellipse_get_height ()

    gint                clutter_behaviour_ellipse_get_height
                                                            (ClutterBehaviourEllipse *self);

Gets the height of the elliptical path.

`self` :

  a ClutterBehaviourEllipse

Returns :

  the height of the path

Since 0.4

### clutter_behaviour_ellipse_set_width ()

    void                clutter_behaviour_ellipse_set_width (ClutterBehaviourEllipse *self,
                                                             gint width);

Sets the width of the elliptical path.

`self` :

  a ClutterBehaviourEllipse

`width` :

  width of the ellipse

Since 0.4

### clutter_behaviour_ellipse_get_width ()

    gint                clutter_behaviour_ellipse_get_width (ClutterBehaviourEllipse *self);

Gets the width of the elliptical path.

`self` :

  a ClutterBehaviourEllipse

Returns :

  the width of the path

Since 0.4

### clutter_behaviour_ellipse_set_tilt ()

    void                clutter_behaviour_ellipse_set_tilt  (ClutterBehaviourEllipse *self,
                                                             gdouble angle_tilt_x,
                                                             gdouble angle_tilt_y,
                                                             gdouble angle_tilt_z);

Sets the angles at which the ellipse should be tilted around it's center.

`self` :

  a ClutterBehaviourEllipse

`angle_tilt_x` :

  tilt of the elipse around the center in X axis in degrees.

`angle_tilt_y` :

  tilt of the elipse around the center in Y axis in degrees.

`angle_tilt_z` :

  tilt of the elipse around the center in Z axis in degrees.

Since 0.4

### clutter_behaviour_ellipse_get_tilt ()

    void                clutter_behaviour_ellipse_get_tilt  (ClutterBehaviourEllipse *self,
                                                             gdouble *angle_tilt_x,
                                                             gdouble *angle_tilt_y,
                                                             gdouble *angle_tilt_z);

Gets the tilt of the ellipse around the center in Y axis.

`self` :

  a ClutterBehaviourEllipse

`angle_tilt_x` :

  return location for tilt angle on the X axis, or `NULL`.

`angle_tilt_y` :

  return location for tilt angle on the Y axis, or `NULL`.

`angle_tilt_z` :

  return location for tilt angle on the Z axis, or `NULL`.

Since 0.4

### clutter_behaviour_ellipse_set_direction ()

    void                clutter_behaviour_ellipse_set_direction
                                                            (ClutterBehaviourEllipse *self,
                                                             ClutterRotateDirection direction);

Sets the rotation direction used by the ellipse behaviour.

`self` :

  a ClutterBehaviourEllipse

`direction` :

  the rotation direction

Since 0.4

### clutter_behaviour_ellipse_get_direction ()

    ClutterRotateDirection  clutter_behaviour_ellipse_get_direction
                                                            (ClutterBehaviourEllipse *self);

Retrieves the ClutterRotateDirection used by the ellipse behaviour.

`self` :

  a ClutterBehaviourEllipse

Returns :

  the rotation direction

Since 0.4

## Property Details

### The `"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

### The `"angle-start"` property

      "angle-start"              gdouble               : Read / Write

The initial angle from where the rotation should start.

Allowed values: [0,360]

Default value: 0

Since 0.4

### The `"angle-tilt-x"` property

      "angle-tilt-x"             gdouble               : Read / Write

The tilt angle for the rotation around center in X axis

Allowed values: [0,360]

Default value: 360

Since 0.4

### The `"angle-tilt-y"` property

      "angle-tilt-y"             gdouble               : Read / Write

The tilt angle for the rotation around center in Y axis

Allowed values: [0,360]

Default value: 360

Since 0.4

### The `"angle-tilt-z"` property

      "angle-tilt-z"             gdouble               : Read / Write

The tilt angle for the rotation on the Z axis

Allowed values: [0,360]

Default value: 360

Since 0.4

### The `"center"` property

      "center"                   ClutterKnot*          : Read / Write

The center of the ellipse.

Since 0.4

### The `"direction"` property

      "direction"                ClutterRotateDirection  : Read / Write

The direction of the rotation.

Default value: CLUTTER_ROTATE_CW

Since 0.4

### The `"height"` property

      "height"                   gint                  : Read / Write

Height of the ellipse, in pixels

Allowed values: >= 0

Default value: 50

Since 0.4

### The `"width"` property

      "width"                    gint                  : Read / Write

Width of the ellipse, in pixels

Allowed values: >= 0

Default value: 100

Since 0.4