mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
91 lines
3.6 KiB
C#
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 &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);
|
|
}
|
|
}
|