C# Класс Box2DX.Dynamics.BodyDef

A body definition holds all the data needed to construct a rigid body. You can safely re-use body definitions.
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
AllowSleep bool
Angle float
AngularDamping float
AngularVelocity float
FixedRotation bool
IsBullet bool
IsSleeping bool
LinearDamping float
LinearVelocity System.Vector2
MassData Box2DX.Collision.MassData
Position System.Vector2
UserData object

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

Метод Описание
BodyDef ( byte init ) : System

This constructor sets the body definition default values.

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

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

This constructor sets the body definition default values.
public BodyDef ( byte init ) : System
init byte
Результат System

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

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 публичное свойство

public float AngularVelocity
Результат float

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

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

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

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 static bodies. @warning You should use this flag sparingly since it increases processing time.
public bool IsBullet
Результат bool

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

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

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 публичное свойство

public Vector2,System LinearVelocity
Результат System.Vector2

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

You can use this to initialized the mass properties of the body. If you prefer, you can set the mass properties after the shapes have been added using Body.SetMassFromShapes.
public MassData,Box2DX.Collision MassData
Результат Box2DX.Collision.MassData

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

The world position of the body. Avoid creating bodies at the origin since this can lead to many overlapping shapes.
public Vector2,System Position
Результат System.Vector2

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

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