//
// Generated by Brutal.Jolt.Generate; do not edit by hand.
#nullable enable
using Brutal.Interop;
using Brutal.Numerics;
namespace Brutal.JoltApi
{
///
///
/// C++:
/// Jolt/Geometry/Triangle.h:10
///
/// class Triangle
///
///
///
///
/// A simple triangle and its material
///
///
[InteropHandle]
public readonly partial struct Triangle : IDisposable
{
///
///
/// C++:
/// Jolt/Geometry/Triangle.h:16
///
/// Triangle() = default
///
///
///
///
/// Constructor
///
///
public static Triangle Create() => Jolt.PInvoke.Triangle_Create();
///
///
/// C++:
/// Jolt/Geometry/Triangle.h:17
///
/// Triangle(const Float3 &inV1, const Float3 &inV2, const Float3 &inV3, uint32 inMaterialIndex = 0, uint32 inUserData = 0)
///
///
public static Triangle Create(float3 v1, float3 v2, float3 v3, uint materialIndex, uint userData) => Jolt.PInvoke.Triangle_Create_2(v1, v2, v3, materialIndex, userData);
///
///
/// C++:
/// Jolt/Geometry/Triangle.h:21
///
/// Vec3 GetCentroid() const
///
///
///
///
/// Get center of triangle
///
///
public float3 GetCentroid() => Jolt.PInvoke.Triangle_GetCentroid(this);
///
///
/// Follows mV[3] so that we can read mV as 4 vectors
///
///
/// C++:
/// Jolt/Geometry/Triangle.h:28
///
/// uint32 mMaterialIndex = 0
///
///
public uint GetMaterialIndex() => Jolt.PInvoke.Triangle_GetMaterialIndex(this);
///
///
/// Follows mV[3] so that we can read mV as 4 vectors
///
///
/// C++:
/// Jolt/Geometry/Triangle.h:28
///
/// uint32 mMaterialIndex = 0
///
///
public void SetMaterialIndex(uint value) => Jolt.PInvoke.Triangle_SetMaterialIndex(this, value);
///
///
/// User data that can be used for anything by the application, e.g. for tracking the original index of the
/// triangle
///
///
/// C++:
/// Jolt/Geometry/Triangle.h:29
///
/// uint32 mUserData = 0
///
///
public uint GetUserData() => Jolt.PInvoke.Triangle_GetUserData(this);
///
///
/// User data that can be used for anything by the application, e.g. for tracking the original index of the
/// triangle
///
///
/// C++:
/// Jolt/Geometry/Triangle.h:29
///
/// uint32 mUserData = 0
///
///
public void SetUserData(uint value) => Jolt.PInvoke.Triangle_SetUserData(this, value);
public void Dispose() => Jolt.PInvoke.Triangle_Destroy(this);
}
}