// // 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 { /// /// /// The Body class only keeps track of state for static bodies, the MotionProperties class keeps the additional /// state needed for a moving Body. It has a 1-on-1 relationship with the body. /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:28 ///
/// class MotionProperties ///
///
[InteropHandle] public readonly partial struct MotionProperties { /// /// /// Motion quality, or how well it detects collisions when it has a high velocity /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:34 ///
/// EMotionQuality GetMotionQuality() const ///
///
public MotionQuality GetMotionQuality() => Jolt.PInvoke.MotionProperties_GetMotionQuality(this); /// /// /// Get the allowed degrees of freedom that this body has (this can be changed by calling SetMassProperties) /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:37 ///
/// inline EAllowedDOFs GetAllowedDOFs() const ///
///
public AllowedDOFs GetAllowedDOFs() => Jolt.PInvoke.MotionProperties_GetAllowedDOFs(this); /// /// /// If this body can go to sleep. /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:40 ///
/// inline bool GetAllowSleeping() const ///
///
public bool GetAllowSleeping() => Jolt.PInvoke.MotionProperties_GetAllowSleeping(this); /// /// /// Get world space linear velocity of the center of mass /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:43 ///
/// inline Vec3 GetLinearVelocity() const ///
///
public float3 GetLinearVelocity() => Jolt.PInvoke.MotionProperties_GetLinearVelocity(this); /// /// /// Set world space linear velocity of the center of mass. Note that it is illegal to set a non-zero linear /// velocity on a sleeping body without waking it up afterwards. If you want the body to wake up when it is /// sleeping, use BodyInterface::SetLinearVelocity instead. /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:48 ///
/// void SetLinearVelocity(Vec3Arg inLinearVelocity) ///
///
public void SetLinearVelocity(float3 linearVelocity) => Jolt.PInvoke.MotionProperties_SetLinearVelocity(this, linearVelocity); /// /// /// Set world space linear velocity of the center of mass, will make sure the value is clamped against the /// maximum linear velocity. Note that it is illegal to set a non-zero linear velocity on a sleeping body /// without waking it up afterwards. If you want the body to wake up when it is sleeping, use /// BodyInterface::SetLinearVelocity instead. /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:53 ///
/// void SetLinearVelocityClamped(Vec3Arg inLinearVelocity) ///
///
public void SetLinearVelocityClamped(float3 linearVelocity) => Jolt.PInvoke.MotionProperties_SetLinearVelocityClamped(this, linearVelocity); /// /// /// Get world space angular velocity of the center of mass /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:56 ///
/// inline Vec3 GetAngularVelocity() const ///
///
public float3 GetAngularVelocity() => Jolt.PInvoke.MotionProperties_GetAngularVelocity(this); /// /// /// Set world space angular velocity of the center of mass. Note that it is illegal to set a non-zero /// angular velocity on a sleeping body without waking it up afterwards. If you want the body to wake up /// when it is sleeping, use BodyInterface::SetAngularVelocity instead. /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:61 ///
/// void SetAngularVelocity(Vec3Arg inAngularVelocity) ///
///
public void SetAngularVelocity(float3 angularVelocity) => Jolt.PInvoke.MotionProperties_SetAngularVelocity(this, angularVelocity); /// /// /// Set world space angular velocity of the center of mass, will make sure the value is clamped against the /// maximum angular velocity. Note that it is illegal to set a non-zero angular velocity on a sleeping body /// without waking it up afterwards. If you want the body to wake up when it is sleeping, use /// BodyInterface::SetAngularVelocity instead. /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:66 ///
/// void SetAngularVelocityClamped(Vec3Arg inAngularVelocity) ///
///
public void SetAngularVelocityClamped(float3 angularVelocity) => Jolt.PInvoke.MotionProperties_SetAngularVelocityClamped(this, angularVelocity); /// /// /// Set velocity of body such that it will be rotate/translate by inDeltaPosition/Rotation in inDeltaTime /// seconds. Note that it is illegal to provide non-zero delta position/rotation on a sleeping body without /// waking it up afterwards. If you want the body to wake up when it is sleeping, use /// BodyInterface::MoveKinematic instead. /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:71 ///
/// inline void MoveKinematic(Vec3Arg inDeltaPosition, QuatArg inDeltaRotation, float inDeltaTime) ///
///
public void MoveKinematic(float3 deltaPosition, floatQuat deltaRotation, float deltaTime) => Jolt.PInvoke.MotionProperties_MoveKinematic(this, deltaPosition, deltaRotation, deltaTime); /// /// /// Maximum linear velocity that a body can achieve. Used to prevent the system from exploding. /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:77 ///
/// inline float GetMaxLinearVelocity() const ///
///
public float GetMaxLinearVelocity() => Jolt.PInvoke.MotionProperties_GetMaxLinearVelocity(this); /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:78 ///
/// inline void SetMaxLinearVelocity(float inLinearVelocity) ///
///
public void SetMaxLinearVelocity(float linearVelocity) => Jolt.PInvoke.MotionProperties_SetMaxLinearVelocity(this, linearVelocity); /// /// /// Maximum angular velocity that a body can achieve. Used to prevent the system from exploding. /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:81 ///
/// inline float GetMaxAngularVelocity() const ///
///
public float GetMaxAngularVelocity() => Jolt.PInvoke.MotionProperties_GetMaxAngularVelocity(this); /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:82 ///
/// inline void SetMaxAngularVelocity(float inAngularVelocity) ///
///
public void SetMaxAngularVelocity(float angularVelocity) => Jolt.PInvoke.MotionProperties_SetMaxAngularVelocity(this, angularVelocity); /// /// /// Clamp velocity according to limit /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:86 ///
/// inline void ClampLinearVelocity() ///
///
public void ClampLinearVelocity() => Jolt.PInvoke.MotionProperties_ClampLinearVelocity(this); /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:87 ///
/// inline void ClampAngularVelocity() ///
///
public void ClampAngularVelocity() => Jolt.PInvoke.MotionProperties_ClampAngularVelocity(this); /// /// /// Get linear damping: dv/dt = -c * v. c. Value should be zero or positive and is usually close to 0. /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:90 ///
/// inline float GetLinearDamping() const ///
///
public float GetLinearDamping() => Jolt.PInvoke.MotionProperties_GetLinearDamping(this); /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:91 ///
/// void SetLinearDamping(float inLinearDamping) ///
///
public void SetLinearDamping(float linearDamping) => Jolt.PInvoke.MotionProperties_SetLinearDamping(this, linearDamping); /// /// /// Get angular damping: dw/dt = -c * w. c. Value should be zero or positive and is usually close to 0. /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:94 ///
/// inline float GetAngularDamping() const ///
///
public float GetAngularDamping() => Jolt.PInvoke.MotionProperties_GetAngularDamping(this); /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:95 ///
/// void SetAngularDamping(float inAngularDamping) ///
///
public void SetAngularDamping(float angularDamping) => Jolt.PInvoke.MotionProperties_SetAngularDamping(this, angularDamping); /// /// /// Get gravity factor (1 = normal gravity, 0 = no gravity) /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:98 ///
/// inline float GetGravityFactor() const ///
///
public float GetGravityFactor() => Jolt.PInvoke.MotionProperties_GetGravityFactor(this); /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:99 ///
/// void SetGravityFactor(float inGravityFactor) ///
///
public void SetGravityFactor(float gravityFactor) => Jolt.PInvoke.MotionProperties_SetGravityFactor(this, gravityFactor); /// /// /// Set the mass and inertia tensor /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:102 ///
/// void SetMassProperties(EAllowedDOFs inAllowedDOFs, const MassProperties &inMassProperties) ///
///
public void SetMassProperties(AllowedDOFs allowedDOFs, MassProperties massProperties) => Jolt.PInvoke.MotionProperties_SetMassProperties(this, allowedDOFs, massProperties); /// /// /// Get inverse mass (1 / mass). Should only be called on a dynamic object (static or kinematic bodies have /// infinite mass so should be treated as 1 / mass = 0) /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:105 ///
/// inline float GetInverseMass() const ///
///
public float GetInverseMass() => Jolt.PInvoke.MotionProperties_GetInverseMass(this); /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:106 ///
/// inline float GetInverseMassUnchecked() const ///
///
public float GetInverseMassUnchecked() => Jolt.PInvoke.MotionProperties_GetInverseMassUnchecked(this); /// /// /// Set the inverse mass (1 / mass). Note that mass and inertia are linearly related (e.g. inertia of a /// sphere with mass m and radius r is \f$2/5 \: m \: r^2\f$). If you change mass, inertia should probably /// change as well. You can use ScaleToMass to update mass and inertia at the same time. If all your /// translation degrees of freedom are restricted, make sure this is zero (see EAllowedDOFs). /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:112 ///
/// void SetInverseMass(float inInverseMass) ///
///
public void SetInverseMass(float inverseMass) => Jolt.PInvoke.MotionProperties_SetInverseMass(this, inverseMass); /// /// /// Diagonal of inverse inertia matrix: D. Should only be called on a dynamic object (static or kinematic /// bodies have infinite mass so should be treated as D = 0) /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:115 ///
/// inline Vec3 GetInverseInertiaDiagonal() const ///
///
public float3 GetInverseInertiaDiagonal() => Jolt.PInvoke.MotionProperties_GetInverseInertiaDiagonal(this); /// /// /// Rotation (R) that takes inverse inertia diagonal to local space: \f$I_{body}^{-1} = R \: D \: R^{-1}\f$ /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:118 ///
/// inline Quat GetInertiaRotation() const ///
///
public floatQuat GetInertiaRotation() => Jolt.PInvoke.MotionProperties_GetInertiaRotation(this); /// /// /// Set the inverse inertia tensor in local space by setting the diagonal and the rotation: \f$I_{body}^{-1} /// = R \: D \: R^{-1}\f$. Note that mass and inertia are linearly related (e.g. inertia of a sphere with /// mass m and radius r is \f$2/5 \: m \: r^2\f$). If you change inertia, mass should probably change as /// well. You can use ScaleToMass to update mass and inertia at the same time. If all your rotation degrees /// of freedom are restricted, make sure this is zero (see EAllowedDOFs). /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:124 ///
/// void SetInverseInertia(Vec3Arg inDiagonal, QuatArg inRot) ///
///
public void SetInverseInertia(float3 diagonal, floatQuat rot) => Jolt.PInvoke.MotionProperties_SetInverseInertia(this, diagonal, rot); /// /// /// Sets the mass to inMass and scale the inertia tensor based on the ratio between the old and new mass. /// Note that this only works when the current mass is finite (i.e. the body is dynamic and translational /// degrees of freedom are not restricted). /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:128 ///
/// void ScaleToMass(float inMass) ///
///
public void ScaleToMass(float mass) => Jolt.PInvoke.MotionProperties_ScaleToMass(this, mass); /// /// /// Get inverse inertia matrix (\f$I_{body}^{-1}\f$). Will be a matrix of zeros for a static or kinematic /// object. /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:131 ///
/// inline Mat44 GetLocalSpaceInverseInertia() const ///
///
public float4x4 GetLocalSpaceInverseInertia() => Jolt.PInvoke.MotionProperties_GetLocalSpaceInverseInertia(this); /// /// /// Same as GetLocalSpaceInverseInertia() but doesn't check if the body is dynamic /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:134 ///
/// inline Mat44 GetLocalSpaceInverseInertiaUnchecked() const ///
///
public float4x4 GetLocalSpaceInverseInertiaUnchecked() => Jolt.PInvoke.MotionProperties_GetLocalSpaceInverseInertiaUnchecked(this); /// /// /// Get inverse inertia matrix (\f$I^{-1}\f$) for a given object rotation (translation will be ignored). /// Zero if object is static or kinematic. /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:137 ///
/// inline Mat44 GetInverseInertiaForRotation(Mat44Arg inRotation) const ///
///
public float4x4 GetInverseInertiaForRotation(in float4x4 rotation) => Jolt.PInvoke.MotionProperties_GetInverseInertiaForRotation(this, in rotation); /// /// /// Multiply a vector with the inverse world space inertia tensor (\f$I_{world}^{-1}\f$). Zero if object is /// static or kinematic. /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:140 ///
/// Vec3 MultiplyWorldSpaceInverseInertiaByVector(QuatArg inBodyRotation, Vec3Arg inV) const ///
///
public float3 MultiplyWorldSpaceInverseInertiaByVector(floatQuat bodyRotation, float3 v) => Jolt.PInvoke.MotionProperties_MultiplyWorldSpaceInverseInertiaByVector(this, bodyRotation, v); /// /// /// Velocity of point inPoint (in center of mass space, e.g. on the surface of the body) of the body (unit: /// m/s) /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:143 ///
/// Vec3 GetPointVelocityCOM(Vec3Arg inPointRelativeToCOM) const ///
///
public float3 GetPointVelocityCOM(float3 pointRelativeToCOM) => Jolt.PInvoke.MotionProperties_GetPointVelocityCOM(this, pointRelativeToCOM); /// /// /// Get the total amount of force applied to the center of mass this time step (through Body::AddForce /// calls). Note that it will reset to zero after PhysicsSystem::Update. /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:146 ///
/// Vec3 GetAccumulatedForce() const ///
///
public float3 GetAccumulatedForce() => Jolt.PInvoke.MotionProperties_GetAccumulatedForce(this); /// /// /// Get the total amount of torque applied to the center of mass this time step (through /// Body::AddForce/Body::AddTorque calls). Note that it will reset to zero after PhysicsSystem::Update. /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:149 ///
/// Vec3 GetAccumulatedTorque() const ///
///
public float3 GetAccumulatedTorque() => Jolt.PInvoke.MotionProperties_GetAccumulatedTorque(this); /// /// /// Reset the total accumulated force, note that this will be done automatically after every time step. /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:152 ///
/// void ResetForce() ///
///
public void ResetForce() => Jolt.PInvoke.MotionProperties_ResetForce(this); /// /// /// Reset the total accumulated torque, note that this will be done automatically after every time step. /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:155 ///
/// void ResetTorque() ///
///
public void ResetTorque() => Jolt.PInvoke.MotionProperties_ResetTorque(this); /// /// /// Reset the current velocity and accumulated force and torque. /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:158 ///
/// void ResetMotion() ///
///
public void ResetMotion() => Jolt.PInvoke.MotionProperties_ResetMotion(this); /// /// /// Returns a vector where the linear components that are not allowed by mAllowedDOFs are set to 0 and the /// rest to 0xffffffff /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:166 ///
/// UVec4 GetLinearDOFsMask() const ///
///
public uint4 GetLinearDOFsMask() => Jolt.PInvoke.MotionProperties_GetLinearDOFsMask(this); /// /// /// Takes a translation vector inV and returns a vector where the components that are not allowed by /// mAllowedDOFs are set to 0 /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:173 ///
/// Vec3 LockTranslation(Vec3Arg inV) const ///
///
public float3 LockTranslation(float3 v) => Jolt.PInvoke.MotionProperties_LockTranslation(this, v); /// /// /// Returns a vector where the angular components that are not allowed by mAllowedDOFs are set to 0 and the /// rest to 0xffffffff /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:179 ///
/// UVec4 GetAngularDOFsMask() const ///
///
public uint4 GetAngularDOFsMask() => Jolt.PInvoke.MotionProperties_GetAngularDOFsMask(this); /// /// /// Takes an angular velocity / torque vector inV and returns a vector where the components that are not /// allowed by mAllowedDOFs are set to 0 /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:186 ///
/// Vec3 LockAngular(Vec3Arg inV) const ///
///
public float3 LockAngular(float3 v) => Jolt.PInvoke.MotionProperties_LockAngular(this, v); /// /// /// Used only when this body is dynamic and colliding. Override for the number of solver velocity iterations /// to run, 0 means use the default in PhysicsSettings::mNumVelocitySteps. The number of iterations to use /// is the max of all contacts and constraints in the island. /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:192 ///
/// void SetNumVelocityStepsOverride(uint inN) ///
///
public void SetNumVelocityStepsOverride(uint n) => Jolt.PInvoke.MotionProperties_SetNumVelocityStepsOverride(this, n); /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:193 ///
/// uint GetNumVelocityStepsOverride() const ///
///
public uint GetNumVelocityStepsOverride() => Jolt.PInvoke.MotionProperties_GetNumVelocityStepsOverride(this); /// /// /// Used only when this body is dynamic and colliding. Override for the number of solver position iterations /// to run, 0 means use the default in PhysicsSettings::mNumPositionSteps. The number of iterations to use /// is the max of all contacts and constraints in the island. /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:196 ///
/// void SetNumPositionStepsOverride(uint inN) ///
///
public void SetNumPositionStepsOverride(uint n) => Jolt.PInvoke.MotionProperties_SetNumPositionStepsOverride(this, n); /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:197 ///
/// uint GetNumPositionStepsOverride() const ///
///
public uint GetNumPositionStepsOverride() => Jolt.PInvoke.MotionProperties_GetNumPositionStepsOverride(this); /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:228 ///
/// inline void ApplyLinearVelocityStep(Vec3Arg inLinearVelocity) ///
///
/// /// /// @name Update linear and angular velocity (used during constraint solving) /// @{ /// /// public void ApplyLinearVelocityStep(float3 linearVelocity) => Jolt.PInvoke.MotionProperties_ApplyLinearVelocityStep(this, linearVelocity); /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:236 ///
/// inline void AddLinearVelocityStep(Vec3Arg inLinearVelocityChange) ///
///
public void AddLinearVelocityStep(float3 linearVelocityChange) => Jolt.PInvoke.MotionProperties_AddLinearVelocityStep(this, linearVelocityChange); /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:237 ///
/// inline void SubLinearVelocityStep(Vec3Arg inLinearVelocityChange) ///
///
public void SubLinearVelocityStep(float3 linearVelocityChange) => Jolt.PInvoke.MotionProperties_SubLinearVelocityStep(this, linearVelocityChange); /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:239 ///
/// inline void ApplyAngularVelocityStep(Vec3Arg inAngularVelocity) ///
///
public void ApplyAngularVelocityStep(float3 angularVelocity) => Jolt.PInvoke.MotionProperties_ApplyAngularVelocityStep(this, angularVelocity); /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:247 ///
/// inline void AddAngularVelocityStep(Vec3Arg inAngularVelocityChange) ///
///
public void AddAngularVelocityStep(float3 angularVelocityChange) => Jolt.PInvoke.MotionProperties_AddAngularVelocityStep(this, angularVelocityChange); /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:248 ///
/// inline void SubAngularVelocityStep(Vec3Arg inAngularVelocityChange) ///
///
public void SubAngularVelocityStep(float3 angularVelocityChange) => Jolt.PInvoke.MotionProperties_SubAngularVelocityStep(this, angularVelocityChange); /// /// /// Apply the gyroscopic force (aka Dzhanibekov effect, see /// https://en.wikipedia.org/wiki/Tennis_racket_theorem) /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:252 ///
/// inline void ApplyGyroscopicForceInternal(QuatArg inBodyRotation, float inDeltaTime) ///
///
public void ApplyGyroscopicForceInternal(floatQuat bodyRotation, float deltaTime) => Jolt.PInvoke.MotionProperties_ApplyGyroscopicForceInternal(this, bodyRotation, deltaTime); /// /// /// Apply all accumulated forces, torques and drag (should only be called by the PhysicsSystem) /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:255 ///
/// inline void ApplyForceTorqueAndDragInternal(QuatArg inBodyRotation, Vec3Arg inGravity, float inDeltaTime) ///
///
public void ApplyForceTorqueAndDragInternal(floatQuat bodyRotation, float3 gravity, float deltaTime) => Jolt.PInvoke.MotionProperties_ApplyForceTorqueAndDragInternal(this, bodyRotation, gravity, deltaTime); /// /// /// Access to the island index /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:258 ///
/// uint32 GetIslandIndexInternal() const ///
///
public uint GetIslandIndexInternal() => Jolt.PInvoke.MotionProperties_GetIslandIndexInternal(this); /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:259 ///
/// void SetIslandIndexInternal(uint32 inIndex) ///
///
public void SetIslandIndexInternal(uint index) => Jolt.PInvoke.MotionProperties_SetIslandIndexInternal(this, index); /// /// /// Access to the index in the active bodies array /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:262 ///
/// uint32 GetIndexInActiveBodiesInternal() const ///
///
public uint GetIndexInActiveBodiesInternal() => Jolt.PInvoke.MotionProperties_GetIndexInActiveBodiesInternal(this); /// /// /// Reset the sleep test timer without resetting the sleep test spheres /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:272 ///
/// inline void ResetSleepTestTimer() ///
///
public void ResetSleepTestTimer() => Jolt.PInvoke.MotionProperties_ResetSleepTestTimer(this); /// /// /// Accumulate sleep time and return if a body can go to sleep /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:275 ///
/// inline ECanSleep AccumulateSleepTime(float inDeltaTime, float inTimeBeforeSleep) ///
///
public CanSleep AccumulateSleepTime(float deltaTime, float timeBeforeSleep) => Jolt.PInvoke.MotionProperties_AccumulateSleepTime(this, deltaTime, timeBeforeSleep); /// /// /// Resets the three sleep test spheres to the given points (the centre of mass, and two points along the /// body), restarting the sleep timer. /// /// public unsafe void ResetSleepTestSpheres(ReadOnlySpan points) { fixed (float3* points_fixed = points) { if (points.Length != 3) throw new ArgumentException( "Expected exactly 3 points, one per sleep test sphere.", nameof(points) ); Jolt.PInvoke.MotionProperties_ResetSleepTestSpheres(this, points_fixed, (nuint)points.Length); } } /// /// /// Constant indicating that body is not active /// /// /// C++: /// Jolt/Physics/Body/MotionProperties.h:283 ///
/// static constexpr uint32 cInactiveIndex = uint32(-1) ///
///
public static uint GetInactiveIndex() => Jolt.PInvoke.MotionProperties_GetInactiveIndex(); } }