FixtureDef class
class FixtureDef { /** * The shape to use in the fixture. This must be set. */ Shape shape; /** * Use this to store application specific fixture data. */ Object userData; /** * The friction coefficient, usually in the range [0,1]. */ num friction; /** * The restitution (elasticity) usually in the range [0,1]. */ num restitution; /** * The density, usually in kg/m^2 */ num density; /** * A sensor shape collects contact information but never generates a collision * response. */ bool isSensor; /** * Contact filtering data; */ Filter filter; /** * Constructs a new FixtureDef with default values. */ FixtureDef() : shape = null, userData = null, friction = 0.2, restitution = 0, density = 0, filter = new Filter(), isSensor = false { // Setup the filter. filter.categoryBits = 0x0001; filter.maskBits = 0xFFFF; filter.groupIndex = 0; } }
Constructors
new FixtureDef() #
Constructs a new FixtureDef with default values.
FixtureDef() : shape = null, userData = null, friction = 0.2, restitution = 0, density = 0, filter = new Filter(), isSensor = false { // Setup the filter. filter.categoryBits = 0x0001; filter.maskBits = 0xFFFF; filter.groupIndex = 0; }
Properties
num density #
The density, usually in kg/m^2
num density
num friction #
The friction coefficient, usually in the range 0,1
.
num friction
bool isSensor #
A sensor shape collects contact information but never generates a collision response.
bool isSensor
num restitution #
The restitution (elasticity) usually in the range 0,1
.
num restitution
Object userData #
Use this to store application specific fixture data.
Object userData