// // 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 and material index /// /// /// C++: /// Jolt/Geometry/IndexedTriangle.h:79 ///
/// class IndexedTriangle : public IndexedTriangleNoMaterial ///
///
[StructLayout(LayoutKind.Explicit, Size = 20)] public partial struct IndexedTriangle { [FieldOffset(0)] public uint_3 Idx; /// /// /// C++: /// Jolt/Geometry/IndexedTriangle.h:119 ///
/// uint32 mMaterialIndex = 0 ///
///
[FieldOffset(12)] public uint MaterialIndex; /// /// /// User data that can be used for anything by the application, e.g. for tracking the original index of the /// triangle /// /// /// C++: /// Jolt/Geometry/IndexedTriangle.h:120 ///
/// uint32 mUserData = 0 ///
///
[FieldOffset(16)] public uint UserData; /// /// /// Constructor /// /// /// C++: /// Jolt/Geometry/IndexedTriangle.h:85 ///
/// constexpr IndexedTriangle(uint32 inI1, uint32 inI2, uint32 inI3, uint32 inMaterialIndex, uint inUserData = 0) : IndexedTriangleNoMaterial(inI1, inI2, inI3), mMaterialIndex(inMaterialIndex), mUserData(inUserData) { } ///
///
public static IndexedTriangle Create(uint i1, uint i2, uint i3, uint materialIndex, uint userData = 0) { Jolt.PInvoke.IndexedTriangle_Create(i1, i2, i3, materialIndex, userData, out var _outResult); return _outResult; } /// /// /// Rotate the vertices so that the lowest vertex becomes the first. This does not change the represented /// triangle. /// /// /// C++: /// Jolt/Geometry/IndexedTriangle.h:94 ///
/// IndexedTriangle GetLowestIndexFirst() const ///
///
public readonly IndexedTriangle GetLowestIndexFirst() { Jolt.PInvoke.IndexedTriangle_GetLowestIndexFirst(ref Unsafe.AsRef(in this), out var _outResult); return _outResult; } /// /// /// Get the hash value of this structure /// /// /// C++: /// Jolt/Geometry/IndexedTriangle.h:113 ///
/// uint64 GetHash() const ///
///
public readonly ulong GetHash() => Jolt.PInvoke.IndexedTriangle_GetHash(ref Unsafe.AsRef(in this)); } }