Files
glitchy-engine-beef/ScriptCore/Math/RotationAxisAngle.cs
T
Simon Lübeß 8ff35d3967 ScriptCore: Added more properties to components
- Added CircleRenderer
- Transform: Added Rotation, RotationEuler, RotationAxisAngle and Scale
- RigidBody: Added BodyType and GravityScale
- Added ColorRGBA
2024-01-27 19:46:37 +01:00

31 lines
793 B
C#

using System.Runtime.InteropServices;
namespace GlitchyEngine.Math;
/// <summary>
/// Represents a rotation around an axis by a specific angle.
/// </summary>
[StructLayout(LayoutKind.Sequential, Pack=1)]
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;
}
}