| Package | com.boristhebrave.Box2DWith.Flint |
| Class | public class BodyInit |
| Inheritance | BodyInit org.flintparticles.common.initializers.InitializerBase |
If you wish to do further initialization, create a new initializer, and ensure it has lower default priority than BodyInitializer.
| Property | Defined by | ||
|---|---|---|---|
| bodyDef : b2BodyDef The body definition used to create bodies.
| BodyInit | ||
| scale : Number The scaling factor to use when initialzing body properties from particle properties.
| BodyInit | ||
| shapeDefs : Array An array of b2ShapeDef used to fill the body with shapes.
| BodyInit | ||
| world : b2World The world which bodies will be created for.
| BodyInit | ||
| Method | Defined by | ||
|---|---|---|---|
|
BodyInit(world:b2World, bodyDef:b2BodyDef, shapeDefs:Array, scale:Number)
Creates a new initializer, attached to the given world.
| BodyInit | ||
| bodyDef | property |
public var bodyDef:b2BodyDefThe body definition used to create bodies. SetMassFromShapes is always used to define the body mass.
| scale | property |
public var scale:NumberThe scaling factor to use when initialzing body properties from particle properties.
| shapeDefs | property |
public var shapeDefs:ArrayAn array of b2ShapeDef used to fill the body with shapes.
| world | property |
public var world:b2WorldThe world which bodies will be created for.
| BodyInit | () | constructor |
public function BodyInit(world:b2World, bodyDef:b2BodyDef, shapeDefs:Array, scale:Number)Creates a new initializer, attached to the given world.
Parametersworld:b2World — The world attached to.
|
|
bodyDef:b2BodyDef — The definition used to create bodies for each particle
|
|
shapeDefs:Array — An array of b2ShapeDef to create inside the body.
|
|
scale:Number — The scaling factor to use in pixels/unit for initializing the position and velocity of the body given the particle properties.
|