brutal/brutal.jolt/Brutal.Jolt/Generated/PInvoke/MassProperties.gen.cs
2026-10-15 14:12:02 +13:00

218 lines
11 KiB
C#

// <auto-generated/>
// Generated by Brutal.Jolt.Generate; do not edit by hand.
#nullable enable
using Brutal.Interop;
using Brutal.Numerics;
namespace Brutal.JoltApi
{
public static partial class Jolt
{
public static unsafe partial class PInvoke
{
[LibraryImport("jolt", EntryPoint = "MassProperties_Create")]
public static partial MassProperties MassProperties_Create();
[LibraryImport("jolt", EntryPoint = "MassProperties_Destroy")]
public static partial void MassProperties_Destroy(MassProperties self);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/MassProperties.h#L25">Jolt/Physics/Body/MassProperties.h:25</see>
/// <br/>
/// <c>bool DecomposePrincipalMomentsOfInertia(Mat44 &amp;outRotation, Vec3 &amp;outDiagonal) const</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Using eigendecomposition, decompose the inertia tensor into a diagonal matrix D and a right-handed rotation matrix R so that the inertia tensor is \f$R \: D \: R^{-1}\f$.
/// @see https://en.wikipedia.org/wiki/Moment_of_inertia section 'Principal axes'
/// @param outRotation The rotation matrix R
/// @param outDiagonal The diagonal of the diagonal matrix D
/// @return True if successful, false if failed
/// </code>
/// </remarks>
[LibraryImport("jolt", EntryPoint = "MassProperties_DecomposePrincipalMomentsOfInertia")]
public static partial Brutal.Bool8 MassProperties_DecomposePrincipalMomentsOfInertia(MassProperties self, out float4x4 rotation, out float3 diagonal);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/MassProperties.h#L28">Jolt/Physics/Body/MassProperties.h:28</see>
/// <br/>
/// <c>void SetMassAndInertiaOfSolidBox(Vec3Arg inBoxSize, float inDensity)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Set the mass and inertia of a box with edge size inBoxSize and density inDensity
/// </para>
/// </remarks>
[LibraryImport("jolt", EntryPoint = "MassProperties_SetMassAndInertiaOfSolidBox")]
public static partial void MassProperties_SetMassAndInertiaOfSolidBox(MassProperties self, float3 boxSize, float density);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/MassProperties.h#L31">Jolt/Physics/Body/MassProperties.h:31</see>
/// <br/>
/// <c>void ScaleToMass(float inMass)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Set the mass and scale the inertia tensor to match the mass
/// </para>
/// </remarks>
[LibraryImport("jolt", EntryPoint = "MassProperties_ScaleToMass")]
public static partial void MassProperties_ScaleToMass(MassProperties self, float mass);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/MassProperties.h#L34">Jolt/Physics/Body/MassProperties.h:34</see>
/// <br/>
/// <c>static Vec3 sGetEquivalentSolidBoxSize(float inMass, Vec3Arg inInertiaDiagonal)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Calculates the size of the solid box that has an inertia tensor diagonal inInertiaDiagonal
/// </para>
/// </remarks>
[LibraryImport("jolt", EntryPoint = "MassProperties_sGetEquivalentSolidBoxSize")]
public static partial float3 MassProperties_sGetEquivalentSolidBoxSize(float mass, float3 inertiaDiagonal);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/MassProperties.h#L37">Jolt/Physics/Body/MassProperties.h:37</see>
/// <br/>
/// <c>void Rotate(Mat44Arg inRotation)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Rotate the inertia by 3x3 matrix inRotation
/// </para>
/// </remarks>
[LibraryImport("jolt", EntryPoint = "MassProperties_Rotate")]
public static partial void MassProperties_Rotate(MassProperties self, float4x4 rotation);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/MassProperties.h#L40">Jolt/Physics/Body/MassProperties.h:40</see>
/// <br/>
/// <c>void Translate(Vec3Arg inTranslation)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Translate the inertia by a vector inTranslation
/// </para>
/// </remarks>
[LibraryImport("jolt", EntryPoint = "MassProperties_Translate")]
public static partial void MassProperties_Translate(MassProperties self, float3 translation);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/MassProperties.h#L43">Jolt/Physics/Body/MassProperties.h:43</see>
/// <br/>
/// <c>void Scale(Vec3Arg inScale)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Scale the mass and inertia by inScale, note that elements can be &lt; 0 to flip the shape
/// </para>
/// </remarks>
[LibraryImport("jolt", EntryPoint = "MassProperties_Scale")]
public static partial void MassProperties_Scale(MassProperties self, float3 scale);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/MassProperties.h#L46">Jolt/Physics/Body/MassProperties.h:46</see>
/// <br/>
/// <c>void SaveBinaryState(StreamOut &amp;inStream) const</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Saves the state of this object in binary form to inStream.
/// </para>
/// </remarks>
[LibraryImport("jolt", EntryPoint = "MassProperties_SaveBinaryState")]
public static partial void MassProperties_SaveBinaryState(MassProperties self, StreamOut stream);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/MassProperties.h#L49">Jolt/Physics/Body/MassProperties.h:49</see>
/// <br/>
/// <c>void RestoreBinaryState(StreamIn &amp;inStream)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Restore the state of this object from inStream.
/// </para>
/// </remarks>
[LibraryImport("jolt", EntryPoint = "MassProperties_RestoreBinaryState")]
public static partial void MassProperties_RestoreBinaryState(MassProperties self, StreamIn stream);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/MassProperties.h#L52">Jolt/Physics/Body/MassProperties.h:52</see>
/// <br/>
/// <c>float mMass = 0.0f</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Mass of the shape (kg)
/// </para>
/// </remarks>
[LibraryImport("jolt", EntryPoint = "MassProperties_GetMass")]
public static partial float MassProperties_GetMass(MassProperties self);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/MassProperties.h#L52">Jolt/Physics/Body/MassProperties.h:52</see>
/// <br/>
/// <c>float mMass = 0.0f</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Mass of the shape (kg)
/// </para>
/// </remarks>
[LibraryImport("jolt", EntryPoint = "MassProperties_SetMass")]
public static partial void MassProperties_SetMass(MassProperties self, float value);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/MassProperties.h#L55">Jolt/Physics/Body/MassProperties.h:55</see>
/// <br/>
/// <c>Mat44 mInertia = Mat44::sZero()</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Inertia tensor of the shape (kg m^2)
/// </para>
/// </remarks>
[LibraryImport("jolt", EntryPoint = "MassProperties_GetInertia")]
public static partial float4x4 MassProperties_GetInertia(MassProperties self);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/MassProperties.h#L55">Jolt/Physics/Body/MassProperties.h:55</see>
/// <br/>
/// <c>Mat44 mInertia = Mat44::sZero()</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Inertia tensor of the shape (kg m^2)
/// </para>
/// </remarks>
[LibraryImport("jolt", EntryPoint = "MassProperties_SetInertia")]
public static partial void MassProperties_SetInertia(MassProperties self, float4x4 value);
}
}
}