mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-26 04:58:24 +01:00
127 lines
5.6 KiB
C#
127 lines
5.6 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/Shape/Shape.h#L146">Jolt/Physics/Collision/Shape/Shape.h:146</see>
|
|
/// <br/>
|
|
/// <c>class ShapeSettings : public SerializableObject, public RefTarget<ShapeSettings></c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Class that can construct shapes and that is serializable using the ObjectStream system.
|
|
/// Can be used to store shape data in 'uncooked' form (i.e. in a form that is still human readable and authorable).
|
|
/// Once the shape has been created using the Create() function, the data will be moved into the Shape class
|
|
/// in a form that is optimized for collision detection. After this, the ShapeSettings object is no longer needed
|
|
/// and can be destroyed. Each shape class has a derived class of the ShapeSettings object to store shape specific
|
|
/// data.
|
|
/// </code>
|
|
/// </remarks>
|
|
[InteropHandle]
|
|
public readonly partial struct ShapeSettings : IDisposable
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/Shape.h#L148">Jolt/Physics/Collision/Shape/Shape.h:148</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.ShapeSettings_GetRTTI(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/Shape.h#L148">Jolt/Physics/Collision/Shape/Shape.h:148</see>
|
|
/// <br/>
|
|
/// <c></c>
|
|
/// </para>
|
|
/// </summary>
|
|
public unsafe Ptr CastTo(RTTI rTTI) => Jolt.PInvoke.ShapeSettings_CastTo(this, rTTI);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/Shape.h#L154">Jolt/Physics/Collision/Shape/Shape.h:154</see>
|
|
/// <br/>
|
|
/// <c>virtual ShapeResult Create() const = 0</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Create a shape according to the settings specified by this object.
|
|
/// </para>
|
|
/// <para>
|
|
/// Throws InvalidOperationException with Jolt's error message when the operation fails.
|
|
/// </para>
|
|
/// </remarks>
|
|
public Shape CreateShape()
|
|
{
|
|
var _handle = Jolt.PInvoke.ShapeSettings_CreateShape(this);
|
|
if (_handle.IsNull()) throw new InvalidOperationException(Jolt.GetLastError());
|
|
return _handle;
|
|
}
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/Shape.h#L158">Jolt/Physics/Collision/Shape/Shape.h:158</see>
|
|
/// <br/>
|
|
/// <c>void ClearCachedResult()</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// When creating a shape, the result is cached so that calling Create() again will return the same shape.
|
|
/// If you make changes to the ShapeSettings you need to call this function to clear the cached result to allow Create() to build a new shape.
|
|
/// </code>
|
|
/// </remarks>
|
|
public void ClearCachedResult() => Jolt.PInvoke.ShapeSettings_ClearCachedResult(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/Shape.h#L161">Jolt/Physics/Collision/Shape/Shape.h:161</see>
|
|
/// <br/>
|
|
/// <c>uint64 mUserData = 0</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// User data (to be used freely by the application)
|
|
/// </para>
|
|
/// </remarks>
|
|
public ulong GetUserData() => Jolt.PInvoke.ShapeSettings_GetUserData(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Collision/Shape/Shape.h#L161">Jolt/Physics/Collision/Shape/Shape.h:161</see>
|
|
/// <br/>
|
|
/// <c>uint64 mUserData = 0</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// User data (to be used freely by the application)
|
|
/// </para>
|
|
/// </remarks>
|
|
public void SetUserData(ulong value) => Jolt.PInvoke.ShapeSettings_SetUserData(this, value);
|
|
public void AddRef() => Jolt.PInvoke.ShapeSettings_AddRef(this);
|
|
public void Release() => Jolt.PInvoke.ShapeSettings_Release(this);
|
|
public uint GetRefCount() => Jolt.PInvoke.ShapeSettings_GetRefCount(this);
|
|
public void Dispose()
|
|
{
|
|
if (IsNull()) return;
|
|
Release();
|
|
}
|
|
}
|
|
}
|