Class: Clutter::BehaviourRotate

Inherits:
Behaviour show all
Defined in:
(unknown)

Overview

The Clutter::BehaviourRotateClass 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, axis, direction, angle_start, angle_end) ⇒ Clutter::Behaviour

Creates a new Clutter::BehaviourRotate. 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 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

  • axis (Clutter::RotateAxis)

    the rotation axis

  • direction (Clutter::RotateDirection)

    the rotation direction

  • angle_start (Float)

    the starting angle in degrees, between 0 and 360.

  • angle_end (Float)

    the final angle in degrees, 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 whence the rotation should start.

Returns:

  • (Float)

    angle-start

#angle_start=(angle_start) ⇒ Float

The initial angle from whence the rotation should start.

Parameters:

  • angle_start (Float)

Returns:

  • (Float)

    angle-start

  • (Float)

    angle-start

#axisClutter::RotateAxis

The axis of rotation.

Returns:

#axis=(axis) ⇒ Clutter::RotateAxis

The axis of rotation.

Parameters:

Returns:

#center_xInteger

The x center of rotation.

Returns:

  • (Integer)

    center-x

#center_x=(center_x) ⇒ Integer

The x center of rotation.

Parameters:

  • center_x (Integer)

Returns:

  • (Integer)

    center-x

  • (Integer)

    center-x

#center_yInteger

The y center of rotation.

Returns:

  • (Integer)

    center-y

#center_y=(center_y) ⇒ Integer

The y center of rotation.

Parameters:

  • center_y (Integer)

Returns:

  • (Integer)

    center-y

  • (Integer)

    center-y

#center_zInteger

The z center of rotation.

Returns:

  • (Integer)

    center-z

#center_z=(center_z) ⇒ Integer

The z center of rotation.

Parameters:

  • center_z (Integer)

Returns:

  • (Integer)

    center-z

  • (Integer)

    center-z

#directionClutter::RotateDirection

The direction of the rotation.

Returns:

#direction=(direction) ⇒ Clutter::RotateDirection

The direction of the rotation.

Parameters:

Returns:

#get_bounds(angle_start, angle_end) ⇒ nil

Retrieves the rotation boundaries of the rotate behaviour.

Parameters:

  • angle_start (Float)

    return value for the initial angle

  • angle_end (Float)

    return value for the final angle

Returns:

  • (nil)

#get_center(x, y, z) ⇒ nil

Retrieves the center of rotation set using clutter_behaviour_rotate_set_center().

Parameters:

  • x (Integer)

    return location for the X center of rotation

  • y (Integer)

    return location for the Y center of rotation

  • z (Integer)

    return location for the Z center of rotation

Returns:

  • (nil)

#set_bounds(angle_start, angle_end) ⇒ nil

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

Parameters:

  • angle_start (Float)

    initial angle in degrees, between 0 and 360.

  • angle_end (Float)

    final angle in degrees, between 0 and 360.

Returns:

  • (nil)

#set_center(x, y, z) ⇒ nil

Sets the center of rotation. The coordinates are relative to the plane normal to the rotation axis set with clutter_behaviour_rotate_set_axis().

Parameters:

  • x (Integer)

    X axis center of rotation

  • y (Integer)

    Y axis center of rotation

  • z (Integer)

    Z axis center of rotation

Returns:

  • (nil)