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

999 lines
47 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
{
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L15">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:15</see>
/// <br/>
/// <c>class SoftBodySharedSettings : public RefTarget&lt;SoftBodySharedSettings&gt;</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// This class defines the setup of all particles and their constraints.
/// It is used during the simulation and can be shared between multiple soft bodies.
/// </code>
/// </remarks>
[InteropHandle]
public readonly partial struct SoftBodySharedSettings : IDisposable
{
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L21">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:21</see>
/// <br/>
/// <c>enum class EBendType</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Which type of bend constraint should be created
/// </para>
/// </remarks>
public enum EBendType : int
{
/// <summary>
/// <para>
/// No bend constraints will be created
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L23">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:23</see>
/// <br/>
/// <c>None</c>
/// </para>
/// </summary>
None,
/// <summary>
/// <para>
/// A simple distance constraint
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L24">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:24</see>
/// <br/>
/// <c>Distance</c>
/// </para>
/// </summary>
Distance,
/// <summary>
/// <para>
/// A dihedral bend constraint (most expensive, but also supports triangles that are initially not in
/// the same plane)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L25">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:25</see>
/// <br/>
/// <c>Dihedral</c>
/// </para>
/// </summary>
Dihedral,
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L29">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:29</see>
/// <br/>
/// <c>enum class ELRAType</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// The type of long range attachment constraint to create
/// </para>
/// </remarks>
public enum ELRAType : int
{
/// <summary>
/// <para>
/// Don't create a LRA constraint
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L31">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:31</see>
/// <br/>
/// <c>None</c>
/// </para>
/// </summary>
None,
/// <summary>
/// <para>
/// Create a LRA constraint based on Euclidean distance between the closest kinematic vertex and this
/// vertex
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L32">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:32</see>
/// <br/>
/// <c>EuclideanDistance</c>
/// </para>
/// </summary>
EuclideanDistance,
/// <summary>
/// <para>
/// Create a LRA constraint based on the geodesic distance between the closest kinematic vertex and this
/// vertex (follows the edge constraints)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L33">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:33</see>
/// <br/>
/// <c>GeodesicDistance</c>
/// </para>
/// </summary>
GeodesicDistance,
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L39">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:39</see>
/// <br/>
/// <c>struct VertexAttributes</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Per vertex attributes used during the CreateConstraints function.
/// For an edge or shear constraint, the compliance is averaged between the two attached vertices.
/// For a bend constraint, the compliance is averaged between the two vertices on the shared edge.
/// </code>
/// </remarks>
[StructLayout(LayoutKind.Explicit, Size = 20)]
public struct VertexAttributes
{
/// <summary>
/// <para>
/// The compliance of the normal edges. Set to FLT_MAX to disable regular edges for any edge involving
/// this vertex.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L45">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:45</see>
/// <br/>
/// <c>float mCompliance = 0.0f</c>
/// </para>
/// </summary>
[FieldOffset(0)]
public float mCompliance;
/// <summary>
/// <para>
/// The compliance of the shear edges. Set to FLT_MAX to disable shear edges for any edge involving this
/// vertex.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L46">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:46</see>
/// <br/>
/// <c>float mShearCompliance = 0.0f</c>
/// </para>
/// </summary>
[FieldOffset(4)]
public float mShearCompliance;
/// <summary>
/// <para>
/// The compliance of the bend edges. Set to FLT_MAX to disable bend edges for any bend constraint
/// involving this vertex.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L47">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:47</see>
/// <br/>
/// <c>float mBendCompliance = FLT_MAX</c>
/// </para>
/// </summary>
[FieldOffset(8)]
public float mBendCompliance;
/// <summary>
/// <para>
/// The type of long range attachment constraint to create.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L48">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:48</see>
/// <br/>
/// <c>ELRAType mLRAType = ELRAType::None</c>
/// </para>
/// </summary>
[FieldOffset(12)]
public SoftBodySharedSettings.ELRAType mLRAType;
/// <summary>
/// <para>
/// Multiplier for the max distance of the LRA constraint, e.g. 1.01 means the max distance is 1% longer
/// than the calculated distance in the rest pose.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L49">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:49</see>
/// <br/>
/// <c>float mLRAMaxDistanceMultiplier = 1.0f</c>
/// </para>
/// </summary>
[FieldOffset(16)]
public float mLRAMaxDistanceMultiplier;
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L127">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:127</see>
/// <br/>
/// <c>struct Vertex</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// A vertex is a particle, the data in this structure is only used during creation of the soft body and not
/// during simulation
/// </para>
/// </remarks>
[StructLayout(LayoutKind.Explicit, Size = 28)]
public struct Vertex
{
/// <summary>
/// <para>
/// Initial position of the vertex
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L135">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:135</see>
/// <br/>
/// <c>Float3 mPosition { 0, 0, 0 }</c>
/// </para>
/// </summary>
[FieldOffset(0)]
public float3 mPosition;
/// <summary>
/// <para>
/// Initial velocity of the vertex
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L136">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:136</see>
/// <br/>
/// <c>Float3 mVelocity { 0, 0, 0 }</c>
/// </para>
/// </summary>
[FieldOffset(12)]
public float3 mVelocity;
/// <summary>
/// <para>
/// Initial inverse of the mass of the vertex
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L137">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:137</see>
/// <br/>
/// <c>float mInvMass = 1.0f</c>
/// </para>
/// </summary>
[FieldOffset(24)]
public float mInvMass;
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L141">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:141</see>
/// <br/>
/// <c>struct Face</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// A face defines the surface of the body
/// </para>
/// </remarks>
[StructLayout(LayoutKind.Explicit, Size = 16)]
public struct Face
{
/// <summary>
/// <para>
/// Indices of the vertices that form the face
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L152">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:152</see>
/// <br/>
/// <c>uint32 mVertex[3]</c>
/// </para>
/// </summary>
[FieldOffset(0)]
public uint_3 mVertex;
/// <summary>
/// <para>
/// Index of the material of the face in SoftBodySharedSettings::mMaterials
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L153">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:153</see>
/// <br/>
/// <c>uint32 mMaterialIndex = 0</c>
/// </para>
/// </summary>
[FieldOffset(12)]
public uint mMaterialIndex;
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L157">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:157</see>
/// <br/>
/// <c>struct Edge</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// An edge keeps two vertices at a constant distance using a spring: |x1 - x2| = rest length
/// </para>
/// </remarks>
[StructLayout(LayoutKind.Explicit, Size = 16)]
public struct Edge
{
/// <summary>
/// <para>
/// Indices of the vertices that form the edge
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L168">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:168</see>
/// <br/>
/// <c>uint32 mVertex[2]</c>
/// </para>
/// </summary>
[FieldOffset(0)]
public uint_2 mVertex;
/// <summary>
/// <para>
/// Rest length of the spring, calculated by CalculateEdgeLengths
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L169">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:169</see>
/// <br/>
/// <c>float mRestLength = 1.0f</c>
/// </para>
/// </summary>
[FieldOffset(8)]
public float mRestLength;
/// <summary>
/// <para>
/// Inverse of the stiffness of the spring
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L170">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:170</see>
/// <br/>
/// <c>float mCompliance = 0.0f</c>
/// </para>
/// </summary>
[FieldOffset(12)]
public float mCompliance;
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L191">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:191</see>
/// <br/>
/// <c>struct DihedralBend</c>
/// </para>
/// </summary>
[StructLayout(LayoutKind.Explicit, Size = 24)]
public struct DihedralBend
{
/// <summary>
/// <para>
/// Indices of the vertices of the 2 triangles that share an edge (the first 2 vertices are the shared
/// edge)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L202">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:202</see>
/// <br/>
/// <c>uint32 mVertex[4]</c>
/// </para>
/// </summary>
[FieldOffset(0)]
public uint_4 mVertex;
/// <summary>
/// <para>
/// Inverse of the stiffness of the constraint
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L203">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:203</see>
/// <br/>
/// <c>float mCompliance = 0.0f</c>
/// </para>
/// </summary>
[FieldOffset(16)]
public float mCompliance;
/// <summary>
/// <para>
/// Initial angle between the normals of the triangles (pi - dihedral angle), calculated by
/// CalculateBendConstraintConstants
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L204">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:204</see>
/// <br/>
/// <c>float mInitialAngle = 0.0f</c>
/// </para>
/// </summary>
[FieldOffset(20)]
public float mInitialAngle;
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L208">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:208</see>
/// <br/>
/// <c>struct Volume</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Volume constraint, keeps the volume of a tetrahedron constant
/// </para>
/// </remarks>
[StructLayout(LayoutKind.Explicit, Size = 24)]
public struct Volume
{
/// <summary>
/// <para>
/// Indices of the vertices that form the tetrahedron
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L219">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:219</see>
/// <br/>
/// <c>uint32 mVertex[4]</c>
/// </para>
/// </summary>
[FieldOffset(0)]
public uint_4 mVertex;
/// <summary>
/// <para>
/// 6 times the rest volume of the tetrahedron, calculated by CalculateVolumeConstraintVolumes
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L220">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:220</see>
/// <br/>
/// <c>float mSixRestVolume = 1.0f</c>
/// </para>
/// </summary>
[FieldOffset(16)]
public float mSixRestVolume;
/// <summary>
/// <para>
/// Inverse of the stiffness of the constraint
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L221">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:221</see>
/// <br/>
/// <c>float mCompliance = 0.0f</c>
/// </para>
/// </summary>
[FieldOffset(20)]
public float mCompliance;
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L312">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:312</see>
/// <br/>
/// <c>struct RodStretchShear</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// A discrete Cosserat rod connects two particles with a rigid rod that has fixed length and inertia.
/// A rod can be used instead of an Edge to constraint two vertices. The orientation of the rod can be
/// used to orient geometry attached to the rod (e.g. a plant leaf). Note that each rod needs to be constrained
/// by at least one RodBendTwist constraint in order to constrain the rotation of the rod. If you don't do
/// this then the orientation is likely to rotate around the rod axis with constant velocity.
/// Based on "Position and Orientation Based Cosserat Rods" - Kugelstadt and Schoemer - SIGGRAPH 2016
/// See: https://www.researchgate.net/publication/325597548_Position_and_Orientation_Based_Cosserat_Rods
/// </code>
/// </remarks>
[StructLayout(LayoutKind.Explicit, Size = 48)]
public struct RodStretchShear
{
/// <summary>
/// <para>
/// Indices of the vertices that form the rod
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L323">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:323</see>
/// <br/>
/// <c>uint32 mVertex[2]</c>
/// </para>
/// </summary>
[FieldOffset(0)]
public uint_2 mVertex;
/// <summary>
/// <para>
/// Fixed length of the rod, calculated by CalculateRodProperties
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L324">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:324</see>
/// <br/>
/// <c>float mLength = 1.0f</c>
/// </para>
/// </summary>
[FieldOffset(8)]
public float mLength;
/// <summary>
/// <para>
/// Inverse of the mass of the rod (0 for static rods), calculated by CalculateRodProperties but can be
/// overridden afterwards
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L325">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:325</see>
/// <br/>
/// <c>float mInvMass = 1.0f</c>
/// </para>
/// </summary>
[FieldOffset(12)]
public float mInvMass;
/// <summary>
/// <para>
/// Inverse of the stiffness of the rod
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L326">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:326</see>
/// <br/>
/// <c>float mCompliance = 0.0f</c>
/// </para>
/// </summary>
[FieldOffset(16)]
public float mCompliance;
/// <summary>
/// <para>
/// The Bishop frame of the rod (the rotation of the rod in its rest pose so that it has zero twist
/// towards adjacent rods), calculated by CalculateRodProperties
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L327">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:327</see>
/// <br/>
/// <c>Quat mBishop = Quat::sZero()</c>
/// </para>
/// </summary>
[FieldOffset(32)]
public floatQuat mBishop;
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L331">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:331</see>
/// <br/>
/// <c>struct RodBendTwist</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// A constraint that connects two Cosserat rods and limits bend and twist between the rods.
/// </para>
/// </remarks>
[StructLayout(LayoutKind.Explicit, Size = 32)]
public struct RodBendTwist
{
/// <summary>
/// <para>
/// Indices of rods that are constrained (index in mRodStretchShearConstraints)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L339">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:339</see>
/// <br/>
/// <c>uint32 mRod[2]</c>
/// </para>
/// </summary>
[FieldOffset(0)]
public uint_2 mRod;
/// <summary>
/// <para>
/// Inverse of the stiffness of the rod
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L340">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:340</see>
/// <br/>
/// <c>float mCompliance = 0.0f</c>
/// </para>
/// </summary>
[FieldOffset(8)]
public float mCompliance;
/// <summary>
/// <para>
/// The initial rotation between the rods: rod1.mBishop.Conjugated() * rod2.mBishop, calculated by
/// CalculateRodProperties
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L341">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:341</see>
/// <br/>
/// <c>Quat mOmega0 = Quat::sZero()</c>
/// </para>
/// </summary>
[FieldOffset(16)]
public floatQuat mOmega0;
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L366">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:366</see>
/// <br/>
/// <c>struct ClosestKinematic</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Tracks the closest kinematic vertex
/// </para>
/// </remarks>
[StructLayout(LayoutKind.Explicit, Size = 12)]
public struct ClosestKinematic
{
/// <summary>
/// <para>
/// Vertex index of closest kinematic vertex
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L368">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:368</see>
/// <br/>
/// <c>uint32 mVertex = 0xffffffff</c>
/// </para>
/// </summary>
[FieldOffset(0)]
public uint mVertex;
/// <summary>
/// <para>
/// Number of hops to the closest kinematic vertex
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L369">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:369</see>
/// <br/>
/// <c>uint32 mHops = 0xffffffff</c>
/// </para>
/// </summary>
[FieldOffset(4)]
public uint mHops;
/// <summary>
/// <para>
/// Distance to the closest kinematic vertex
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L370">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:370</see>
/// <br/>
/// <c>float mDistance = FLT_MAX</c>
/// </para>
/// </summary>
[FieldOffset(8)]
public float mDistance;
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L374">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:374</see>
/// <br/>
/// <c>struct UpdateGroup</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Tracks the end indices of the various constraint groups
/// </para>
/// </remarks>
[StructLayout(LayoutKind.Explicit, Size = 28)]
public struct UpdateGroup
{
/// <summary>
/// <para>
/// The end index of the edge constraints in this group
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L376">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:376</see>
/// <br/>
/// <c>uint mEdgeEndIndex</c>
/// </para>
/// </summary>
[FieldOffset(0)]
public uint mEdgeEndIndex;
/// <summary>
/// <para>
/// The end index of the LRA constraints in this group
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L377">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:377</see>
/// <br/>
/// <c>uint mLRAEndIndex</c>
/// </para>
/// </summary>
[FieldOffset(4)]
public uint mLRAEndIndex;
/// <summary>
/// <para>
/// The end index of the rod stretch shear constraints in this group
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L378">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:378</see>
/// <br/>
/// <c>uint mRodStretchShearEndIndex</c>
/// </para>
/// </summary>
[FieldOffset(8)]
public uint mRodStretchShearEndIndex;
/// <summary>
/// <para>
/// The end index of the rod bend twist constraints in this group
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L379">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:379</see>
/// <br/>
/// <c>uint mRodBendTwistEndIndex</c>
/// </para>
/// </summary>
[FieldOffset(12)]
public uint mRodBendTwistEndIndex;
/// <summary>
/// <para>
/// The end index of the dihedral bend constraints in this group
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L380">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:380</see>
/// <br/>
/// <c>uint mDihedralBendEndIndex</c>
/// </para>
/// </summary>
[FieldOffset(16)]
public uint mDihedralBendEndIndex;
/// <summary>
/// <para>
/// The end index of the volume constraints in this group
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L381">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:381</see>
/// <br/>
/// <c>uint mVolumeEndIndex</c>
/// </para>
/// </summary>
[FieldOffset(20)]
public uint mVolumeEndIndex;
/// <summary>
/// <para>
/// The end index of the skinned constraints in this group
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L382">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:382</see>
/// <br/>
/// <c>uint mSkinnedEndIndex</c>
/// </para>
/// </summary>
[FieldOffset(24)]
public uint mSkinnedEndIndex;
}
public static SoftBodySharedSettings Create() => Jolt.PInvoke.SoftBodySharedSettings_Create();
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L57">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:57</see>
/// <br/>
/// <c>void CreateConstraints(const VertexAttributes *inVertexAttributes, uint inVertexAttributesLength, EBendType inBendType = EBendType::Distance, float inAngleTolerance = DegreesToRadians(8.0f))</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Automatically create constraints based on the faces of the soft body
/// @param inVertexAttributes A list of attributes for each vertex (1-on-1 with mVertices, note that if the list is smaller than mVertices the last element will be repeated). This defines the properties of the constraints that are created.
/// @param inVertexAttributesLength The length of inVertexAttributes
/// @param inBendType The type of bend constraint to create
/// @param inAngleTolerance Shear edges are created when two connected triangles form a quad (are roughly in the same plane and form a square with roughly 90 degree angles). This defines the tolerance (in radians).
/// </code>
/// </remarks>
public unsafe void CreateConstraints(Ptr<SoftBodySharedSettings.VertexAttributes> vertexAttributes, uint vertexAttributesLength, SoftBodySharedSettings.EBendType bendType, float angleTolerance) => Jolt.PInvoke.SoftBodySharedSettings_CreateConstraints(this, vertexAttributes, vertexAttributesLength, bendType, angleTolerance);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L60">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:60</see>
/// <br/>
/// <c>void CalculateEdgeLengths()</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Calculate the initial lengths of all springs of the edges of this soft body (if you use
/// CreateConstraint, this is already done)
/// </para>
/// </remarks>
public void CalculateEdgeLengths() => Jolt.PInvoke.SoftBodySharedSettings_CalculateEdgeLengths(this);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L64">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:64</see>
/// <br/>
/// <c>void CalculateRodProperties()</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Calculate the properties of the rods
/// Note that this can swap mVertex of the RodStretchShear constraints if two rods are connected through a RodBendTwist constraint but point in opposite directions.
/// </code>
/// </remarks>
public void CalculateRodProperties() => Jolt.PInvoke.SoftBodySharedSettings_CalculateRodProperties(this);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L68">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:68</see>
/// <br/>
/// <c>void CalculateLRALengths(float inMaxDistanceMultiplier = 1.0f)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Calculate the max lengths for the long range attachment constraints based on Euclidean distance (if you use CreateConstraints, this is already done)
/// @param inMaxDistanceMultiplier Multiplier for the max distance of the LRA constraint, e.g. 1.01 means the max distance is 1% longer than the calculated distance in the rest pose.
/// </code>
/// </remarks>
public void CalculateLRALengths(float maxDistanceMultiplier) => Jolt.PInvoke.SoftBodySharedSettings_CalculateLRALengths(this, maxDistanceMultiplier);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L71">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:71</see>
/// <br/>
/// <c>void CalculateBendConstraintConstants()</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Calculate the constants for the bend constraints (if you use CreateConstraints, this is already done)
/// </para>
/// </remarks>
public void CalculateBendConstraintConstants() => Jolt.PInvoke.SoftBodySharedSettings_CalculateBendConstraintConstants(this);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L74">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:74</see>
/// <br/>
/// <c>void CalculateVolumeConstraintVolumes()</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Calculates the initial volume of all tetrahedra of this soft body
/// </para>
/// </remarks>
public void CalculateVolumeConstraintVolumes() => Jolt.PInvoke.SoftBodySharedSettings_CalculateVolumeConstraintVolumes(this);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L77">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:77</see>
/// <br/>
/// <c>void CalculateSkinnedConstraintNormals()</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Calculate information needed to be able to calculate the skinned constraint normals at run-time
/// </para>
/// </remarks>
public void CalculateSkinnedConstraintNormals() => Jolt.PInvoke.SoftBodySharedSettings_CalculateSkinnedConstraintNormals(this);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L96">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:96</see>
/// <br/>
/// <c>void Optimize()</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Optimize the soft body settings without results
/// </para>
/// </remarks>
public void Optimize() => Jolt.PInvoke.SoftBodySharedSettings_Optimize(this);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L99">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:99</see>
/// <br/>
/// <c>Ref&lt;SoftBodySharedSettings&gt; Clone() const</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Clone this object
/// </para>
/// </remarks>
public SoftBodySharedSettings Clone() => Jolt.PInvoke.SoftBodySharedSettings_Clone(this);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L102">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:102</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. Doesn't store the material list.
/// </para>
/// </remarks>
public void SaveBinaryState(StreamOut stream) => Jolt.PInvoke.SoftBodySharedSettings_SaveBinaryState(this, stream);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L105">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:105</see>
/// <br/>
/// <c>void RestoreBinaryState(StreamIn &amp;inStream)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Restore the state of this object from inStream. Doesn't restore the material list.
/// </para>
/// </remarks>
public void RestoreBinaryState(StreamIn stream) => Jolt.PInvoke.SoftBodySharedSettings_RestoreBinaryState(this, stream);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L124">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:124</see>
/// <br/>
/// <c>static Ref&lt;SoftBodySharedSettings&gt; sCreateCube(uint inGridSize, float inGridSpacing)</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// Create a cube. This can be used to create a simple soft body for testing purposes.
/// It will contain edge constraints, volume constraints and faces.
/// @param inGridSize Number of points along each axis
/// @param inGridSpacing Distance between points
/// </code>
/// </remarks>
public static SoftBodySharedSettings sCreateCube(uint gridSize, float gridSpacing) => Jolt.PInvoke.SoftBodySharedSettings_sCreateCube(gridSize, gridSpacing);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L345">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:345</see>
/// <br/>
/// <c>void AddFace(const Face &amp;inFace)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Add a face to this soft body
/// </para>
/// </remarks>
public void AddFace(ref SoftBodySharedSettings.Face face) => Jolt.PInvoke.SoftBodySharedSettings_AddFace(this, ref face);
public void AddRef() => Jolt.PInvoke.SoftBodySharedSettings_AddRef(this);
public void Release() => Jolt.PInvoke.SoftBodySharedSettings_Release(this);
public uint GetRefCount() => Jolt.PInvoke.SoftBodySharedSettings_GetRefCount(this);
public void Dispose()
{
if (IsNull()) return;
Release();
}
}
}