mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 12:38:24 +01:00
166 lines
6.7 KiB
C#
166 lines
6.7 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>
|
|
/// Run time information for a single particle of a soft body Note that at run-time you should only modify the
|
|
/// inverse mass and/or velocity of a vertex to control the soft body. Modifying the position can lead to missed
|
|
/// collisions. The other members are used internally by the soft body solver.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodyVertex.h#L15">Jolt/Physics/SoftBody/SoftBodyVertex.h:15</see>
|
|
/// <br/>
|
|
/// <c>class SoftBodyVertex</c>
|
|
/// </para>
|
|
/// </summary>
|
|
[StructLayout(LayoutKind.Explicit, Size = 80)]
|
|
public partial struct SoftBodyVertex
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// Internal use only. Position at the previous time step
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodyVertex.h#L34">Jolt/Physics/SoftBody/SoftBodyVertex.h:34</see>
|
|
/// <br/>
|
|
/// <c>Vec3 mPreviousPosition</c>
|
|
/// </para>
|
|
/// </summary>
|
|
[FieldOffset(0)]
|
|
public float3 PreviousPosition;
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Position, relative to the center of mass of the soft body
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodyVertex.h#L35">Jolt/Physics/SoftBody/SoftBodyVertex.h:35</see>
|
|
/// <br/>
|
|
/// <c>Vec3 mPosition</c>
|
|
/// </para>
|
|
/// </summary>
|
|
[FieldOffset(16)]
|
|
public float3 Position;
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Velocity, relative to the center of mass of the soft body
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodyVertex.h#L36">Jolt/Physics/SoftBody/SoftBodyVertex.h:36</see>
|
|
/// <br/>
|
|
/// <c>Vec3 mVelocity</c>
|
|
/// </para>
|
|
/// </summary>
|
|
[FieldOffset(32)]
|
|
public float3 Velocity;
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Internal use only. Nearest collision plane, relative to the center of mass of the soft body
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodyVertex.h#L37">Jolt/Physics/SoftBody/SoftBodyVertex.h:37</see>
|
|
/// <br/>
|
|
/// <c>Plane mCollisionPlane</c>
|
|
/// </para>
|
|
/// </summary>
|
|
[FieldOffset(48)]
|
|
public Plane CollisionPlane;
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Internal use only. Index in the colliding shapes list of the body we may collide with
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodyVertex.h#L38">Jolt/Physics/SoftBody/SoftBodyVertex.h:38</see>
|
|
/// <br/>
|
|
/// <c>int mCollidingShapeIndex</c>
|
|
/// </para>
|
|
/// </summary>
|
|
[FieldOffset(64)]
|
|
public int CollidingShapeIndex;
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// True if the vertex has collided with anything in the last update
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodyVertex.h#L39">Jolt/Physics/SoftBody/SoftBodyVertex.h:39</see>
|
|
/// <br/>
|
|
/// <c>bool mHasContact</c>
|
|
/// </para>
|
|
/// </summary>
|
|
[FieldOffset(68)]
|
|
public Brutal.Bool8 HasContact;
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Internal use only. Used while finding the collision plane, stores the largest penetration found so far
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodyVertex.h#L40">Jolt/Physics/SoftBody/SoftBodyVertex.h:40</see>
|
|
/// <br/>
|
|
/// <c>float mLargestPenetration</c>
|
|
/// </para>
|
|
/// </summary>
|
|
[FieldOffset(72)]
|
|
public float LargestPenetration;
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Inverse mass (1 / mass)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodyVertex.h#L41">Jolt/Physics/SoftBody/SoftBodyVertex.h:41</see>
|
|
/// <br/>
|
|
/// <c>float mInvMass</c>
|
|
/// </para>
|
|
/// </summary>
|
|
[FieldOffset(76)]
|
|
public float InvMass;
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Reset collision information to prepare for a new collision check
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodyVertex.h#L19">Jolt/Physics/SoftBody/SoftBodyVertex.h:19</see>
|
|
/// <br/>
|
|
/// <c>inline void ResetCollision()</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void ResetCollision() => Jolt.PInvoke.SoftBodyVertex_ResetCollision(ref this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Mark this vertex as being in contact with inBodyID
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/SoftBody/SoftBodyVertex.h#L27">Jolt/Physics/SoftBody/SoftBodyVertex.h:27</see>
|
|
/// <br/>
|
|
/// <c>inline void MarkCCDContact(const BodyID &inBodyID, const Plane &inContactPlane)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void MarkCCDContact(uint bodyID, in Plane contactPlane) =>
|
|
Jolt.PInvoke.SoftBodyVertex_MarkCCDContact(ref this, bodyID, in contactPlane);
|
|
}
|
|
}
|