C# Класс 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.
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
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

Открытые методы

Метод Описание
BodyDef ( ) : Box2D.Common

Описание методов

BodyDef() публичный Метод

public BodyDef ( ) : Box2D.Common
Результат Box2D.Common

Описание свойств

Active публичное свойство

Does this body start out active?
public bool Active
Результат bool

AllowSleep публичное свойство

Set this flag to false if this body should never fall asleep. Note that this increases CPU usage.
public bool AllowSleep
Результат bool

Angle публичное свойство

The world angle of the body in radians.
public float Angle
Результат float

AngularDamping публичное свойство

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
Результат float

AngularVelocity публичное свойство

The angular velocity of the body.
public float AngularVelocity
Результат float

Awake публичное свойство

Is this body initially sleeping?
public bool Awake
Результат bool

Bullet публичное свойство

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
Результат bool

FixedRotation публичное свойство

Should this body be prevented from rotating? Useful for characters.
public bool FixedRotation
Результат bool

GravityScale публичное свойство

Experimental: scales the inertia tensor.
public float GravityScale
Результат float

LinearDamping публичное свойство

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
Результат float

LinearVelocity публичное свойство

The linear velocity of the body in world co-ordinates.
public Vec2,Box2D.Common LinearVelocity
Результат Box2D.Common.Vec2

Position публичное свойство

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
Результат Box2D.Common.Vec2

Type публичное свойство

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
Результат BodyType

UserData публичное свойство

Use this to store application specific body data.
public object UserData
Результат object