// // 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 { /// /// /// Triangle with 32-bit indices /// /// /// C++: /// Jolt/Geometry/IndexedTriangle.h:12 ///
/// class IndexedTriangleNoMaterial ///
///
[StructLayout(LayoutKind.Explicit, Size = 12)] public partial struct IndexedTriangleNoMaterial { /// /// /// C++: /// Jolt/Geometry/IndexedTriangle.h:75 ///
/// uint32 mIdx[3] ///
///
[FieldOffset(0)] public uint_3 Idx; /// /// /// Constructor /// /// /// C++: /// Jolt/Geometry/IndexedTriangle.h:18 ///
/// IndexedTriangleNoMaterial() = default ///
///
public static IndexedTriangleNoMaterial Create() { Jolt.PInvoke.IndexedTriangleNoMaterial_Create(out var _outResult); return _outResult; } /// /// /// C++: /// Jolt/Geometry/IndexedTriangle.h:19 ///
/// constexpr IndexedTriangleNoMaterial(uint32 inI1, uint32 inI2, uint32 inI3) : mIdx { inI1, inI2, inI3 } { } ///
///
public static IndexedTriangleNoMaterial Create(uint i1, uint i2, uint i3) { Jolt.PInvoke.IndexedTriangleNoMaterial_Create_2(i1, i2, i3, out var _outResult); return _outResult; } /// /// /// Check if two triangles are equivalent (using the same vertices) /// /// /// C++: /// Jolt/Geometry/IndexedTriangle.h:28 ///
/// bool IsEquivalent(const IndexedTriangleNoMaterial &inRHS) const ///
///
public readonly bool IsEquivalent(in IndexedTriangleNoMaterial rhs) => Jolt.PInvoke.IndexedTriangleNoMaterial_IsEquivalent(ref Unsafe.AsRef(in this), in rhs); /// /// /// Check if two triangles are opposite (using the same vertices but in opposing order) /// /// /// C++: /// Jolt/Geometry/IndexedTriangle.h:36 ///
/// bool IsOpposite(const IndexedTriangleNoMaterial &inRHS) const ///
///
public readonly bool IsOpposite(in IndexedTriangleNoMaterial rhs) => Jolt.PInvoke.IndexedTriangleNoMaterial_IsOpposite(ref Unsafe.AsRef(in this), in rhs); /// /// /// Check if triangle is degenerate /// /// /// C++: /// Jolt/Geometry/IndexedTriangle.h:44 ///
/// bool IsDegenerate(const VertexList &inVertices) const ///
///
/// /// /// vertices is copied into a native container for the call; the span is only read. /// /// public readonly unsafe bool IsDegenerate(ReadOnlySpan vertices) { fixed (float3* vertices_fixed = vertices) { return Jolt.PInvoke.IndexedTriangleNoMaterial_IsDegenerate( ref Unsafe.AsRef(in this), vertices_fixed, (nuint)vertices.Length ); } } /// /// /// Rotate the vertices so that the second vertex becomes first etc. This does not change the represented /// triangle. /// /// /// C++: /// Jolt/Geometry/IndexedTriangle.h:54 ///
/// void Rotate() ///
///
public void Rotate() => Jolt.PInvoke.IndexedTriangleNoMaterial_Rotate(ref this); /// /// /// Get center of triangle /// /// /// C++: /// Jolt/Geometry/IndexedTriangle.h:63 ///
/// Vec3 GetCentroid(const VertexList &inVertices) const ///
///
/// /// /// vertices is copied into a native container for the call; the span is only read. /// /// public readonly unsafe float3 GetCentroid(ReadOnlySpan vertices) { fixed (float3* vertices_fixed = vertices) { return Jolt.PInvoke.IndexedTriangleNoMaterial_GetCentroid( ref Unsafe.AsRef(in this), vertices_fixed, (nuint)vertices.Length ); } } /// /// /// Get the hash value of this structure /// /// /// C++: /// Jolt/Geometry/IndexedTriangle.h:69 ///
/// uint64 GetHash() const ///
///
public readonly ulong GetHash() => Jolt.PInvoke.IndexedTriangleNoMaterial_GetHash(ref Unsafe.AsRef(in this)); } }