mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-26 13:08:24 +01:00
125 lines
5.5 KiB
C#
125 lines
5.5 KiB
C#
// <auto-generated/>
|
|
// Generated by Brutal.Jolt.Generate; do not edit by hand.
|
|
#nullable enable
|
|
|
|
using Brutal.Interop;
|
|
using Brutal.Numerics;
|
|
namespace Brutal.JoltApi
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/PhysicsMaterial.h#L22">Jolt/Physics/Collision/PhysicsMaterial.h:22</see>
|
|
/// <br/>
|
|
/// <c>class PhysicsMaterial : public SerializableObject, public RefTarget<PhysicsMaterial></c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// This structure describes the surface of (part of) a shape. You should inherit from it to define additional
|
|
/// information that is interesting for the simulation. The 2 materials involved in a contact could be used
|
|
/// to decide which sound or particle effects to play.
|
|
///
|
|
/// If you inherit from this material, don't forget to create a suitable default material in sDefault
|
|
/// </code>
|
|
/// </remarks>
|
|
[InteropHandle]
|
|
public readonly partial struct PhysicsMaterial : IDisposable
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/PhysicsMaterial.h#L28">Jolt/Physics/Collision/PhysicsMaterial.h:28</see>
|
|
/// <br/>
|
|
/// <c>PhysicsMaterial() = default</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Constructor
|
|
/// </para>
|
|
/// </remarks>
|
|
public static PhysicsMaterial Create() => Jolt.PInvoke.PhysicsMaterial_Create();
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/PhysicsMaterial.h#L24">Jolt/Physics/Collision/PhysicsMaterial.h:24</see>
|
|
/// <br/>
|
|
/// <c></c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// The returned handle is borrowed from its owner; don't Dispose it.
|
|
/// </para>
|
|
/// </remarks>
|
|
public RTTI GetRTTI() => Jolt.PInvoke.PhysicsMaterial_GetRTTI(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/PhysicsMaterial.h#L24">Jolt/Physics/Collision/PhysicsMaterial.h:24</see>
|
|
/// <br/>
|
|
/// <c></c>
|
|
/// </para>
|
|
/// </summary>
|
|
public unsafe Ptr CastTo(RTTI rTTI) => Jolt.PInvoke.PhysicsMaterial_CastTo(this, rTTI);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/PhysicsMaterial.h#L35">Jolt/Physics/Collision/PhysicsMaterial.h:35</see>
|
|
/// <br/>
|
|
/// <c>virtual const char * GetDebugName() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Properties
|
|
/// </para>
|
|
/// </remarks>
|
|
public unsafe RefString8 GetDebugName() => (Ptr<byte>)Jolt.PInvoke.PhysicsMaterial_GetDebugName(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/PhysicsMaterial.h#L39">Jolt/Physics/Collision/PhysicsMaterial.h:39</see>
|
|
/// <br/>
|
|
/// <c>virtual void SaveBinaryState(StreamOut &inStream) const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Saves the contents of the material in binary form to inStream.
|
|
/// </para>
|
|
/// </remarks>
|
|
public void SaveBinaryState(StreamOut stream) => Jolt.PInvoke.PhysicsMaterial_SaveBinaryState(this, stream);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/PhysicsMaterial.h#L44">Jolt/Physics/Collision/PhysicsMaterial.h:44</see>
|
|
/// <br/>
|
|
/// <c>static PhysicsMaterialResult sRestoreFromBinaryState(StreamIn &inStream)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Creates a PhysicsMaterial of the correct type and restores its contents from the binary stream inStream.
|
|
/// </para>
|
|
/// <para>
|
|
/// Throws InvalidOperationException with Jolt's error message when the operation fails.
|
|
/// </para>
|
|
/// </remarks>
|
|
public static PhysicsMaterial sRestoreFromBinaryState(StreamIn stream)
|
|
{
|
|
var _handle = Jolt.PInvoke.PhysicsMaterial_sRestoreFromBinaryState(stream);
|
|
if (_handle.IsNull()) throw new InvalidOperationException(Jolt.GetLastError());
|
|
return _handle;
|
|
}
|
|
public void AddRef() => Jolt.PInvoke.PhysicsMaterial_AddRef(this);
|
|
public void Release() => Jolt.PInvoke.PhysicsMaterial_Release(this);
|
|
public uint GetRefCount() => Jolt.PInvoke.PhysicsMaterial_GetRefCount(this);
|
|
public void Dispose()
|
|
{
|
|
if (IsNull()) return;
|
|
Release();
|
|
}
|
|
}
|
|
}
|