mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
172 lines
7.6 KiB
C#
172 lines
7.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>
|
|
/// Class that constructs a CapsuleShape
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/Shape/CapsuleShape.h#L12">Jolt/Physics/Collision/Shape/CapsuleShape.h:12</see>
|
|
/// <br/>
|
|
/// <c>class CapsuleShapeSettings final : public ConvexShapeSettings</c>
|
|
/// </para>
|
|
/// </summary>
|
|
[InteropHandle]
|
|
public readonly partial struct CapsuleShapeSettings : IDisposable
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// Default constructor for deserialization
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/Shape/CapsuleShape.h#L18">Jolt/Physics/Collision/Shape/CapsuleShape.h:18</see>
|
|
/// <br/>
|
|
/// <c>CapsuleShapeSettings() = default</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public static CapsuleShapeSettings Create() => Jolt.PInvoke.CapsuleShapeSettings_Create();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Create a capsule centered around the origin with one sphere cap at (0, -inHalfHeightOfCylinder, 0) and
|
|
/// the other at (0, inHalfHeightOfCylinder, 0)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/Shape/CapsuleShape.h#L21">Jolt/Physics/Collision/Shape/CapsuleShape.h:21</see>
|
|
/// <br/>
|
|
/// <c>CapsuleShapeSettings(float inHalfHeightOfCylinder, float inRadius, const PhysicsMaterial *inMaterial = nullptr)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public static CapsuleShapeSettings Create(
|
|
float halfHeightOfCylinder,
|
|
float radius,
|
|
PhysicsMaterial material = default
|
|
) => Jolt.PInvoke.CapsuleShapeSettings_Create_2(halfHeightOfCylinder, radius, material);
|
|
|
|
/// <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);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Check if this is a valid capsule shape
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/Shape/CapsuleShape.h#L24">Jolt/Physics/Collision/Shape/CapsuleShape.h:24</see>
|
|
/// <br/>
|
|
/// <c>bool IsValid() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public bool IsValid() => Jolt.PInvoke.CapsuleShapeSettings_IsValid(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Checks if the settings of this capsule make this shape a sphere
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/Shape/CapsuleShape.h#L27">Jolt/Physics/Collision/Shape/CapsuleShape.h:27</see>
|
|
/// <br/>
|
|
/// <c>bool IsSphere() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public bool IsSphere() => Jolt.PInvoke.CapsuleShapeSettings_IsSphere(this);
|
|
|
|
/// <inheritdoc cref="ShapeSettings.CreateShape()"/>
|
|
public Shape CreateShape() => ((ShapeSettings)this).CreateShape();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/Shape/CapsuleShape.h#L33">Jolt/Physics/Collision/Shape/CapsuleShape.h:33</see>
|
|
/// <br/>
|
|
/// <c>float mRadius = 0.0f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float GetRadius() => Jolt.PInvoke.CapsuleShapeSettings_GetRadius(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/Shape/CapsuleShape.h#L33">Jolt/Physics/Collision/Shape/CapsuleShape.h:33</see>
|
|
/// <br/>
|
|
/// <c>float mRadius = 0.0f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetRadius(float value) => Jolt.PInvoke.CapsuleShapeSettings_SetRadius(this, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/Shape/CapsuleShape.h#L34">Jolt/Physics/Collision/Shape/CapsuleShape.h:34</see>
|
|
/// <br/>
|
|
/// <c>float mHalfHeightOfCylinder = 0.0f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float GetHalfHeightOfCylinder() => Jolt.PInvoke.CapsuleShapeSettings_GetHalfHeightOfCylinder(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Collision/Shape/CapsuleShape.h#L34">Jolt/Physics/Collision/Shape/CapsuleShape.h:34</see>
|
|
/// <br/>
|
|
/// <c>float mHalfHeightOfCylinder = 0.0f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetHalfHeightOfCylinder(float value) =>
|
|
Jolt.PInvoke.CapsuleShapeSettings_SetHalfHeightOfCylinder(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(CapsuleShapeSettings value) =>
|
|
Unsafe.BitCast<CapsuleShapeSettings, ConvexShapeSettings>(value);
|
|
|
|
public static implicit operator ShapeSettings(CapsuleShapeSettings value) =>
|
|
Unsafe.BitCast<CapsuleShapeSettings, 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);
|
|
}
|
|
}
|