brutal/Brutal.Jolt/Generated/Classes/SoftBodySharedSettings.gen.cs
Rian Drake b578433e37 first
2026-10-15 17:10:50 +13:00

1751 lines
80 KiB
C#

// <auto-generated/>
// 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
{
/// <summary>
/// <para>
/// 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.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/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>
[InteropHandle]
public readonly partial struct SoftBodySharedSettings : IDisposable
{
/// <summary>
/// <para>
/// Which type of bend constraint should be created
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L21">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:21</see>
/// <br/>
/// <c>enum class EBendType</c>
/// </para>
/// </summary>
public enum BendType : int
{
/// <summary>
/// <para>
/// No bend constraints will be created
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/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/e77f175595e64cb44218cc9d9d56fc365ad0e36a/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/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L25">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:25</see>
/// <br/>
/// <c>Dihedral</c>
/// </para>
/// </summary>
Dihedral,
}
/// <summary>
/// <para>
/// The type of long range attachment constraint to create
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L29">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:29</see>
/// <br/>
/// <c>enum class ELRAType</c>
/// </para>
/// </summary>
public enum LRAType : int
{
/// <summary>
/// <para>
/// Don't create a LRA constraint
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/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/e77f175595e64cb44218cc9d9d56fc365ad0e36a/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/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L33">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:33</see>
/// <br/>
/// <c>GeodesicDistance</c>
/// </para>
/// </summary>
GeodesicDistance,
}
/// <summary>
/// <para>
/// 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.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L39">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:39</see>
/// <br/>
/// <c>struct VertexAttributes</c>
/// </para>
/// </summary>
[StructLayout(LayoutKind.Explicit, Size = 20)]
public partial 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/e77f175595e64cb44218cc9d9d56fc365ad0e36a/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 Compliance;
/// <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/e77f175595e64cb44218cc9d9d56fc365ad0e36a/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 ShearCompliance;
/// <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/e77f175595e64cb44218cc9d9d56fc365ad0e36a/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 BendCompliance;
/// <summary>
/// <para>
/// The type of long range attachment constraint to create.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/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.LRAType LRAType;
/// <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/e77f175595e64cb44218cc9d9d56fc365ad0e36a/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 LRAMaxDistanceMultiplier;
}
/// <summary>
/// <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>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L127">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:127</see>
/// <br/>
/// <c>struct Vertex</c>
/// </para>
/// </summary>
[StructLayout(LayoutKind.Explicit, Size = 28)]
public partial struct Vertex
{
/// <summary>
/// <para>
/// Initial position of the vertex
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/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 Position;
/// <summary>
/// <para>
/// Initial velocity of the vertex
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/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 Velocity;
/// <summary>
/// <para>
/// Initial inverse of the mass of the vertex
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/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 InvMass;
}
/// <summary>
/// <para>
/// A face defines the surface of the body
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L141">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:141</see>
/// <br/>
/// <c>struct Face</c>
/// </para>
/// </summary>
[StructLayout(LayoutKind.Explicit, Size = 16)]
public partial struct Face
{
/// <summary>
/// <para>
/// Indices of the vertices that form the face
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/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 Vertex;
/// <summary>
/// <para>
/// Index of the material of the face in SoftBodySharedSettings::mMaterials
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/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 MaterialIndex;
}
/// <summary>
/// <para>
/// An edge keeps two vertices at a constant distance using a spring: |x1 - x2| = rest length
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L157">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:157</see>
/// <br/>
/// <c>struct Edge</c>
/// </para>
/// </summary>
[StructLayout(LayoutKind.Explicit, Size = 16)]
public partial struct Edge
{
/// <summary>
/// <para>
/// Indices of the vertices that form the edge
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/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 Vertex;
/// <summary>
/// <para>
/// Rest length of the spring, calculated by CalculateEdgeLengths
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/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 RestLength;
/// <summary>
/// <para>
/// Inverse of the stiffness of the spring
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/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 Compliance;
}
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/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 partial 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/e77f175595e64cb44218cc9d9d56fc365ad0e36a/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 Vertex;
/// <summary>
/// <para>
/// Inverse of the stiffness of the constraint
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/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 Compliance;
/// <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/e77f175595e64cb44218cc9d9d56fc365ad0e36a/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 InitialAngle;
}
/// <summary>
/// <para>
/// Volume constraint, keeps the volume of a tetrahedron constant
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L208">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:208</see>
/// <br/>
/// <c>struct Volume</c>
/// </para>
/// </summary>
[StructLayout(LayoutKind.Explicit, Size = 24)]
public partial struct Volume
{
/// <summary>
/// <para>
/// Indices of the vertices that form the tetrahedron
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/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 Vertex;
/// <summary>
/// <para>
/// 6 times the rest volume of the tetrahedron, calculated by CalculateVolumeConstraintVolumes
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/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 SixRestVolume;
/// <summary>
/// <para>
/// Inverse of the stiffness of the constraint
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/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 Compliance;
}
/// <summary>
/// <para>
/// An inverse bind matrix take a skinned vertex from its bind pose into joint local space
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L225">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:225</see>
/// <br/>
/// <c>class InvBind</c>
/// </para>
/// </summary>
[StructLayout(LayoutKind.Explicit, Size = 80)]
public partial struct InvBind
{
/// <summary>
/// <para>
/// Joint index to which this is attached
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L234">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:234</see>
/// <br/>
/// <c>uint32 mJointIndex = 0</c>
/// </para>
/// </summary>
[FieldOffset(0)]
public uint JointIndex;
/// <summary>
/// <para>
/// The inverse bind matrix, this takes a vertex in its bind pose (Vertex::mPosition) to joint local
/// space
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L235">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:235</see>
/// <br/>
/// <c>Mat44 mInvBind = Mat44::sIdentity()</c>
/// </para>
/// </summary>
[FieldOffset(16)]
public float4x4 mInvBind;
}
/// <summary>
/// <para>
/// A joint and its skin weight
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L239">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:239</see>
/// <br/>
/// <c>class SkinWeight</c>
/// </para>
/// </summary>
[StructLayout(LayoutKind.Explicit, Size = 8)]
public partial struct SkinWeight
{
/// <summary>
/// <para>
/// Index in mInvBindMatrices
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L248">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:248</see>
/// <br/>
/// <c>uint32 mInvBindIndex = 0</c>
/// </para>
/// </summary>
[FieldOffset(0)]
public uint InvBindIndex;
/// <summary>
/// <para>
/// Weight with which it is skinned
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L249">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:249</see>
/// <br/>
/// <c>float mWeight = 0.0f</c>
/// </para>
/// </summary>
[FieldOffset(4)]
public float Weight;
}
/// <summary>
/// <para>
/// A constraint that skins a vertex to joints and limits the distance that the simulated vertex can travel
/// from this vertex
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L253">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:253</see>
/// <br/>
/// <c>class Skinned</c>
/// </para>
/// </summary>
[StructLayout(LayoutKind.Explicit, Size = 52)]
public partial struct Skinned
{
/// <summary>
/// <para>
/// Index in mVertices which indicates which vertex is being skinned
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L279">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:279</see>
/// <br/>
/// <c>uint32 mVertex = 0</c>
/// </para>
/// </summary>
[FieldOffset(0)]
public uint Vertex;
/// <summary>
/// <para>
/// Skin weights, the bind pose of the vertex is assumed to be stored in Vertex::mPosition. The first
/// weight that is zero indicates the end of the list. Weights should add up to 1.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L280">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:280</see>
/// <br/>
/// <c>SkinWeight mWeights[cMaxSkinWeights]</c>
/// </para>
/// </summary>
[FieldOffset(4)]
public SkinWeight_4 Weights;
/// <summary>
/// <para>
/// Maximum distance that this vertex can reach from the skinned vertex, disabled when FLT_MAX. 0 when
/// you want to hard skin the vertex to the skinned vertex.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L281">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:281</see>
/// <br/>
/// <c>float mMaxDistance = FLT_MAX</c>
/// </para>
/// </summary>
[FieldOffset(36)]
public float MaxDistance;
/// <summary>
/// <para>
/// Disabled if mBackStopDistance &gt;= mMaxDistance. The faces surrounding mVertex determine an average
/// normal. mBackStopDistance behind the vertex in the opposite direction of this normal, the back stop
/// sphere starts. The simulated vertex will be pushed out of this sphere and it can be used to
/// approximate the volume of the skinned mesh behind the skinned vertex.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L282">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:282</see>
/// <br/>
/// <c>float mBackStopDistance = FLT_MAX</c>
/// </para>
/// </summary>
[FieldOffset(40)]
public float BackStopDistance;
/// <summary>
/// <para>
/// Radius of the backstop sphere. By default this is a fairly large radius so the sphere approximates a
/// plane.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L283">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:283</see>
/// <br/>
/// <c>float mBackStopRadius = 40.0f</c>
/// </para>
/// </summary>
[FieldOffset(44)]
public float BackStopRadius;
/// <summary>
/// <para>
/// Information needed to calculate the normal of this vertex, lowest 24 bit is start index in
/// mSkinnedConstraintNormals, highest 8 bit is number of faces (generated by
/// CalculateSkinnedConstraintNormals)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L284">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:284</see>
/// <br/>
/// <c>uint32 mNormalInfo = 0</c>
/// </para>
/// </summary>
[FieldOffset(48)]
public uint NormalInfo;
}
/// <summary>
/// <para>
/// 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
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L312">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:312</see>
/// <br/>
/// <c>struct RodStretchShear</c>
/// </para>
/// </summary>
[StructLayout(LayoutKind.Explicit, Size = 48)]
public partial struct RodStretchShear
{
/// <summary>
/// <para>
/// Indices of the vertices that form the rod
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/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 Vertex;
/// <summary>
/// <para>
/// Fixed length of the rod, calculated by CalculateRodProperties
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/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 Length;
/// <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/e77f175595e64cb44218cc9d9d56fc365ad0e36a/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 InvMass;
/// <summary>
/// <para>
/// Inverse of the stiffness of the rod
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/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 Compliance;
/// <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/e77f175595e64cb44218cc9d9d56fc365ad0e36a/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 Bishop;
}
/// <summary>
/// <para>
/// A constraint that connects two Cosserat rods and limits bend and twist between the rods.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L331">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:331</see>
/// <br/>
/// <c>struct RodBendTwist</c>
/// </para>
/// </summary>
[StructLayout(LayoutKind.Explicit, Size = 32)]
public partial struct RodBendTwist
{
/// <summary>
/// <para>
/// Indices of rods that are constrained (index in mRodStretchShearConstraints)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/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 Rod;
/// <summary>
/// <para>
/// Inverse of the stiffness of the rod
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/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 Compliance;
/// <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/e77f175595e64cb44218cc9d9d56fc365ad0e36a/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 Omega0;
}
/// <summary>
/// <para>
/// Tracks the closest kinematic vertex
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L366">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:366</see>
/// <br/>
/// <c>struct ClosestKinematic</c>
/// </para>
/// </summary>
[StructLayout(LayoutKind.Explicit, Size = 12)]
public partial struct ClosestKinematic
{
/// <summary>
/// <para>
/// Vertex index of closest kinematic vertex
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/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 Vertex;
/// <summary>
/// <para>
/// Number of hops to the closest kinematic vertex
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/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 Hops;
/// <summary>
/// <para>
/// Distance to the closest kinematic vertex
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/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 Distance;
}
/// <summary>
/// <para>
/// Tracks the end indices of the various constraint groups
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L374">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:374</see>
/// <br/>
/// <c>struct UpdateGroup</c>
/// </para>
/// </summary>
[StructLayout(LayoutKind.Explicit, Size = 28)]
public partial 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/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L376">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:376</see>
/// <br/>
/// <c>uint mEdgeEndIndex</c>
/// </para>
/// </summary>
[FieldOffset(0)]
public uint EdgeEndIndex;
/// <summary>
/// <para>
/// The end index of the LRA constraints in this group
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L377">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:377</see>
/// <br/>
/// <c>uint mLRAEndIndex</c>
/// </para>
/// </summary>
[FieldOffset(4)]
public uint LRAEndIndex;
/// <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/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L378">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:378</see>
/// <br/>
/// <c>uint mRodStretchShearEndIndex</c>
/// </para>
/// </summary>
[FieldOffset(8)]
public uint RodStretchShearEndIndex;
/// <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/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L379">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:379</see>
/// <br/>
/// <c>uint mRodBendTwistEndIndex</c>
/// </para>
/// </summary>
[FieldOffset(12)]
public uint RodBendTwistEndIndex;
/// <summary>
/// <para>
/// The end index of the dihedral bend constraints in this group
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L380">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:380</see>
/// <br/>
/// <c>uint mDihedralBendEndIndex</c>
/// </para>
/// </summary>
[FieldOffset(16)]
public uint DihedralBendEndIndex;
/// <summary>
/// <para>
/// The end index of the volume constraints in this group
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L381">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:381</see>
/// <br/>
/// <c>uint mVolumeEndIndex</c>
/// </para>
/// </summary>
[FieldOffset(20)]
public uint VolumeEndIndex;
/// <summary>
/// <para>
/// The end index of the skinned constraints in this group
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L382">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:382</see>
/// <br/>
/// <c>uint mSkinnedEndIndex</c>
/// </para>
/// </summary>
[FieldOffset(24)]
public uint SkinnedEndIndex;
}
public static SoftBodySharedSettings Create() => Jolt.PInvoke.SoftBodySharedSettings_Create();
/// <summary>
/// <para>
/// Automatically create constraints based on the faces of the soft body
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/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>
/// <para>
/// vertexAttributes is the buffer the native call reads, and its element count travels with it: the span is
/// only read, and it is only read for the duration of the call.
/// </para>
/// </remarks>
public unsafe void CreateConstraints(
ReadOnlySpan<SoftBodySharedSettings.VertexAttributes> vertexAttributes,
SoftBodySharedSettings.BendType bendType = SoftBodySharedSettings.BendType.Distance,
float angleTolerance = 0.13962634f
)
{
fixed (SoftBodySharedSettings.VertexAttributes* vertexAttributes_fixed = vertexAttributes)
{
Jolt.PInvoke.SoftBodySharedSettings_CreateConstraints(
this,
vertexAttributes_fixed,
(uint)vertexAttributes.Length,
bendType,
angleTolerance
);
}
}
/// <summary>
/// <para>
/// Calculate the initial lengths of all springs of the edges of this soft body (if you use
/// CreateConstraint, this is already done)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L60">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:60</see>
/// <br/>
/// <c>void CalculateEdgeLengths()</c>
/// </para>
/// </summary>
public void CalculateEdgeLengths() => Jolt.PInvoke.SoftBodySharedSettings_CalculateEdgeLengths(this);
/// <summary>
/// <para>
/// 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.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L64">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:64</see>
/// <br/>
/// <c>void CalculateRodProperties()</c>
/// </para>
/// </summary>
public void CalculateRodProperties() => Jolt.PInvoke.SoftBodySharedSettings_CalculateRodProperties(this);
/// <summary>
/// <para>
/// Calculate the max lengths for the long range attachment constraints based on Euclidean distance (if you
/// use CreateConstraints, this is already done)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/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 = 1f) =>
Jolt.PInvoke.SoftBodySharedSettings_CalculateLRALengths(this, maxDistanceMultiplier);
/// <summary>
/// <para>
/// Calculate the constants for the bend constraints (if you use CreateConstraints, this is already done)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L71">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:71</see>
/// <br/>
/// <c>void CalculateBendConstraintConstants()</c>
/// </para>
/// </summary>
public void CalculateBendConstraintConstants() =>
Jolt.PInvoke.SoftBodySharedSettings_CalculateBendConstraintConstants(this);
/// <summary>
/// <para>
/// Calculates the initial volume of all tetrahedra of this soft body
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L74">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:74</see>
/// <br/>
/// <c>void CalculateVolumeConstraintVolumes()</c>
/// </para>
/// </summary>
public void CalculateVolumeConstraintVolumes() =>
Jolt.PInvoke.SoftBodySharedSettings_CalculateVolumeConstraintVolumes(this);
/// <summary>
/// <para>
/// Calculate information needed to be able to calculate the skinned constraint normals at run-time
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L77">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:77</see>
/// <br/>
/// <c>void CalculateSkinnedConstraintNormals()</c>
/// </para>
/// </summary>
public void CalculateSkinnedConstraintNormals() =>
Jolt.PInvoke.SoftBodySharedSettings_CalculateSkinnedConstraintNormals(this);
/// <summary>
/// <para>
/// Optimize the soft body settings without results
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L96">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:96</see>
/// <br/>
/// <c>void Optimize()</c>
/// </para>
/// </summary>
public void Optimize() => Jolt.PInvoke.SoftBodySharedSettings_Optimize(this);
/// <summary>
/// <para>
/// Clone this object
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/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>
/// The returned handle carries its own reference; Dispose it once when you're done.
/// </para>
/// </remarks>
public SoftBodySharedSettings Clone() => Jolt.PInvoke.SoftBodySharedSettings_Clone(this);
/// <summary>
/// <para>
/// Saves the state of this object in binary form to inStream. Doesn't store the material list.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L102">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:102</see>
/// <br/>
/// <c>void SaveBinaryState(StreamOut &amp;inStream) const</c>
/// </para>
/// </summary>
public void SaveBinaryState(StreamOut stream) =>
Jolt.PInvoke.SoftBodySharedSettings_SaveBinaryState(this, stream);
/// <summary>
/// <para>
/// Restore the state of this object from inStream. Doesn't restore the material list.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L105">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:105</see>
/// <br/>
/// <c>void RestoreBinaryState(StreamIn &amp;inStream)</c>
/// </para>
/// </summary>
public void RestoreBinaryState(StreamIn stream) =>
Jolt.PInvoke.SoftBodySharedSettings_RestoreBinaryState(this, stream);
/// <summary>
/// <para>
/// Save this shared settings and its materials. Pass in an empty map ioSettingsMap / ioMaterialMap or reuse
/// the same map while saving multiple settings objects to the same stream in order to avoid writing
/// duplicates.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L113">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:113</see>
/// <br/>
/// <c>void SaveWithMaterials(StreamOut &amp;inStream, SharedSettingsToIDMap &amp;ioSettingsMap, MaterialToIDMap &amp;ioMaterialMap) const</c>
/// </para>
/// </summary>
public void SaveWithMaterials(
StreamOut stream,
SharedSettingsToIDMap settingsMap,
MaterialToIDMap materialMap
) => Jolt.PInvoke.SoftBodySharedSettings_SaveWithMaterials(this, stream, settingsMap, materialMap);
/// <summary>
/// <para>
/// Restore a shape and materials. Pass in an empty map in ioSettingsMap / ioMaterialMap or reuse the same
/// map while reading multiple settings objects from the same stream in order to restore duplicates.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L118">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:118</see>
/// <br/>
/// <c>static SettingsResult sRestoreWithMaterials(StreamIn &amp;inStream, IDToSharedSettingsMap &amp;ioSettingsMap, IDToMaterialMap &amp;ioMaterialMap)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Throws JoltException with Jolt's error message when the operation fails.
/// </para>
/// </remarks>
public static SoftBodySharedSettings RestoreWithMaterials(
StreamIn stream,
IDToSharedSettingsMap settingsMap,
IDToMaterialMap materialMap
)
{
var _handle = Jolt.PInvoke.SoftBodySharedSettings_RestoreWithMaterials(stream, settingsMap, materialMap);
if (_handle.IsNull())
throw JoltException.FromLastError();
return _handle;
}
/// <summary>
/// <para>
/// 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.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/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>
/// <para>
/// The returned handle carries its own reference; Dispose it once when you're done.
/// </para>
/// </remarks>
public static SoftBodySharedSettings CreateCube(uint gridSize, float gridSpacing) =>
Jolt.PInvoke.SoftBodySharedSettings_CreateCube(gridSize, gridSpacing);
/// <summary>
/// <para>
/// Add a face to this soft body
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L345">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:345</see>
/// <br/>
/// <c>void AddFace(const Face &amp;inFace)</c>
/// </para>
/// </summary>
public void AddFace(in SoftBodySharedSettings.Face face) =>
Jolt.PInvoke.SoftBodySharedSettings_AddFace(this, in face);
/// <summary>
/// <para>
/// The list of vertices or particles of the body
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L347">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:347</see>
/// <br/>
/// <c>Array&lt;Vertex&gt; mVertices</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// The span is a view of the container's own storage, not a copy: edits land in the object that owns it.
/// It's only valid until that container is resized or its owner is destroyed.
/// </para>
/// </remarks>
[return: Brutal.Attributes.Fixed]
public unsafe Span<SoftBodySharedSettings.Vertex> GetVertices()
{
Jolt.PInvoke.SoftBodySharedSettings_GetVertices(this, out var _outResult);
return new Span<SoftBodySharedSettings.Vertex>((void*)_outResult.Data, checked((int)_outResult.Count));
}
/// <summary>
/// <para>
/// The list of vertices or particles of the body
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L347">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:347</see>
/// <br/>
/// <c>Array&lt;Vertex&gt; mVertices</c>
/// </para>
/// </summary>
public unsafe void SetVertices(ReadOnlySpan<SoftBodySharedSettings.Vertex> value)
{
fixed (SoftBodySharedSettings.Vertex* value_fixed = value)
{
Jolt.PInvoke.SoftBodySharedSettings_SetVertices(this, value_fixed, (nuint)value.Length);
}
}
/// <summary>
/// <para>
/// The list of faces of the body
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L348">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:348</see>
/// <br/>
/// <c>Array&lt;Face&gt; mFaces</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// The span is a view of the container's own storage, not a copy: edits land in the object that owns it.
/// It's only valid until that container is resized or its owner is destroyed.
/// </para>
/// </remarks>
[return: Brutal.Attributes.Fixed]
public unsafe Span<SoftBodySharedSettings.Face> GetFaces()
{
Jolt.PInvoke.SoftBodySharedSettings_GetFaces(this, out var _outResult);
return new Span<SoftBodySharedSettings.Face>((void*)_outResult.Data, checked((int)_outResult.Count));
}
/// <summary>
/// <para>
/// The list of faces of the body
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L348">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:348</see>
/// <br/>
/// <c>Array&lt;Face&gt; mFaces</c>
/// </para>
/// </summary>
public unsafe void SetFaces(ReadOnlySpan<SoftBodySharedSettings.Face> value)
{
fixed (SoftBodySharedSettings.Face* value_fixed = value)
{
Jolt.PInvoke.SoftBodySharedSettings_SetFaces(this, value_fixed, (nuint)value.Length);
}
}
/// <summary>
/// <para>
/// The list of edges or springs of the body
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L349">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:349</see>
/// <br/>
/// <c>Array&lt;Edge&gt; mEdgeConstraints</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// The span is a view of the container's own storage, not a copy: edits land in the object that owns it.
/// It's only valid until that container is resized or its owner is destroyed.
/// </para>
/// </remarks>
[return: Brutal.Attributes.Fixed]
public unsafe Span<SoftBodySharedSettings.Edge> GetEdgeConstraints()
{
Jolt.PInvoke.SoftBodySharedSettings_GetEdgeConstraints(this, out var _outResult);
return new Span<SoftBodySharedSettings.Edge>((void*)_outResult.Data, checked((int)_outResult.Count));
}
/// <summary>
/// <para>
/// The list of edges or springs of the body
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L349">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:349</see>
/// <br/>
/// <c>Array&lt;Edge&gt; mEdgeConstraints</c>
/// </para>
/// </summary>
public unsafe void SetEdgeConstraints(ReadOnlySpan<SoftBodySharedSettings.Edge> value)
{
fixed (SoftBodySharedSettings.Edge* value_fixed = value)
{
Jolt.PInvoke.SoftBodySharedSettings_SetEdgeConstraints(this, value_fixed, (nuint)value.Length);
}
}
/// <summary>
/// <para>
/// The list of dihedral bend constraints of the body
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L350">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:350</see>
/// <br/>
/// <c>Array&lt;DihedralBend&gt; mDihedralBendConstraints</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// The span is a view of the container's own storage, not a copy: edits land in the object that owns it.
/// It's only valid until that container is resized or its owner is destroyed.
/// </para>
/// </remarks>
[return: Brutal.Attributes.Fixed]
public unsafe Span<SoftBodySharedSettings.DihedralBend> GetDihedralBendConstraints()
{
Jolt.PInvoke.SoftBodySharedSettings_GetDihedralBendConstraints(this, out var _outResult);
return new Span<SoftBodySharedSettings.DihedralBend>(
(void*)_outResult.Data,
checked((int)_outResult.Count)
);
}
/// <summary>
/// <para>
/// The list of dihedral bend constraints of the body
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L350">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:350</see>
/// <br/>
/// <c>Array&lt;DihedralBend&gt; mDihedralBendConstraints</c>
/// </para>
/// </summary>
public unsafe void SetDihedralBendConstraints(ReadOnlySpan<SoftBodySharedSettings.DihedralBend> value)
{
fixed (SoftBodySharedSettings.DihedralBend* value_fixed = value)
{
Jolt.PInvoke.SoftBodySharedSettings_SetDihedralBendConstraints(this, value_fixed, (nuint)value.Length);
}
}
/// <summary>
/// <para>
/// The list of volume constraints of the body that keep the volume of tetrahedra in the soft body constant
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L351">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:351</see>
/// <br/>
/// <c>Array&lt;Volume&gt; mVolumeConstraints</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// The span is a view of the container's own storage, not a copy: edits land in the object that owns it.
/// It's only valid until that container is resized or its owner is destroyed.
/// </para>
/// </remarks>
[return: Brutal.Attributes.Fixed]
public unsafe Span<SoftBodySharedSettings.Volume> GetVolumeConstraints()
{
Jolt.PInvoke.SoftBodySharedSettings_GetVolumeConstraints(this, out var _outResult);
return new Span<SoftBodySharedSettings.Volume>((void*)_outResult.Data, checked((int)_outResult.Count));
}
/// <summary>
/// <para>
/// The list of volume constraints of the body that keep the volume of tetrahedra in the soft body constant
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L351">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:351</see>
/// <br/>
/// <c>Array&lt;Volume&gt; mVolumeConstraints</c>
/// </para>
/// </summary>
public unsafe void SetVolumeConstraints(ReadOnlySpan<SoftBodySharedSettings.Volume> value)
{
fixed (SoftBodySharedSettings.Volume* value_fixed = value)
{
Jolt.PInvoke.SoftBodySharedSettings_SetVolumeConstraints(this, value_fixed, (nuint)value.Length);
}
}
/// <summary>
/// <para>
/// The list of vertices that are constrained to a skinned vertex
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L352">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:352</see>
/// <br/>
/// <c>Array&lt;Skinned&gt; mSkinnedConstraints</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// The span is a view of the container's own storage, not a copy: edits land in the object that owns it.
/// It's only valid until that container is resized or its owner is destroyed.
/// </para>
/// </remarks>
[return: Brutal.Attributes.Fixed]
public unsafe Span<SoftBodySharedSettings.Skinned> GetSkinnedConstraints()
{
Jolt.PInvoke.SoftBodySharedSettings_GetSkinnedConstraints(this, out var _outResult);
return new Span<SoftBodySharedSettings.Skinned>((void*)_outResult.Data, checked((int)_outResult.Count));
}
/// <summary>
/// <para>
/// The list of vertices that are constrained to a skinned vertex
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L352">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:352</see>
/// <br/>
/// <c>Array&lt;Skinned&gt; mSkinnedConstraints</c>
/// </para>
/// </summary>
public unsafe void SetSkinnedConstraints(ReadOnlySpan<SoftBodySharedSettings.Skinned> value)
{
fixed (SoftBodySharedSettings.Skinned* value_fixed = value)
{
Jolt.PInvoke.SoftBodySharedSettings_SetSkinnedConstraints(this, value_fixed, (nuint)value.Length);
}
}
/// <summary>
/// <para>
/// The list of inverse bind matrices for skinning vertices
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L353">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:353</see>
/// <br/>
/// <c>Array&lt;InvBind&gt; mInvBindMatrices</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// The span is a view of the container's own storage, not a copy, so it costs nothing to take. It's only
/// valid until that container is resized or its owner is destroyed.
/// </para>
/// </remarks>
[return: Brutal.Attributes.Fixed]
public unsafe ReadOnlySpan<SoftBodySharedSettings.InvBind> GetInvBindMatrices()
{
Jolt.PInvoke.SoftBodySharedSettings_GetInvBindMatrices(this, out var _outResult);
return new ReadOnlySpan<SoftBodySharedSettings.InvBind>(
(void*)_outResult.Data,
checked((int)_outResult.Count)
);
}
/// <summary>
/// <para>
/// The list of inverse bind matrices for skinning vertices
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L353">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:353</see>
/// <br/>
/// <c>Array&lt;InvBind&gt; mInvBindMatrices</c>
/// </para>
/// </summary>
public unsafe void SetInvBindMatrices(ReadOnlySpan<SoftBodySharedSettings.InvBind> value)
{
fixed (SoftBodySharedSettings.InvBind* value_fixed = value)
{
Jolt.PInvoke.SoftBodySharedSettings_SetInvBindMatrices(this, value_fixed, (nuint)value.Length);
}
}
/// <summary>
/// <para>
/// The list of Cosserat rod constraints that connect two vertices and that limit stretch and shear
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L355">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:355</see>
/// <br/>
/// <c>Array&lt;RodStretchShear&gt; mRodStretchShearConstraints</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// The span is a view of the container's own storage, not a copy, so it costs nothing to take. It's only
/// valid until that container is resized or its owner is destroyed.
/// </para>
/// </remarks>
[return: Brutal.Attributes.Fixed]
public unsafe ReadOnlySpan<SoftBodySharedSettings.RodStretchShear> GetRodStretchShearConstraints()
{
Jolt.PInvoke.SoftBodySharedSettings_GetRodStretchShearConstraints(this, out var _outResult);
return new ReadOnlySpan<SoftBodySharedSettings.RodStretchShear>(
(void*)_outResult.Data,
checked((int)_outResult.Count)
);
}
/// <summary>
/// <para>
/// The list of Cosserat rod constraints that connect two vertices and that limit stretch and shear
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L355">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:355</see>
/// <br/>
/// <c>Array&lt;RodStretchShear&gt; mRodStretchShearConstraints</c>
/// </para>
/// </summary>
public unsafe void SetRodStretchShearConstraints(ReadOnlySpan<SoftBodySharedSettings.RodStretchShear> value)
{
fixed (SoftBodySharedSettings.RodStretchShear* value_fixed = value)
{
Jolt.PInvoke.SoftBodySharedSettings_SetRodStretchShearConstraints(
this,
value_fixed,
(nuint)value.Length
);
}
}
/// <summary>
/// <para>
/// The list of Cosserat rod constraints that connect two rods and limit the bend and twist
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L356">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:356</see>
/// <br/>
/// <c>Array&lt;RodBendTwist&gt; mRodBendTwistConstraints</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// The span is a view of the container's own storage, not a copy, so it costs nothing to take. It's only
/// valid until that container is resized or its owner is destroyed.
/// </para>
/// </remarks>
[return: Brutal.Attributes.Fixed]
public unsafe ReadOnlySpan<SoftBodySharedSettings.RodBendTwist> GetRodBendTwistConstraints()
{
Jolt.PInvoke.SoftBodySharedSettings_GetRodBendTwistConstraints(this, out var _outResult);
return new ReadOnlySpan<SoftBodySharedSettings.RodBendTwist>(
(void*)_outResult.Data,
checked((int)_outResult.Count)
);
}
/// <summary>
/// <para>
/// The list of Cosserat rod constraints that connect two rods and limit the bend and twist
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L356">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:356</see>
/// <br/>
/// <c>Array&lt;RodBendTwist&gt; mRodBendTwistConstraints</c>
/// </para>
/// </summary>
public unsafe void SetRodBendTwistConstraints(ReadOnlySpan<SoftBodySharedSettings.RodBendTwist> value)
{
fixed (SoftBodySharedSettings.RodBendTwist* value_fixed = value)
{
Jolt.PInvoke.SoftBodySharedSettings_SetRodBendTwistConstraints(this, value_fixed, (nuint)value.Length);
}
}
/// <summary>
/// <para>
/// The materials of the faces of the body, referenced by Face::mMaterialIndex
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L357">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:357</see>
/// <br/>
/// <c>PhysicsMaterialList mMaterials { PhysicsMaterial::sDefault }</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Returns an owned native buffer - read it through AsSpan() and Dispose it when you are done with it. The
/// handles in it are borrowed views into the buffer: they stay valid until Dispose and must not be disposed
/// themselves.
/// </para>
/// </remarks>
public NativeArray<PhysicsMaterial> GetMaterials() =>
new NativeArray<PhysicsMaterial>(Jolt.PInvoke.SoftBodySharedSettings_GetMaterials(this));
/// <summary>
/// <para>
/// The materials of the faces of the body, referenced by Face::mMaterialIndex
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodySharedSettings.h#L357">Jolt/Physics/SoftBody/SoftBodySharedSettings.h:357</see>
/// <br/>
/// <c>PhysicsMaterialList mMaterials { PhysicsMaterial::sDefault }</c>
/// </para>
/// </summary>
public unsafe void SetMaterials(ReadOnlySpan<PhysicsMaterial> value)
{
fixed (PhysicsMaterial* value_fixed = value)
{
Jolt.PInvoke.SoftBodySharedSettings_SetMaterials(this, value_fixed, (nuint)value.Length);
}
}
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();
}
}
}