//
// 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
{
///
///
/// 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.
///
///
/// C++:
/// Jolt/Physics/SoftBody/SoftBodyVertex.h:15
///
/// class SoftBodyVertex
///
///
[StructLayout(LayoutKind.Explicit, Size = 80)]
public partial struct SoftBodyVertex
{
///
///
/// Internal use only. Position at the previous time step
///
///
/// C++:
/// Jolt/Physics/SoftBody/SoftBodyVertex.h:34
///
/// Vec3 mPreviousPosition
///
///
[FieldOffset(0)]
public float3 PreviousPosition;
///
///
/// Position, relative to the center of mass of the soft body
///
///
/// C++:
/// Jolt/Physics/SoftBody/SoftBodyVertex.h:35
///
/// Vec3 mPosition
///
///
[FieldOffset(16)]
public float3 Position;
///
///
/// Velocity, relative to the center of mass of the soft body
///
///
/// C++:
/// Jolt/Physics/SoftBody/SoftBodyVertex.h:36
///
/// Vec3 mVelocity
///
///
[FieldOffset(32)]
public float3 Velocity;
///
///
/// Internal use only. Nearest collision plane, relative to the center of mass of the soft body
///
///
/// C++:
/// Jolt/Physics/SoftBody/SoftBodyVertex.h:37
///
/// Plane mCollisionPlane
///
///
[FieldOffset(48)]
public Plane CollisionPlane;
///
///
/// Internal use only. Index in the colliding shapes list of the body we may collide with
///
///
/// C++:
/// Jolt/Physics/SoftBody/SoftBodyVertex.h:38
///
/// int mCollidingShapeIndex
///
///
[FieldOffset(64)]
public int CollidingShapeIndex;
///
///
/// True if the vertex has collided with anything in the last update
///
///
/// C++:
/// Jolt/Physics/SoftBody/SoftBodyVertex.h:39
///
/// bool mHasContact
///
///
[FieldOffset(68)]
public Brutal.Bool8 HasContact;
///
///
/// Internal use only. Used while finding the collision plane, stores the largest penetration found so far
///
///
/// C++:
/// Jolt/Physics/SoftBody/SoftBodyVertex.h:40
///
/// float mLargestPenetration
///
///
[FieldOffset(72)]
public float LargestPenetration;
///
///
/// Inverse mass (1 / mass)
///
///
/// C++:
/// Jolt/Physics/SoftBody/SoftBodyVertex.h:41
///
/// float mInvMass
///
///
[FieldOffset(76)]
public float InvMass;
///
///
/// Reset collision information to prepare for a new collision check
///
///
/// C++:
/// Jolt/Physics/SoftBody/SoftBodyVertex.h:19
///
/// inline void ResetCollision()
///
///
public void ResetCollision() => Jolt.PInvoke.SoftBodyVertex_ResetCollision(ref this);
///
///
/// Mark this vertex as being in contact with inBodyID
///
///
/// C++:
/// Jolt/Physics/SoftBody/SoftBodyVertex.h:27
///
/// inline void MarkCCDContact(const BodyID &inBodyID, const Plane &inContactPlane)
///
///
public void MarkCCDContact(uint bodyID, in Plane contactPlane) =>
Jolt.PInvoke.SoftBodyVertex_MarkCCDContact(ref this, bodyID, in contactPlane);
}
}