ClutterBox2D

## ClutterBox2D ClutterBox2D — Container with physics engine |

## Synopsis

    enum                ClutterBox2DType;
                        ClutterBox2D;
                        ClutterBox2DClass;
    ClutterActor *      clutter_box2d_new                   (void);
    void                clutter_box2d_set_simulating        (ClutterBox2D *box2d,
                                                             gboolean simulating);
    gboolean            clutter_box2d_get_simulating        (ClutterBox2D *box2d);

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----ClutterActor
                   +----ClutterGroup
                         +----ClutterBox2D

## Implemented Interfaces

ClutterBox2D implements ClutterScriptable and ClutterContainer.

## Properties

      "gravity"                  ClutterVertex*        : Write
      "simulating"               gboolean              : Read / Write

## Description

ClutterBox2D is a container that can physically simulate collisions between dynamic and static actors.

## Details

### enum ClutterBox2DType

    typedef enum {
      CLUTTER_BOX2D_NONE = 0,
      CLUTTER_BOX2D_DYNAMIC,
      CLUTTER_BOX2D_STATIC,
    } ClutterBox2DType;

Type of interactions between bodies.

`CLUTTER_BOX2D_NONE` | No interaction
`CLUTTER_BOX2D_DYNAMIC` | The actor is affected by collisions
`CLUTTER_BOX2D_STATIC` | The actor affects collisions but is immobile

### ClutterBox2D

    typedef struct _ClutterBox2D ClutterBox2D;

The ClutterBox2D physics container, the struct has no public fields.

### ClutterBox2DClass

    typedef struct {
    } ClutterBox2DClass;

### clutter_box2d_new ()

    ClutterActor *      clutter_box2d_new                   (void);

Create a new ClutterBox2D container.

Returns : | a new ClutterBox2D container.

### clutter_box2d_set_simulating ()

    void                clutter_box2d_set_simulating        (ClutterBox2D *box2d,
                                                             gboolean simulating);

Sets whether the simulation engine of `box2d` is running or not, the value defaults to TRUE.

`box2d` : | a ClutterBox2D
`simulating` : | the new state, TRUE or FALSE

### clutter_box2d_get_simulating ()

    gboolean            clutter_box2d_get_simulating        (ClutterBox2D *box2d);

Checks whether `box2d` is simulating or not. the simulation engine to be running when the group is created.

`box2d` : | a ClutterBox2D
Returns : | whether the ClutterBox2D group is currently doing physical simulation.

## Property Details

### The `"gravity"` property

      "gravity"                  ClutterVertex*        : Write

The 2D vector specifying the gravity direction and magnitude, pass in 0.0, 0.0 for zero gravity.

### The `"simulating"` property

      "simulating"               gboolean              : Read / Write

Whether the physics simulation engine is running or not.

Default value: TRUE