Files
glitchy-engine-beef/ScriptCore/Math/RotationAxisAngle.cs
T
2025-07-17 15:07:06 +02:00

33 lines
881 B
C#

using System.Runtime.InteropServices;
using GlitchyEngine.Core;
namespace GlitchyEngine.Math;
/// <summary>
/// Represents a rotation around an axis by a specific angle.
/// </summary>
[StructLayout(LayoutKind.Sequential, Pack=1)]
[EngineClass("GlitchyEngine.Scripting.ScriptGlue.AxisAngle")]
public struct RotationAxisAngle
{
/// <summary>
/// The axis around which the rotation is applied.
/// </summary>
public float3 Axis;
/// <summary>
/// The angle in radians around the <see cref="Axis"/>.
/// </summary>
public float Angle;
/// <summary>
/// Creates a new instance of an axis angle rotation.
/// </summary>
/// <param name="axis">The axis.</param>
/// <param name="angle">The angle in radians.</param>
public RotationAxisAngle(float3 axis, float angle)
{
Axis = axis;
Angle = angle;
}
}