//
// 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
{
///
///
/// C++:
/// Jolt/Geometry/Sphere.h:11
///
/// class Sphere
///
///
[InteropHandle]
public readonly partial struct Sphere : IDisposable
{
///
///
/// Constructor
///
///
/// C++:
/// Jolt/Geometry/Sphere.h:17
///
/// inline Sphere() = default
///
///
public static Sphere Create() => Jolt.PInvoke.Sphere_Create();
///
///
/// C++:
/// Jolt/Geometry/Sphere.h:18
///
/// inline Sphere(const Float3 &inCenter, float inRadius)
///
///
public static Sphere Create(float3 center, float radius) => Jolt.PInvoke.Sphere_Create_2(center, radius);
///
///
/// Calculate the support vector for this convex shape.
///
///
/// C++:
/// Jolt/Geometry/Sphere.h:22
///
/// inline Vec3 GetSupport(Vec3Arg inDirection) const
///
///
public float3 GetSupport(float3 direction) => Jolt.PInvoke.Sphere_GetSupport(this, direction);
///
///
/// Properties
///
///
/// C++:
/// Jolt/Geometry/Sphere.h:29
///
/// inline Vec3 GetCenter() const
///
///
public float3 GetCenter() => Jolt.PInvoke.Sphere_GetCenter(this);
///
///
/// C++:
/// Jolt/Geometry/Sphere.h:30
///
/// inline float GetRadius() const
///
///
public float GetRadius() => Jolt.PInvoke.Sphere_GetRadius(this);
///
///
/// Test if two spheres overlap
///
///
/// C++:
/// Jolt/Geometry/Sphere.h:33
///
/// inline bool Overlaps(const Sphere &inB) const
///
///
public bool Overlaps(Sphere b) => Jolt.PInvoke.Sphere_Overlaps(this, b);
///
///
/// Check if this sphere overlaps with a box
///
///
/// C++:
/// Jolt/Geometry/Sphere.h:39
///
/// inline bool Overlaps(const AABox &inOther) const
///
///
public bool Overlaps(in AABox other) => Jolt.PInvoke.Sphere_Overlaps_2(this, in other);
///
///
/// Create the minimal sphere that encapsulates this sphere and inPoint
///
///
/// C++:
/// Jolt/Geometry/Sphere.h:45
///
/// inline void EncapsulatePoint(Vec3Arg inPoint)
///
///
public void EncapsulatePoint(float3 point) => Jolt.PInvoke.Sphere_EncapsulatePoint(this, point);
public void Dispose() => Jolt.PInvoke.Sphere_Destroy(this);
}
}