Class: Clutter::BehaviourEllipse

Inherits:
Behaviour show all
Defined in:
(unknown)

Overview

The Clutter::BehaviourEllipseClass struct contains only private data

Instance Method Summary collapse

Methods inherited from Behaviour

#actors, #actors_foreach, #alpha, #alpha=, #apply, #get_nth_actor, #is_applied, #n_actors, #remove, #remove_all

Constructor Details

#initialize(alpha, x, y, width, height, direction, start, end) ⇒ Clutter::Behaviour

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.

If alpha is not nil, the Clutter::Behaviour will take ownership of the Clutter::Alpha instance. In the case when alpha is nil, it can be set later with clutter_behaviour_set_alpha().

Parameters:

  • alpha (Clutter::Alpha)

    a Clutter::Alpha instance, or nil

  • x (Integer)

    x coordinace of the center

  • y (Integer)

    y coordiance of the center

  • width (Integer)

    width of the ellipse

  • height (Integer)

    height of the ellipse

  • direction (Clutter::RotateDirection)

    Clutter::RotateDirection of rotation

  • start (Float)

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

  • end (Float)

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

Instance Method Details

#angle_endFloat

The final angle to where the rotation should end.

Returns:

  • (Float)

    angle-end

#angle_end=(angle_end) ⇒ Float

The final angle to where the rotation should end.

Parameters:

  • angle_end (Float)

Returns:

  • (Float)

    angle-end

  • (Float)

    angle-end

#angle_startFloat

The initial angle from where the rotation should start.

Returns:

  • (Float)

    angle-start

#angle_start=(angle_start) ⇒ Float

The initial angle from where the rotation should start.

Parameters:

  • angle_start (Float)

Returns:

  • (Float)

    angle-start

  • (Float)

    angle-start

#angle_tilt_xFloat

The tilt angle for the rotation around center in X axis

Returns:

  • (Float)

    angle-tilt-x

#angle_tilt_x=(angle_tilt_x) ⇒ Float

The tilt angle for the rotation around center in X axis

Parameters:

  • angle_tilt_x (Float)

Returns:

  • (Float)

    angle-tilt-x

  • (Float)

    angle-tilt-x

#angle_tilt_yFloat

The tilt angle for the rotation around center in Y axis

Returns:

  • (Float)

    angle-tilt-y

#angle_tilt_y=(angle_tilt_y) ⇒ Float

The tilt angle for the rotation around center in Y axis

Parameters:

  • angle_tilt_y (Float)

Returns:

  • (Float)

    angle-tilt-y

  • (Float)

    angle-tilt-y

#angle_tilt_zFloat

The tilt angle for the rotation on the Z axis

Returns:

  • (Float)

    angle-tilt-z

#angle_tilt_z=(angle_tilt_z) ⇒ Float

The tilt angle for the rotation on the Z axis

Parameters:

  • angle_tilt_z (Float)

Returns:

  • (Float)

    angle-tilt-z

  • (Float)

    angle-tilt-z

#centerClutter::Knot

The center of the ellipse.

Returns:

  • (Clutter::Knot)

    center

#center=(center) ⇒ Clutter::Knot

The center of the ellipse.

Parameters:

  • center (Clutter::Knot)

Returns:

  • (Clutter::Knot)

    center

  • (Clutter::Knot)

    center

#directionClutter::RotateDirection

The direction of the rotation.

Returns:

#direction=(direction) ⇒ Clutter::RotateDirection

The direction of the rotation.

Parameters:

Returns:

#get_angle_tilt(axis) ⇒ Float

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

Parameters:

Returns:

  • (Float)

    angle in degrees.

#get_center(x, y) ⇒ nil

Gets the center of the elliptical path path.

Parameters:

  • x (Integer)

    return location for the X coordinate of the center, or nil

  • y (Integer)

    return location for the Y coordinate of the center, or nil

Returns:

  • (nil)

#get_tilt(angle_tilt_x, angle_tilt_y, angle_tilt_z) ⇒ nil

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

Parameters:

  • angle_tilt_x (Float)

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

  • angle_tilt_y (Float)

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

  • angle_tilt_z (Float)

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

Returns:

  • (nil)

#heightInteger

Height of the ellipse, in pixels

Returns:

  • (Integer)

    height

#height=(height) ⇒ Integer

Height of the ellipse, in pixels

Parameters:

  • height (Integer)

Returns:

  • (Integer)

    height

  • (Integer)

    height

#set_angle_tilt(axis, angle_tilt) ⇒ nil

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

Parameters:

  • axis (Clutter::RotateAxis)

    a Clutter::RotateAxis

  • angle_tilt (Float)

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

Returns:

  • (nil)

#set_center(x, y) ⇒ nil

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

Parameters:

  • x (Integer)

    x coordinace of centre

  • y (Integer)

    y coordinace of centre

Returns:

  • (nil)

#set_tilt(angle_tilt_x, angle_tilt_y, angle_tilt_z) ⇒ nil

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

Parameters:

  • angle_tilt_x (Float)

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

  • angle_tilt_y (Float)

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

  • angle_tilt_z (Float)

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

Returns:

  • (nil)

#widthInteger

Width of the ellipse, in pixels

Returns:

  • (Integer)

    width

#width=(width) ⇒ Integer

Width of the ellipse, in pixels

Parameters:

  • width (Integer)

Returns:

  • (Integer)

    width

  • (Integer)

    width