mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-28 14:08:25 +01:00
first
This commit is contained in:
parent
bd62d51ec9
commit
b578433e37
1 changed files with 784842 additions and 0 deletions
241
Brutal.Jolt/Generated/Classes/ConvexHullShapeSettings.gen.cs
Normal file
241
Brutal.Jolt/Generated/Classes/ConvexHullShapeSettings.gen.cs
Normal file
|
|
@ -0,0 +1,241 @@
|
|||
// <auto-generated/>
|
||||
// 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
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Class that constructs a ConvexHullShape
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/Shape/ConvexHullShape.h#L17">Jolt/Physics/Collision/Shape/ConvexHullShape.h:17</see>
|
||||
/// <br/>
|
||||
/// <c>class ConvexHullShapeSettings final : public ConvexShapeSettings</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
[InteropHandle]
|
||||
public readonly partial struct ConvexHullShapeSettings : IDisposable
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/Shape/ConvexHullShape.h#L28">Jolt/Physics/Collision/Shape/ConvexHullShape.h:28</see>
|
||||
/// <br/>
|
||||
/// <c>explicit ConvexHullShapeSettings(const Array<Vec3> &inPoints, float inConvexRadius = cDefaultConvexRadius, const PhysicsMaterial *inMaterial = nullptr)</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// points is copied into a native container for the call; the span is only read.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public static unsafe ConvexHullShapeSettings Create(
|
||||
ReadOnlySpan<float3> points,
|
||||
float convexRadius = 0.05f,
|
||||
PhysicsMaterial material = default
|
||||
)
|
||||
{
|
||||
fixed (float3* points_fixed = points)
|
||||
{
|
||||
return Jolt.PInvoke.ConvexHullShapeSettings_Create(
|
||||
points_fixed,
|
||||
(nuint)points.Length,
|
||||
convexRadius,
|
||||
material
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Default constructor for deserialization
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/Shape/ConvexHullShape.h#L23">Jolt/Physics/Collision/Shape/ConvexHullShape.h:23</see>
|
||||
/// <br/>
|
||||
/// <c>ConvexHullShapeSettings() = default</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public static ConvexHullShapeSettings Create() => Jolt.PInvoke.ConvexHullShapeSettings_Create_2();
|
||||
|
||||
/// <inheritdoc cref="ShapeSettings.GetRTTI()"/>
|
||||
public RTTI GetRTTI() => ((ShapeSettings)this).GetRTTI();
|
||||
|
||||
/// <inheritdoc cref="ShapeSettings.CastTo(RTTI)"/>
|
||||
public unsafe Ptr CastTo(RTTI rtti) => ((ShapeSettings)this).CastTo(rtti);
|
||||
|
||||
/// <inheritdoc cref="ShapeSettings.CreateShape()"/>
|
||||
public Shape CreateShape() => ((ShapeSettings)this).CreateShape();
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Points to create the hull from. Note that these points don't need to be the vertices of the convex hull,
|
||||
/// they can contain interior points or points on faces/edges.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/Shape/ConvexHullShape.h#L33">Jolt/Physics/Collision/Shape/ConvexHullShape.h:33</see>
|
||||
/// <br/>
|
||||
/// <c>Array<Vec3> mPoints</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Returns an owned native buffer - read it through AsSpan() and Dispose it when you are done with it.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public NativeArray<float3> GetPoints() =>
|
||||
new NativeArray<float3>(Jolt.PInvoke.ConvexHullShapeSettings_GetPoints(this));
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Points to create the hull from. Note that these points don't need to be the vertices of the convex hull,
|
||||
/// they can contain interior points or points on faces/edges.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/Shape/ConvexHullShape.h#L33">Jolt/Physics/Collision/Shape/ConvexHullShape.h:33</see>
|
||||
/// <br/>
|
||||
/// <c>Array<Vec3> mPoints</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public unsafe void SetPoints(ReadOnlySpan<float3> value)
|
||||
{
|
||||
fixed (float3* value_fixed = value)
|
||||
{
|
||||
Jolt.PInvoke.ConvexHullShapeSettings_SetPoints(this, value_fixed, (nuint)value.Length);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Convex radius as supplied by the constructor. Note that during hull creation the convex radius can be
|
||||
/// made smaller if the value is too big for the hull.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/Shape/ConvexHullShape.h#L34">Jolt/Physics/Collision/Shape/ConvexHullShape.h:34</see>
|
||||
/// <br/>
|
||||
/// <c>float mMaxConvexRadius = 0.0f</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public float GetMaxConvexRadius() => Jolt.PInvoke.ConvexHullShapeSettings_GetMaxConvexRadius(this);
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Convex radius as supplied by the constructor. Note that during hull creation the convex radius can be
|
||||
/// made smaller if the value is too big for the hull.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/Shape/ConvexHullShape.h#L34">Jolt/Physics/Collision/Shape/ConvexHullShape.h:34</see>
|
||||
/// <br/>
|
||||
/// <c>float mMaxConvexRadius = 0.0f</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public void SetMaxConvexRadius(float value) =>
|
||||
Jolt.PInvoke.ConvexHullShapeSettings_SetMaxConvexRadius(this, value);
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Maximum distance between the shrunk hull + convex radius and the actual hull.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/Shape/ConvexHullShape.h#L35">Jolt/Physics/Collision/Shape/ConvexHullShape.h:35</see>
|
||||
/// <br/>
|
||||
/// <c>float mMaxErrorConvexRadius = 0.05f</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public float GetMaxErrorConvexRadius() => Jolt.PInvoke.ConvexHullShapeSettings_GetMaxErrorConvexRadius(this);
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Maximum distance between the shrunk hull + convex radius and the actual hull.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/Shape/ConvexHullShape.h#L35">Jolt/Physics/Collision/Shape/ConvexHullShape.h:35</see>
|
||||
/// <br/>
|
||||
/// <c>float mMaxErrorConvexRadius = 0.05f</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public void SetMaxErrorConvexRadius(float value) =>
|
||||
Jolt.PInvoke.ConvexHullShapeSettings_SetMaxErrorConvexRadius(this, value);
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Points are allowed this far outside of the hull (increasing this yields a hull with less vertices). Note
|
||||
/// that the actual used value can be larger if the points of the hull are far apart.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/Shape/ConvexHullShape.h#L36">Jolt/Physics/Collision/Shape/ConvexHullShape.h:36</see>
|
||||
/// <br/>
|
||||
/// <c>float mHullTolerance = 1.0e-3f</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public float GetHullTolerance() => Jolt.PInvoke.ConvexHullShapeSettings_GetHullTolerance(this);
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Points are allowed this far outside of the hull (increasing this yields a hull with less vertices). Note
|
||||
/// that the actual used value can be larger if the points of the hull are far apart.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/Shape/ConvexHullShape.h#L36">Jolt/Physics/Collision/Shape/ConvexHullShape.h:36</see>
|
||||
/// <br/>
|
||||
/// <c>float mHullTolerance = 1.0e-3f</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public void SetHullTolerance(float value) => Jolt.PInvoke.ConvexHullShapeSettings_SetHullTolerance(this, value);
|
||||
|
||||
public void AddRef() => ((ShapeSettings)this).AddRef();
|
||||
|
||||
public void Release() => ((ShapeSettings)this).Release();
|
||||
|
||||
public uint GetRefCount() => ((ShapeSettings)this).GetRefCount();
|
||||
|
||||
public static implicit operator ConvexShapeSettings(ConvexHullShapeSettings value) =>
|
||||
Unsafe.BitCast<ConvexHullShapeSettings, ConvexShapeSettings>(value);
|
||||
|
||||
public static implicit operator ShapeSettings(ConvexHullShapeSettings value) =>
|
||||
Unsafe.BitCast<ConvexHullShapeSettings, ShapeSettings>(value);
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
if (IsNull())
|
||||
return;
|
||||
Release();
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="ConvexShapeSettings.SetDensity(float)"/>
|
||||
public void SetDensity(float density) => ((ConvexShapeSettings)this).SetDensity(density);
|
||||
|
||||
/// <inheritdoc cref="ConvexShapeSettings.GetMaterial()"/>
|
||||
public PhysicsMaterial GetMaterial() => ((ConvexShapeSettings)this).GetMaterial();
|
||||
|
||||
/// <inheritdoc cref="ConvexShapeSettings.SetMaterial(PhysicsMaterial)"/>
|
||||
public void SetMaterial(PhysicsMaterial value) => ((ConvexShapeSettings)this).SetMaterial(value);
|
||||
|
||||
/// <inheritdoc cref="ConvexShapeSettings.GetDensity()"/>
|
||||
public float GetDensity() => ((ConvexShapeSettings)this).GetDensity();
|
||||
|
||||
/// <inheritdoc cref="ShapeSettings.ClearCachedResult()"/>
|
||||
public void ClearCachedResult() => ((ShapeSettings)this).ClearCachedResult();
|
||||
|
||||
/// <inheritdoc cref="ShapeSettings.GetUserData()"/>
|
||||
public ulong GetUserData() => ((ShapeSettings)this).GetUserData();
|
||||
|
||||
/// <inheritdoc cref="ShapeSettings.SetUserData(ulong)"/>
|
||||
public void SetUserData(ulong value) => ((ShapeSettings)this).SetUserData(value);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue