//
// Generated by Brutal.Jolt.Generate; do not edit by hand.
#nullable enable
using Brutal.Interop;
using Brutal.Numerics;
namespace Brutal.JoltApi
{
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/ScaledShape.h:16
///
/// class ScaledShapeSettings final : public DecoratedShapeSettings
///
///
///
///
/// Class that constructs a ScaledShape
///
///
[InteropHandle]
public readonly partial struct ScaledShapeSettings : IDisposable
{
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/ScaledShape.h:22
///
/// ScaledShapeSettings() = default
///
///
///
///
/// Default constructor for deserialization
///
///
public static ScaledShapeSettings Create() => Jolt.PInvoke.ScaledShapeSettings_Create();
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/ScaledShape.h:25
///
/// ScaledShapeSettings(const ShapeSettings *inShape, Vec3Arg inScale)
///
///
///
///
/// Constructor that decorates another shape with a scale
///
///
public static ScaledShapeSettings Create(ShapeSettings shape, float3 scale) => Jolt.PInvoke.ScaledShapeSettings_Create_2(shape, scale);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/ScaledShape.h:28
///
/// ScaledShapeSettings(const Shape *inShape, Vec3Arg inScale)
///
///
///
///
/// Variant that uses a concrete shape, which means this object cannot be serialized.
///
///
public static ScaledShapeSettings Create(Shape shape, float3 scale) => Jolt.PInvoke.ScaledShapeSettings_Create_3(shape, scale);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/ScaledShape.h:18
///
///
///
///
///
///
/// The returned handle is borrowed from its owner; don't Dispose it.
///
///
public RTTI GetRTTI() => Jolt.PInvoke.ScaledShapeSettings_GetRTTI(this);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/ScaledShape.h:18
///
///
///
///
public unsafe Ptr CastTo(RTTI rTTI) => Jolt.PInvoke.ScaledShapeSettings_CastTo(this, rTTI);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/ScaledShape.h:31
///
/// virtual ShapeResult Create() const override
///
///
///
///
/// See: ShapeSettings
///
///
/// Throws InvalidOperationException with Jolt's error message when the operation fails.
///
///
public Shape CreateShape()
{
var _handle = Jolt.PInvoke.ScaledShapeSettings_CreateShape(this);
if (_handle.IsNull()) throw new InvalidOperationException(Jolt.GetLastError());
return _handle;
}
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/ScaledShape.h:33
///
/// Vec3 mScale = Vec3(1, 1, 1)
///
///
public float3 GetScale() => Jolt.PInvoke.ScaledShapeSettings_GetScale(this);
///
///
/// C++:
/// Jolt/Physics/Collision/Shape/ScaledShape.h:33
///
/// Vec3 mScale = Vec3(1, 1, 1)
///
///
public void SetScale(float3 value) => Jolt.PInvoke.ScaledShapeSettings_SetScale(this, value);
public void AddRef() => Jolt.PInvoke.ScaledShapeSettings_AddRef(this);
public void Release() => Jolt.PInvoke.ScaledShapeSettings_Release(this);
public uint GetRefCount() => Jolt.PInvoke.ScaledShapeSettings_GetRefCount(this);
public static implicit operator DecoratedShapeSettings(ScaledShapeSettings value) => Jolt.PInvoke.ScaledShapeSettings_AsDecoratedShapeSettings(value);
public static implicit operator ShapeSettings(ScaledShapeSettings value) => Jolt.PInvoke.ScaledShapeSettings_AsShapeSettings(value);
public void Dispose()
{
if (IsNull()) return;
Release();
}
}
}