ExplosionDef class

The data needed to apply an explosion to a world.

Mirrors the native b2ExplosionDef type.

Constructors

ExplosionDef({required Vector2 position, required double radius, required double impulsePerLength, double falloff = 0, int maskBits = Filter.allCategories})
Creates an explosion definition centered on position.

Properties

falloff ↔ double
The distance beyond the radius over which the impulse falls off to zero.
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
impulsePerLength ↔ double
The impulse applied per unit length of shape surface, in kilogram-meters per second.
getter/setter pair
maskBits ↔ int
The categories of shapes affected by the explosion.
getter/setter pair
position ↔ Vector2
The center of the explosion in world coordinates.
getter/setter pair
radius ↔ double
The radius of the explosion.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited