Torque2D Reference

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Public Attributes | List of all members
b2FixtureDef Struct Reference

`#include <b2Fixture.h>`

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

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

## Detailed Description

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

## Constructor & Destructor Documentation

b2FixtureDef | ( |  | ) |
| inline

The constructor sets the default fixture definition values.

## Member Data Documentation

float32 density

The density, usually in kg/m^2.

b2Filter filter

Contact filtering data.

float32 friction

The friction coefficient, usually in the range [0,1].

bool isSensor

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

float32 restitution

The restitution (elasticity) usually in the range [0,1].

const b2Shape* shape

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

void* userData

Use this to store application specific fixture data.

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

- Box2D/Dynamics/b2Fixture.h