HughPH.Box2D
Organised dotnet bindings for Box2D 3.1.0
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
Box2D.ExplosionDef Struct Reference

The explosion definition is used to configure options for explosions. Explosions consider shape geometry when computing the impulse. More...

Public Member Functions

 ExplosionDef ()
 Creates a new explosion definition with the default values.
 
 ExplosionDef (ulong maskBits, Vec2 position, float radius, float falloff, float impulsePerLength)
 Creates a new explosion definition with the specified values.
 

Public Attributes

ulong MaskBits
 Mask bits to filter shapes.
 
Vec2 Position
 The center of the explosion in world space.
 
float Radius
 The radius of the explosion.
 
float Falloff
 The falloff distance beyond the radius. Impulse is reduced to zero at this distance.
 
float ImpulsePerLength
 Impulse per unit length. This applies an impulse according to the shape perimeter that is facing the explosion. Explosions only apply to circles, capsules, and polygons. This may be negative for implosions.
 

Detailed Description

The explosion definition is used to configure options for explosions. Explosions consider shape geometry when computing the impulse.

Constructor & Destructor Documentation

◆ ExplosionDef()

Box2D.ExplosionDef.ExplosionDef ( ulong  maskBits,
Vec2  position,
float  radius,
float  falloff,
float  impulsePerLength 
)
inline

Creates a new explosion definition with the specified values.

Parameters
maskBitsMask bits to filter shapes
positionThe center of the explosion in world space
radiusThe radius of the explosion
falloffThe falloff distance beyond the radius. Impulse is reduced to zero at this distance.
impulsePerLengthImpulse per unit length. This applies an impulse according to the shape perimeter that is facing the explosion. Explosions only apply to circles, capsules, and polygons. This may be negative for implosions.

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