brutal/Brutal.Jolt/Generated/Classes/PhysicsMaterialSimple.gen.cs
Rian Drake b578433e37 first
2026-10-15 17:10:50 +13:00

91 lines
3.6 KiB
C#

// <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>
/// Sample implementation of PhysicsMaterial that just holds the needed properties directly
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/PhysicsMaterialSimple.h#L12">Jolt/Physics/Collision/PhysicsMaterialSimple.h:12</see>
/// <br/>
/// <c>class PhysicsMaterialSimple : public PhysicsMaterial</c>
/// </para>
/// </summary>
[InteropHandle]
public readonly partial struct PhysicsMaterialSimple : IDisposable
{
/// <summary>
/// <para>
/// Constructor
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/PhysicsMaterialSimple.h#L18">Jolt/Physics/Collision/PhysicsMaterialSimple.h:18</see>
/// <br/>
/// <c>PhysicsMaterialSimple() = default</c>
/// </para>
/// </summary>
public static PhysicsMaterialSimple Create() => Jolt.PInvoke.PhysicsMaterialSimple_Create();
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/PhysicsMaterialSimple.h#L19">Jolt/Physics/Collision/PhysicsMaterialSimple.h:19</see>
/// <br/>
/// <c>PhysicsMaterialSimple(const string_view &amp;inName, ColorArg inColor)</c>
/// </para>
/// </summary>
public static unsafe PhysicsMaterialSimple Create(RefString8 name, uint color)
{
fixed (byte* name_fixed = name)
{
return Jolt.PInvoke.PhysicsMaterialSimple_Create_2(name_fixed, color);
}
}
/// <inheritdoc cref="PhysicsMaterial.GetRTTI()"/>
public RTTI GetRTTI() => ((PhysicsMaterial)this).GetRTTI();
/// <inheritdoc cref="PhysicsMaterial.CastTo(RTTI)"/>
public unsafe Ptr CastTo(RTTI rtti) => ((PhysicsMaterial)this).CastTo(rtti);
/// <inheritdoc cref="PhysicsMaterial.GetDebugName()"/>
public unsafe RefString8 GetDebugName() => ((PhysicsMaterial)this).GetDebugName();
/// <inheritdoc cref="PhysicsMaterial.GetDebugColor()"/>
public uint GetDebugColor() => ((PhysicsMaterial)this).GetDebugColor();
/// <inheritdoc cref="PhysicsMaterial.SaveBinaryState(StreamOut)"/>
public void SaveBinaryState(StreamOut stream) => ((PhysicsMaterial)this).SaveBinaryState(stream);
public void AddRef() => ((PhysicsMaterial)this).AddRef();
public void Release() => ((PhysicsMaterial)this).Release();
public uint GetRefCount() => ((PhysicsMaterial)this).GetRefCount();
public static implicit operator PhysicsMaterial(PhysicsMaterialSimple value) =>
Unsafe.BitCast<PhysicsMaterialSimple, PhysicsMaterial>(value);
public void Dispose()
{
if (IsNull())
return;
Release();
}
/// <inheritdoc cref="PhysicsMaterial.SaveObjectStream(Span{byte}, ObjectStreamType)"/>
public unsafe ByteSize SaveObjectStream(
Span<byte> buffer,
ObjectStreamType streamType = ObjectStreamType.Text
) => ((PhysicsMaterial)this).SaveObjectStream(buffer, streamType);
}
}