mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-26 21:18:24 +01:00
155 lines
9 KiB
C#
155 lines
9 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
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/SpringSettings.h#L28">Jolt/Physics/Constraints/SpringSettings.h:28</see>
|
|
/// <br/>
|
|
/// <c>SpringSettings() = default</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Constructor
|
|
/// </para>
|
|
/// </remarks>
|
|
[LibraryImport("jolt", EntryPoint = "SpringSettings_Create")]
|
|
public static partial SpringSettings SpringSettings_Create();
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/SpringSettings.h#L31">Jolt/Physics/Constraints/SpringSettings.h:31</see>
|
|
/// <br/>
|
|
/// <c>SpringSettings(ESpringMode inMode, float inFrequencyOrStiffness, float inDamping)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
[LibraryImport("jolt", EntryPoint = "SpringSettings_Create_2")]
|
|
public static partial SpringSettings SpringSettings_Create_2(ESpringMode mode, float frequencyOrStiffness, float damping);
|
|
[LibraryImport("jolt", EntryPoint = "SpringSettings_Destroy")]
|
|
public static partial void SpringSettings_Destroy(SpringSettings self);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/SpringSettings.h#L34">Jolt/Physics/Constraints/SpringSettings.h:34</see>
|
|
/// <br/>
|
|
/// <c>void SaveBinaryState(StreamOut &inStream) const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Saves the contents of the spring settings in binary form to inStream.
|
|
/// </para>
|
|
/// </remarks>
|
|
[LibraryImport("jolt", EntryPoint = "SpringSettings_SaveBinaryState")]
|
|
public static partial void SpringSettings_SaveBinaryState(SpringSettings self, StreamOut stream);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/SpringSettings.h#L37">Jolt/Physics/Constraints/SpringSettings.h:37</see>
|
|
/// <br/>
|
|
/// <c>void RestoreBinaryState(StreamIn &inStream)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Restores contents from the binary stream inStream.
|
|
/// </para>
|
|
/// </remarks>
|
|
[LibraryImport("jolt", EntryPoint = "SpringSettings_RestoreBinaryState")]
|
|
public static partial void SpringSettings_RestoreBinaryState(SpringSettings self, StreamIn stream);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/SpringSettings.h#L40">Jolt/Physics/Constraints/SpringSettings.h:40</see>
|
|
/// <br/>
|
|
/// <c>inline bool HasStiffness() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Check if the spring has a valid frequency / stiffness, if not the spring will be hard
|
|
/// </para>
|
|
/// </remarks>
|
|
[LibraryImport("jolt", EntryPoint = "SpringSettings_HasStiffness")]
|
|
public static partial Brutal.Bool8 SpringSettings_HasStiffness(SpringSettings self);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/SpringSettings.h#L44">Jolt/Physics/Constraints/SpringSettings.h:44</see>
|
|
/// <br/>
|
|
/// <c>ESpringMode mMode = ESpringMode::FrequencyAndDamping</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Selects the way in which the spring is defined
|
|
/// If the mode is StiffnessAndDamping then mFrequency becomes the stiffness (k) and mDamping becomes the damping ratio (c) in the spring equation F = -k * x - c * v. Otherwise the properties are as documented.
|
|
/// </code>
|
|
/// </remarks>
|
|
[LibraryImport("jolt", EntryPoint = "SpringSettings_GetMode")]
|
|
public static partial ESpringMode SpringSettings_GetMode(SpringSettings self);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/SpringSettings.h#L44">Jolt/Physics/Constraints/SpringSettings.h:44</see>
|
|
/// <br/>
|
|
/// <c>ESpringMode mMode = ESpringMode::FrequencyAndDamping</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Selects the way in which the spring is defined
|
|
/// If the mode is StiffnessAndDamping then mFrequency becomes the stiffness (k) and mDamping becomes the damping ratio (c) in the spring equation F = -k * x - c * v. Otherwise the properties are as documented.
|
|
/// </code>
|
|
/// </remarks>
|
|
[LibraryImport("jolt", EntryPoint = "SpringSettings_SetMode")]
|
|
public static partial void SpringSettings_SetMode(SpringSettings self, ESpringMode value);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/SpringSettings.h#L67">Jolt/Physics/Constraints/SpringSettings.h:67</see>
|
|
/// <br/>
|
|
/// <c>float mDamping = 0.0f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// When mSpringMode = ESpringMode::FrequencyAndDamping mDamping is the damping ratio (0 = no damping, 1 = critical damping).
|
|
/// When mSpringMode = ESpringMode::StiffnessAndDamping mDamping is the damping (c) in the spring equation F = -k * x - c * v for a linear or T = -k * theta - c * w for an angular spring.
|
|
/// Note that if you set mDamping = 0, you will not get an infinite oscillation. Because we integrate physics using an explicit Euler scheme, there is always energy loss.
|
|
/// This is done to keep the simulation from exploding, because with a damping of 0 and even the slightest rounding error, the oscillation could become bigger and bigger until the simulation explodes.
|
|
/// </code>
|
|
/// </remarks>
|
|
[LibraryImport("jolt", EntryPoint = "SpringSettings_GetDamping")]
|
|
public static partial float SpringSettings_GetDamping(SpringSettings self);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Constraints/SpringSettings.h#L67">Jolt/Physics/Constraints/SpringSettings.h:67</see>
|
|
/// <br/>
|
|
/// <c>float mDamping = 0.0f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// When mSpringMode = ESpringMode::FrequencyAndDamping mDamping is the damping ratio (0 = no damping, 1 = critical damping).
|
|
/// When mSpringMode = ESpringMode::StiffnessAndDamping mDamping is the damping (c) in the spring equation F = -k * x - c * v for a linear or T = -k * theta - c * w for an angular spring.
|
|
/// Note that if you set mDamping = 0, you will not get an infinite oscillation. Because we integrate physics using an explicit Euler scheme, there is always energy loss.
|
|
/// This is done to keep the simulation from exploding, because with a damping of 0 and even the slightest rounding error, the oscillation could become bigger and bigger until the simulation explodes.
|
|
/// </code>
|
|
/// </remarks>
|
|
[LibraryImport("jolt", EntryPoint = "SpringSettings_SetDamping")]
|
|
public static partial void SpringSettings_SetDamping(SpringSettings self, float value);
|
|
}
|
|
}
|
|
}
|