//
// Generated by Brutal.Jolt.Generate; do not edit by hand.
#nullable enable
using System.Runtime.CompilerServices;
using Brutal.Interop;
using Brutal.Numerics;
namespace Brutal.JoltApi
{
///
///
/// Oriented box
///
///
/// C++:
/// Jolt/Geometry/OrientedBox.h:17
///
/// class JPH_EXPORT_GCC_BUG_WORKAROUND OrientedBox
///
///
[InteropHandle]
public readonly partial struct OrientedBox : IDisposable
{
///
///
/// Constructor
///
///
/// C++:
/// Jolt/Geometry/OrientedBox.h:23
///
/// OrientedBox() = default
///
///
public static OrientedBox Create() => Jolt.PInvoke.OrientedBox_Create();
///
///
/// C++:
/// Jolt/Geometry/OrientedBox.h:24
///
/// OrientedBox(Mat44Arg inOrientation, Vec3Arg inHalfExtents)
///
///
public static OrientedBox Create(in float4x4 orientation, float3 halfExtents) =>
Jolt.PInvoke.OrientedBox_Create_2(in orientation, halfExtents);
///
///
/// Construct from axis aligned box and transform. Only works for rotation/translation matrix (no scaling /
/// shearing).
///
///
/// C++:
/// Jolt/Geometry/OrientedBox.h:27
///
/// OrientedBox(Mat44Arg inOrientation, const AABox &inBox)
///
///
public static OrientedBox Create(in float4x4 orientation, in AABox box) =>
Jolt.PInvoke.OrientedBox_Create_3(in orientation, in box);
///
///
/// Test if oriented box overlaps with axis aligned box each other
///
///
/// C++:
/// Jolt/Geometry/OrientedBox.h:30
///
/// bool Overlaps(const AABox &inBox, float inEpsilon = 1.0e-6f) const
///
///
public bool Overlaps(in AABox box, float epsilon = 1E-06f) =>
Jolt.PInvoke.OrientedBox_Overlaps(this, in box, epsilon);
///
///
/// Test if two oriented boxes overlap each other
///
///
/// C++:
/// Jolt/Geometry/OrientedBox.h:33
///
/// bool Overlaps(const OrientedBox &inBox, float inEpsilon = 1.0e-6f) const
///
///
public bool Overlaps(OrientedBox box, float epsilon = 1E-06f) =>
Jolt.PInvoke.OrientedBox_Overlaps_2(this, box, epsilon);
///
///
/// Transform that positions and rotates the local space axis aligned box into world space
///
///
/// C++:
/// Jolt/Geometry/OrientedBox.h:35
///
/// Mat44 mOrientation
///
///
public float4x4 GetOrientation() => Jolt.PInvoke.OrientedBox_GetOrientation(this);
///
///
/// Transform that positions and rotates the local space axis aligned box into world space
///
///
/// C++:
/// Jolt/Geometry/OrientedBox.h:35
///
/// Mat44 mOrientation
///
///
public void SetOrientation(in float4x4 value) => Jolt.PInvoke.OrientedBox_SetOrientation(this, in value);
///
///
/// Half extents (half the size of the edge) of the local space axis aligned box
///
///
/// C++:
/// Jolt/Geometry/OrientedBox.h:36
///
/// Vec3 mHalfExtents
///
///
public float3 GetHalfExtents() => Jolt.PInvoke.OrientedBox_GetHalfExtents(this);
///
///
/// Half extents (half the size of the edge) of the local space axis aligned box
///
///
/// C++:
/// Jolt/Geometry/OrientedBox.h:36
///
/// Vec3 mHalfExtents
///
///
public void SetHalfExtents(float3 value) => Jolt.PInvoke.OrientedBox_SetHalfExtents(this, value);
public void Dispose() => Jolt.PInvoke.OrientedBox_Destroy(this);
}
}