Box2D: b2FixtureDef Struct Reference

| Box2D 2.4.1 A 2D physics engine for games

Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
b2FixtureDef Struct Reference

`#include <b2_fixture.h>`

## Public Member Functions
| b2FixtureDef ()
| The constructor sets the default fixture definition values.

## Public Attributes
const b2Shape * | shape
b2FixtureUserData | userData
| Use this to store application specific fixture data.
float | friction
| The friction coefficient, usually in the range [0,1].
float | restitution
| The restitution (elasticity) usually in the range [0,1].
float | restitutionThreshold
float | density
| The density, usually in kg/m^2.
bool | isSensor
b2Filter | filter
| Contact filtering data.

## Detailed Description

A fixture definition is used to create a fixture. This class defines an abstract fixture definition. You can reuse fixture definitions safely.

## Member Data Documentation

## ◆ isSensor

bool b2FixtureDef::isSensor

A sensor shape collects contact information but never generates a collision response.

## ◆ restitutionThreshold

float b2FixtureDef::restitutionThreshold

Restitution velocity threshold, usually in m/s. Collisions above this speed have restitution applied (will bounce).

## ◆ shape

const b2Shape* b2FixtureDef::shape

The shape, this must be set. The shape will be cloned, so you can create the shape on the stack.

The documentation for this struct was generated from the following file:

- /build/box2d/src/box2d-2.4.1/include/box2d/b2_fixture.h