/
EugenyCh7
/
Puppet2D.Net
Обзор
Документация
Войти
/
EugenyCh7
/
Puppet2D.Net
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
Puppet2D.Engine/Components/Colliders/MassData.cs
42 строки
1 KB
EugenyCh7
- Puppet2D.Common.csproj
24 авг 2025, 13:32
24 авг 2025, 13:32
bcb1204
Код
Авторство
О чём код?
using Puppet2D.System; namespace Puppet2D.Engine.Components.Colliders { /// <summary> /// This holds the mass data computed for a shape. /// </summary> public class MassData { /// <summary> /// The position of the shape's centroid relative to the shape's origin. /// </summary> public Vector2 Center { get; } /// <summary> /// The mass of the shape, usually in kilograms. /// </summary> public float Mass { get; } /// <summary> /// The rotational inertia of the shape about the local origin. /// </summary> public float RotationalInertia { get; } internal MassData(B2.MassData massData) { Mass = massData.mass; Center = massData.center; RotationalInertia = massData.rotationalInertia; } internal B2.MassData Cast() { return new B2.MassData { mass = Mass, center = Center, rotationalInertia = RotationalInertia }; } } }