//
// 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);
///
///
/// C++:
/// Jolt/Physics/Body/MassProperties.h:25
///
/// bool DecomposePrincipalMomentsOfInertia(Mat44 &outRotation, Vec3 &outDiagonal) const
///
///
///
///
/// 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
///
///
[LibraryImport("jolt", EntryPoint = "MassProperties_DecomposePrincipalMomentsOfInertia")]
public static partial Brutal.Bool8 MassProperties_DecomposePrincipalMomentsOfInertia(MassProperties self, out float4x4 rotation, out float3 diagonal);
///
///
/// C++:
/// Jolt/Physics/Body/MassProperties.h:28
///
/// void SetMassAndInertiaOfSolidBox(Vec3Arg inBoxSize, float inDensity)
///
///
///
///
/// Set the mass and inertia of a box with edge size inBoxSize and density inDensity
///
///
[LibraryImport("jolt", EntryPoint = "MassProperties_SetMassAndInertiaOfSolidBox")]
public static partial void MassProperties_SetMassAndInertiaOfSolidBox(MassProperties self, float3 boxSize, float density);
///
///
/// C++:
/// Jolt/Physics/Body/MassProperties.h:31
///
/// void ScaleToMass(float inMass)
///
///
///
///
/// Set the mass and scale the inertia tensor to match the mass
///
///
[LibraryImport("jolt", EntryPoint = "MassProperties_ScaleToMass")]
public static partial void MassProperties_ScaleToMass(MassProperties self, float mass);
///
///
/// C++:
/// Jolt/Physics/Body/MassProperties.h:34
///
/// static Vec3 sGetEquivalentSolidBoxSize(float inMass, Vec3Arg inInertiaDiagonal)
///
///
///
///
/// Calculates the size of the solid box that has an inertia tensor diagonal inInertiaDiagonal
///
///
[LibraryImport("jolt", EntryPoint = "MassProperties_sGetEquivalentSolidBoxSize")]
public static partial float3 MassProperties_sGetEquivalentSolidBoxSize(float mass, float3 inertiaDiagonal);
///
///
/// C++:
/// Jolt/Physics/Body/MassProperties.h:37
///
/// void Rotate(Mat44Arg inRotation)
///
///
///
///
/// Rotate the inertia by 3x3 matrix inRotation
///
///
[LibraryImport("jolt", EntryPoint = "MassProperties_Rotate")]
public static partial void MassProperties_Rotate(MassProperties self, float4x4 rotation);
///
///
/// C++:
/// Jolt/Physics/Body/MassProperties.h:40
///
/// void Translate(Vec3Arg inTranslation)
///
///
///
///
/// Translate the inertia by a vector inTranslation
///
///
[LibraryImport("jolt", EntryPoint = "MassProperties_Translate")]
public static partial void MassProperties_Translate(MassProperties self, float3 translation);
///
///
/// C++:
/// Jolt/Physics/Body/MassProperties.h:43
///
/// void Scale(Vec3Arg inScale)
///
///
///
///
/// Scale the mass and inertia by inScale, note that elements can be < 0 to flip the shape
///
///
[LibraryImport("jolt", EntryPoint = "MassProperties_Scale")]
public static partial void MassProperties_Scale(MassProperties self, float3 scale);
///
///
/// C++:
/// Jolt/Physics/Body/MassProperties.h:46
///
/// void SaveBinaryState(StreamOut &inStream) const
///
///
///
///
/// Saves the state of this object in binary form to inStream.
///
///
[LibraryImport("jolt", EntryPoint = "MassProperties_SaveBinaryState")]
public static partial void MassProperties_SaveBinaryState(MassProperties self, StreamOut stream);
///
///
/// C++:
/// Jolt/Physics/Body/MassProperties.h:49
///
/// void RestoreBinaryState(StreamIn &inStream)
///
///
///
///
/// Restore the state of this object from inStream.
///
///
[LibraryImport("jolt", EntryPoint = "MassProperties_RestoreBinaryState")]
public static partial void MassProperties_RestoreBinaryState(MassProperties self, StreamIn stream);
///
///
/// C++:
/// Jolt/Physics/Body/MassProperties.h:52
///
/// float mMass = 0.0f
///
///
///
///
/// Mass of the shape (kg)
///
///
[LibraryImport("jolt", EntryPoint = "MassProperties_GetMass")]
public static partial float MassProperties_GetMass(MassProperties self);
///
///
/// C++:
/// Jolt/Physics/Body/MassProperties.h:52
///
/// float mMass = 0.0f
///
///
///
///
/// Mass of the shape (kg)
///
///
[LibraryImport("jolt", EntryPoint = "MassProperties_SetMass")]
public static partial void MassProperties_SetMass(MassProperties self, float value);
///
///
/// C++:
/// Jolt/Physics/Body/MassProperties.h:55
///
/// Mat44 mInertia = Mat44::sZero()
///
///
///
///
/// Inertia tensor of the shape (kg m^2)
///
///
[LibraryImport("jolt", EntryPoint = "MassProperties_GetInertia")]
public static partial float4x4 MassProperties_GetInertia(MassProperties self);
///
///
/// C++:
/// Jolt/Physics/Body/MassProperties.h:55
///
/// Mat44 mInertia = Mat44::sZero()
///
///
///
///
/// Inertia tensor of the shape (kg m^2)
///
///
[LibraryImport("jolt", EntryPoint = "MassProperties_SetInertia")]
public static partial void MassProperties_SetInertia(MassProperties self, float4x4 value);
}
}
}