/
EugenyCh7
/
Puppet2D.Net
Обзор
Документация
Войти
/
EugenyCh7
/
Puppet2D.Net
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
Puppet2D.Engine/Common/CastOutput.cs
56 строк
1 KB
EugenyCh7
Puppet2D.Engine.Common fix
24 авг 2025, 20:48
24 авг 2025, 20:48
6ed4095
Код
Авторство
О чём код?
using Puppet2D.System; namespace Puppet2D.Engine.Common { /// <summary> /// Low level ray cast or shape-cast output data. /// </summary> public struct CastOutput { /// <summary> /// The fraction of the input translation at collision. /// </summary> public float Fraction { get; } /// <summary> /// Did the cast hit? /// </summary> public bool Hit { get; } /// <summary> /// The number of iterations used. /// </summary> public int Iterations { get; } /// <summary> /// The surface normal at the hit point. /// </summary> public Vector2 Normal { get; } /// <summary> /// The surface hit point. /// </summary> public Vector2 Point { get; } internal CastOutput(B2.CastOutput castOutput) { Fraction = castOutput.fraction; Hit = castOutput.hit; Iterations = castOutput.iterations; Normal = castOutput.normal; Point = castOutput.point; } internal B2.CastOutput Cast() { return new B2.CastOutput { fraction = Fraction, hit = Hit, iterations = Iterations, normal = Normal, point = Point }; } } }