C# Class Box2D.Dynamics.BodyDef

A body definition holds all the data needed to construct a rigid body. You can safely re-use body definitions. Shapes are added to a body after construction.
ファイルを表示 Open project: gerich-home/box2dnet Class Usage Examples

Public Properties

Property Type Description
Active bool
AllowSleep bool
Angle float
AngularDamping float
AngularVelocity float
Awake bool
Bullet bool
FixedRotation bool
GravityScale float
LinearDamping float
LinearVelocity Box2D.Common.Vec2
Position Box2D.Common.Vec2
Type BodyType
UserData object

Public Methods

Method Description
BodyDef ( ) : Box2D.Common

Method Details

BodyDef() public method

public BodyDef ( ) : Box2D.Common
return Box2D.Common

Property Details

Active public_oe property

Does this body start out active?
public bool Active
return bool

AllowSleep public_oe property

Set this flag to false if this body should never fall asleep. Note that this increases CPU usage.
public bool AllowSleep
return bool

Angle public_oe property

The world angle of the body in radians.
public float Angle
return float

AngularDamping public_oe property

Angular damping is use to reduce the angular velocity. The damping parameter can be larger than 1.0f but the damping effect becomes sensitive to the time step when the damping parameter is large.
public float AngularDamping
return float

AngularVelocity public_oe property

The angular velocity of the body.
public float AngularVelocity
return float

Awake public_oe property

Is this body initially sleeping?
public bool Awake
return bool

Bullet public_oe property

Is this a fast moving body that should be prevented from tunneling through other moving bodies? Note that all bodies are prevented from tunneling through kinematic and static bodies. This setting is only considered on dynamic bodies.
public bool Bullet
return bool

FixedRotation public_oe property

Should this body be prevented from rotating? Useful for characters.
public bool FixedRotation
return bool

GravityScale public_oe property

Experimental: scales the inertia tensor.
public float GravityScale
return float

LinearDamping public_oe property

Linear damping is use to reduce the linear velocity. The damping parameter can be larger than 1.0f but the damping effect becomes sensitive to the time step when the damping parameter is large.
public float LinearDamping
return float

LinearVelocity public_oe property

The linear velocity of the body in world co-ordinates.
public Vec2,Box2D.Common LinearVelocity
return Box2D.Common.Vec2

Position public_oe property

The world position of the body. Avoid creating bodies at the origin since this can lead to many overlapping shapes.
public Vec2,Box2D.Common Position
return Box2D.Common.Vec2

Type public_oe property

The body type: static, kinematic, or dynamic. Note: if a dynamic body would have zero mass, the mass is set to one.
public BodyType Type
return BodyType

UserData public_oe property

Use this to store application specific body data.
public object UserData
return object