//
// 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
{
///
///
/// C++:
/// Jolt/Physics/PhysicsUpdateContext.h:27
///
/// class PhysicsUpdateContext : public NonCopyable
///
///
///
///
/// @cond INTERNAL
/// Internal information used during the PhysicsSystem::Update call
///
/// WARNING: This class is an internal part of PhysicsSystem, it has no functions that can be called by users of the library.
///
///
[InteropHandle]
public readonly partial struct PhysicsUpdateContext : IDisposable
{
///
///
/// Destructor
///
///
/// C++:
/// Jolt/Physics/PhysicsUpdateContext.h:31
///
/// explicit PhysicsUpdateContext(TempAllocator &inTempAllocator)
///
///
public static PhysicsUpdateContext Create(TempAllocator tempAllocator) =>
Jolt.PInvoke.PhysicsUpdateContext_Create(tempAllocator);
///
///
/// Need to put max concurrency in temp var as min requires a reference
///
///
/// C++:
/// Jolt/Physics/PhysicsUpdateContext.h:152
///
/// int GetMaxConcurrency() const
///
///
///
///
/// Maximum amount of concurrent jobs on this machine
///
///
public int GetMaxConcurrency() => Jolt.PInvoke.PhysicsUpdateContext_GetMaxConcurrency(this);
///
///
/// Maximum supported amount of concurrent jobs
///
///
/// C++:
/// Jolt/Physics/PhysicsUpdateContext.h:34
///
/// static constexpr int cMaxConcurrency = 32
///
///
public static int GetCMaxConcurrency() => Jolt.PInvoke.PhysicsUpdateContext_GetCMaxConcurrency();
///
///
/// The physics system we belong to
///
///
/// C++:
/// Jolt/Physics/PhysicsUpdateContext.h:154
///
/// PhysicsSystem * mPhysicsSystem
///
///
///
///
/// The returned handle is borrowed from its owner; don't Dispose it.
///
///
public PhysicsSystem GetPhysicsSystem() => Jolt.PInvoke.PhysicsUpdateContext_GetPhysicsSystem(this);
///
///
/// The physics system we belong to
///
///
/// C++:
/// Jolt/Physics/PhysicsUpdateContext.h:154
///
/// PhysicsSystem * mPhysicsSystem
///
///
public void SetPhysicsSystem(PhysicsSystem value) =>
Jolt.PInvoke.PhysicsUpdateContext_SetPhysicsSystem(this, value);
///
///
/// Temporary allocator used during the update
///
///
/// C++:
/// Jolt/Physics/PhysicsUpdateContext.h:155
///
/// TempAllocator * mTempAllocator
///
///
///
///
/// The returned handle is borrowed from its owner; don't Dispose it.
///
///
public TempAllocator GetTempAllocator() => Jolt.PInvoke.PhysicsUpdateContext_GetTempAllocator(this);
///
///
/// Temporary allocator used during the update
///
///
/// C++:
/// Jolt/Physics/PhysicsUpdateContext.h:155
///
/// TempAllocator * mTempAllocator
///
///
public void SetTempAllocator(TempAllocator value) =>
Jolt.PInvoke.PhysicsUpdateContext_SetTempAllocator(this, value);
///
///
/// Job system that processes jobs
///
///
/// C++:
/// Jolt/Physics/PhysicsUpdateContext.h:156
///
/// JobSystem * mJobSystem
///
///
///
///
/// The returned handle is borrowed from its owner; don't Dispose it.
///
///
public JobSystem GetJobSystem() => Jolt.PInvoke.PhysicsUpdateContext_GetJobSystem(this);
///
///
/// Job system that processes jobs
///
///
/// C++:
/// Jolt/Physics/PhysicsUpdateContext.h:156
///
/// JobSystem * mJobSystem
///
///
public void SetJobSystem(JobSystem value) => Jolt.PInvoke.PhysicsUpdateContext_SetJobSystem(this, value);
///
///
/// Delta time for a simulation step (collision step)
///
///
/// C++:
/// Jolt/Physics/PhysicsUpdateContext.h:159
///
/// float mStepDeltaTime
///
///
public float GetStepDeltaTime() => Jolt.PInvoke.PhysicsUpdateContext_GetStepDeltaTime(this);
///
///
/// Delta time for a simulation step (collision step)
///
///
/// C++:
/// Jolt/Physics/PhysicsUpdateContext.h:159
///
/// float mStepDeltaTime
///
///
public void SetStepDeltaTime(float value) => Jolt.PInvoke.PhysicsUpdateContext_SetStepDeltaTime(this, value);
///
///
/// Ratio of this step delta time vs last step
///
///
/// C++:
/// Jolt/Physics/PhysicsUpdateContext.h:160
///
/// float mWarmStartImpulseRatio
///
///
public float GetWarmStartImpulseRatio() => Jolt.PInvoke.PhysicsUpdateContext_GetWarmStartImpulseRatio(this);
///
///
/// Ratio of this step delta time vs last step
///
///
/// C++:
/// Jolt/Physics/PhysicsUpdateContext.h:160
///
/// float mWarmStartImpulseRatio
///
///
public void SetWarmStartImpulseRatio(float value) =>
Jolt.PInvoke.PhysicsUpdateContext_SetWarmStartImpulseRatio(this, value);
///
///
/// Constraints that were active at the start of the physics update step (activating bodies can activate
/// constraints and we need a consistent snapshot). Only these constraints will be resolved.
///
///
/// C++:
/// Jolt/Physics/PhysicsUpdateContext.h:163
///
/// Constraint ** mActiveConstraints = nullptr
///
///
public unsafe void SetActiveConstraints(Ptr value) =>
Jolt.PInvoke.PhysicsUpdateContext_SetActiveConstraints(this, value);
///
///
/// A list of body pairs found by the broadphase
///
///
/// C++:
/// Jolt/Physics/PhysicsUpdateContext.h:165
///
/// BodyPair * mBodyPairs = nullptr
///
///
public unsafe void SetBodyPairs(Ptr value) =>
Jolt.PInvoke.PhysicsUpdateContext_SetBodyPairs(this, value);
///
///
/// Keeps track of all bodies in the simulation
///
///
/// C++:
/// Jolt/Physics/PhysicsUpdateContext.h:167
///
/// BodyManager * mBodyManager
///
///
///
///
/// The returned handle is borrowed from its owner; don't Dispose it.
///
///
public BodyManager GetBodyManager() => Jolt.PInvoke.PhysicsUpdateContext_GetBodyManager(this);
///
///
/// Keeps track of all bodies in the simulation
///
///
/// C++:
/// Jolt/Physics/PhysicsUpdateContext.h:167
///
/// BodyManager * mBodyManager
///
///
public void SetBodyManager(BodyManager value) => Jolt.PInvoke.PhysicsUpdateContext_SetBodyManager(this, value);
///
///
/// Keeps track of connected bodies and builds islands for multithreaded velocity/position update
///
///
/// C++:
/// Jolt/Physics/PhysicsUpdateContext.h:168
///
/// IslandBuilder * mIslandBuilder
///
///
///
///
/// The returned handle is borrowed from its owner; don't Dispose it.
///
///
public IslandBuilder GetIslandBuilder() => Jolt.PInvoke.PhysicsUpdateContext_GetIslandBuilder(this);
///
///
/// Keeps track of connected bodies and builds islands for multithreaded velocity/position update
///
///
/// C++:
/// Jolt/Physics/PhysicsUpdateContext.h:168
///
/// IslandBuilder * mIslandBuilder
///
///
public void SetIslandBuilder(IslandBuilder value) =>
Jolt.PInvoke.PhysicsUpdateContext_SetIslandBuilder(this, value);
///
///
/// Number of active soft bodies in the simulation
///
///
/// C++:
/// Jolt/Physics/PhysicsUpdateContext.h:172
///
/// uint mNumSoftBodies
///
///
public uint GetNumSoftBodies() => Jolt.PInvoke.PhysicsUpdateContext_GetNumSoftBodies(this);
///
///
/// Number of active soft bodies in the simulation
///
///
/// C++:
/// Jolt/Physics/PhysicsUpdateContext.h:172
///
/// uint mNumSoftBodies
///
///
public void SetNumSoftBodies(uint value) => Jolt.PInvoke.PhysicsUpdateContext_SetNumSoftBodies(this, value);
///
///
/// Contexts for updating soft bodies
///
///
/// C++:
/// Jolt/Physics/PhysicsUpdateContext.h:173
///
/// SoftBodyUpdateContext * mSoftBodyUpdateContexts = nullptr
///
///
///
///
/// The returned handle is borrowed from its owner; don't Dispose it.
///
///
public SoftBodyUpdateContext GetSoftBodyUpdateContexts() =>
Jolt.PInvoke.PhysicsUpdateContext_GetSoftBodyUpdateContexts(this);
///
///
/// Contexts for updating soft bodies
///
///
/// C++:
/// Jolt/Physics/PhysicsUpdateContext.h:173
///
/// SoftBodyUpdateContext * mSoftBodyUpdateContexts = nullptr
///
///
public void SetSoftBodyUpdateContexts(SoftBodyUpdateContext value) =>
Jolt.PInvoke.PhysicsUpdateContext_SetSoftBodyUpdateContexts(this, value);
public void Dispose() => Jolt.PInvoke.PhysicsUpdateContext_Destroy(this);
}
}