mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-26 04:58:24 +01:00
SOURCE DUMP v1
This commit is contained in:
parent
bd62d51ec9
commit
fb20299e9d
1 changed files with 768360 additions and 0 deletions
610
brutal.jolt/Brutal.Jolt/Generated/Classes/PhysicsSystem.gen.cs
Normal file
610
brutal.jolt/Brutal.Jolt/Generated/Classes/PhysicsSystem.gen.cs
Normal file
|
|
@ -0,0 +1,610 @@
|
|||
// <auto-generated/>
|
||||
// Generated by Brutal.Jolt.Generate; do not edit by hand.
|
||||
#nullable enable
|
||||
|
||||
using Brutal.Interop;
|
||||
using Brutal.Numerics;
|
||||
namespace Brutal.JoltApi
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/PhysicsSystem.h#L29">Jolt/Physics/PhysicsSystem.h:29</see>
|
||||
/// <br/>
|
||||
/// <c>class PhysicsSystem : public NonCopyable</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <code>
|
||||
/// The main class for the physics system. It contains all rigid bodies and simulates them.
|
||||
///
|
||||
/// The main simulation is performed by the Update() call on multiple threads (if the JobSystem is configured to use them). Please refer to the general architecture overview in the Docs folder for more information.
|
||||
/// </code>
|
||||
/// </remarks>
|
||||
[InteropHandle]
|
||||
public readonly partial struct PhysicsSystem : IDisposable
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/PhysicsSystem.h#L35">Jolt/Physics/PhysicsSystem.h:35</see>
|
||||
/// <br/>
|
||||
/// <c>PhysicsSystem()</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Constructor / Destructor
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public static PhysicsSystem Create() => Jolt.PInvoke.PhysicsSystem_Create();
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/PhysicsSystem.h#L59">Jolt/Physics/PhysicsSystem.h:59</see>
|
||||
/// <br/>
|
||||
/// <c>void Init(uint inMaxBodies, uint inNumBodyMutexes, uint inMaxBodyPairs, uint inMaxContactConstraints, const BroadPhaseLayerInterface &inBroadPhaseLayerInterface, const ObjectVsBroadPhaseLayerFilter &inObjectVsBroadPhaseLayerFilter, const ObjectLayerPairFilter &inObjectLayerPairFilter)</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <code>
|
||||
/// Initialize the system.
|
||||
/// @param inMaxBodies Maximum number of bodies to support.
|
||||
/// @param inNumBodyMutexes Number of body mutexes to use. Should be a power of 2 in the range [1, 64], use 0 to auto detect.
|
||||
/// @param inMaxBodyPairs Maximum amount of body pairs to process (anything else will fall through the world), this number should generally be much higher than the max amount of contact points as there will be lots of bodies close that are not actually touching.
|
||||
/// @param inMaxContactConstraints Maximum amount of contact constraints to process (anything else will fall through the world).
|
||||
/// @param inBroadPhaseLayerInterface Information on the mapping of object layers to broad phase layers. Since this is a virtual interface, the instance needs to stay alive during the lifetime of the PhysicsSystem.
|
||||
/// @param inObjectVsBroadPhaseLayerFilter Filter callback function that is used to determine if an object layer collides with a broad phase layer. Since this is a virtual interface, the instance needs to stay alive during the lifetime of the PhysicsSystem.
|
||||
/// @param inObjectLayerPairFilter Filter callback function that is used to determine if two object layers collide. Since this is a virtual interface, the instance needs to stay alive during the lifetime of the PhysicsSystem.
|
||||
/// </code>
|
||||
/// </remarks>
|
||||
public void Init(uint maxBodies, uint numBodyMutexes, uint maxBodyPairs, uint maxContactConstraints, BroadPhaseLayerInterface broadPhaseLayerInterface, ObjectVsBroadPhaseLayerFilter objectVsBroadPhaseLayerFilter, ObjectLayerPairFilter objectLayerPairFilter) => Jolt.PInvoke.PhysicsSystem_Init(this, maxBodies, numBodyMutexes, maxBodyPairs, maxContactConstraints, broadPhaseLayerInterface, objectVsBroadPhaseLayerFilter, objectLayerPairFilter);
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/PhysicsSystem.h#L62">Jolt/Physics/PhysicsSystem.h:62</see>
|
||||
/// <br/>
|
||||
/// <c>void SetBodyActivationListener(BodyActivationListener *inListener)</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Listener that is notified whenever a body is activated/deactivated
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public void SetBodyActivationListener(BodyActivationListener listener) => Jolt.PInvoke.PhysicsSystem_SetBodyActivationListener(this, listener);
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/PhysicsSystem.h#L63">Jolt/Physics/PhysicsSystem.h:63</see>
|
||||
/// <br/>
|
||||
/// <c>BodyActivationListener * GetBodyActivationListener() const</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// The returned handle is borrowed from its owner; don't Dispose it.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public BodyActivationListener GetBodyActivationListener() => Jolt.PInvoke.PhysicsSystem_GetBodyActivationListener(this);
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/PhysicsSystem.h#L67">Jolt/Physics/PhysicsSystem.h:67</see>
|
||||
/// <br/>
|
||||
/// <c>void SetContactListener(ContactListener *inListener)</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <code>
|
||||
/// Listener that is notified whenever a contact point between two bodies is added/updated/removed.
|
||||
/// You can't change contact listener during PhysicsSystem::Update but it can be changed at any other time.
|
||||
/// </code>
|
||||
/// </remarks>
|
||||
public void SetContactListener(ContactListener listener) => Jolt.PInvoke.PhysicsSystem_SetContactListener(this, listener);
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/PhysicsSystem.h#L68">Jolt/Physics/PhysicsSystem.h:68</see>
|
||||
/// <br/>
|
||||
/// <c>ContactListener * GetContactListener() const</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// The returned handle is borrowed from its owner; don't Dispose it.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public ContactListener GetContactListener() => Jolt.PInvoke.PhysicsSystem_GetContactListener(this);
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/PhysicsSystem.h#L71">Jolt/Physics/PhysicsSystem.h:71</see>
|
||||
/// <br/>
|
||||
/// <c>void SetSoftBodyContactListener(SoftBodyContactListener *inListener)</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Listener that is notified whenever a contact point between a soft body and another body
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public void SetSoftBodyContactListener(SoftBodyContactListener listener) => Jolt.PInvoke.PhysicsSystem_SetSoftBodyContactListener(this, listener);
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/PhysicsSystem.h#L72">Jolt/Physics/PhysicsSystem.h:72</see>
|
||||
/// <br/>
|
||||
/// <c>SoftBodyContactListener * GetSoftBodyContactListener() const</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// The returned handle is borrowed from its owner; don't Dispose it.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public SoftBodyContactListener GetSoftBodyContactListener() => Jolt.PInvoke.PhysicsSystem_GetSoftBodyContactListener(this);
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/PhysicsSystem.h#L89">Jolt/Physics/PhysicsSystem.h:89</see>
|
||||
/// <br/>
|
||||
/// <c>void SetSimShapeFilter(const SimShapeFilter *inShapeFilter)</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <code>
|
||||
/// Set/get the shape filter that will be used during simulation. This can be used to exclude shapes within a body from colliding with each other.
|
||||
/// E.g. if you have a high detail and a low detail collision model, you can attach them to the same body in a StaticCompoundShape and use the ShapeFilter
|
||||
/// to exclude the high detail collision model when simulating and exclude the low detail collision model when casting rays. Note that in this case
|
||||
/// you would need to pass the inverse of inShapeFilter to the CastRay function. Pass a nullptr to disable the shape filter.
|
||||
/// The PhysicsSystem does not own the ShapeFilter, make sure it stays alive during the lifetime of the PhysicsSystem.
|
||||
/// </code>
|
||||
/// </remarks>
|
||||
public void SetSimShapeFilter(SimShapeFilter shapeFilter) => Jolt.PInvoke.PhysicsSystem_SetSimShapeFilter(this, shapeFilter);
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/PhysicsSystem.h#L90">Jolt/Physics/PhysicsSystem.h:90</see>
|
||||
/// <br/>
|
||||
/// <c>const SimShapeFilter * GetSimShapeFilter() const</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// The returned handle is borrowed from its owner; don't Dispose it.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public SimShapeFilter GetSimShapeFilter() => Jolt.PInvoke.PhysicsSystem_GetSimShapeFilter(this);
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/PhysicsSystem.h#L111">Jolt/Physics/PhysicsSystem.h:111</see>
|
||||
/// <br/>
|
||||
/// <c>void SetPhysicsSettings(const PhysicsSettings &inSettings)</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Control the main constants of the physics simulation
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public void SetPhysicsSettings(ref PhysicsSettings settings) => Jolt.PInvoke.PhysicsSystem_SetPhysicsSettings(this, ref settings);
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/PhysicsSystem.h#L115">Jolt/Physics/PhysicsSystem.h:115</see>
|
||||
/// <br/>
|
||||
/// <c>const BodyInterface & GetBodyInterface() const</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Access to the body interface. This interface allows to to create / remove bodies and to change their
|
||||
/// properties.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// The returned handle is borrowed from its owner; don't Dispose it.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public BodyInterface GetBodyInterface() => Jolt.PInvoke.PhysicsSystem_GetBodyInterface(this);
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Version that does not lock the bodies, use with great care!
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/PhysicsSystem.h#L117">Jolt/Physics/PhysicsSystem.h:117</see>
|
||||
/// <br/>
|
||||
/// <c>const BodyInterface & GetBodyInterfaceNoLock() const</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// The returned handle is borrowed from its owner; don't Dispose it.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public BodyInterface GetBodyInterfaceNoLock() => Jolt.PInvoke.PhysicsSystem_GetBodyInterfaceNoLock(this);
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/PhysicsSystem.h#L121">Jolt/Physics/PhysicsSystem.h:121</see>
|
||||
/// <br/>
|
||||
/// <c>const BroadPhaseQuery & GetBroadPhaseQuery() const</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Access to the broadphase interface that allows coarse collision queries
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// The returned handle is borrowed from its owner; don't Dispose it.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public BroadPhaseQuery GetBroadPhaseQuery() => Jolt.PInvoke.PhysicsSystem_GetBroadPhaseQuery(this);
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/PhysicsSystem.h#L124">Jolt/Physics/PhysicsSystem.h:124</see>
|
||||
/// <br/>
|
||||
/// <c>const NarrowPhaseQuery & GetNarrowPhaseQuery() const</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Interface that allows fine collision queries against first the broad phase and then the narrow phase.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// The returned handle is borrowed from its owner; don't Dispose it.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public NarrowPhaseQuery GetNarrowPhaseQuery() => Jolt.PInvoke.PhysicsSystem_GetNarrowPhaseQuery(this);
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Version that does not lock the bodies, use with great care!
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/PhysicsSystem.h#L125">Jolt/Physics/PhysicsSystem.h:125</see>
|
||||
/// <br/>
|
||||
/// <c>const NarrowPhaseQuery & GetNarrowPhaseQueryNoLock() const</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// The returned handle is borrowed from its owner; don't Dispose it.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public NarrowPhaseQuery GetNarrowPhaseQueryNoLock() => Jolt.PInvoke.PhysicsSystem_GetNarrowPhaseQueryNoLock(this);
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/PhysicsSystem.h#L128">Jolt/Physics/PhysicsSystem.h:128</see>
|
||||
/// <br/>
|
||||
/// <c>void AddConstraint(Constraint *inConstraint)</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Add constraint to the world
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public void AddConstraint(Constraint constraint) => Jolt.PInvoke.PhysicsSystem_AddConstraint(this, constraint);
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/PhysicsSystem.h#L131">Jolt/Physics/PhysicsSystem.h:131</see>
|
||||
/// <br/>
|
||||
/// <c>void RemoveConstraint(Constraint *inConstraint)</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Remove constraint from the world
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public void RemoveConstraint(Constraint constraint) => Jolt.PInvoke.PhysicsSystem_RemoveConstraint(this, constraint);
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/PhysicsSystem.h#L148">Jolt/Physics/PhysicsSystem.h:148</see>
|
||||
/// <br/>
|
||||
/// <c>void OptimizeBroadPhase()</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <code>
|
||||
/// Optimize the broadphase, needed only if you've added many bodies prior to calling Update() for the first time.
|
||||
/// Don't call this every frame as PhysicsSystem::Update spreads out the same work over multiple frames.
|
||||
/// If you add many bodies through BodyInterface::AddBodiesPrepare/AddBodiesFinalize and if the bodies in a batch are
|
||||
/// in a roughly unoccupied space (e.g. a new level section) then a call to OptimizeBroadPhase is also not needed
|
||||
/// as batch adding creates an efficient bounding volume hierarchy.
|
||||
/// Don't call this function while bodies are being modified from another thread or use the locking BodyInterface to modify bodies.
|
||||
/// </code>
|
||||
/// </remarks>
|
||||
public void OptimizeBroadPhase() => Jolt.PInvoke.PhysicsSystem_OptimizeBroadPhase(this);
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/PhysicsSystem.h#L151">Jolt/Physics/PhysicsSystem.h:151</see>
|
||||
/// <br/>
|
||||
/// <c>void AddStepListener(PhysicsStepListener *inListener)</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Adds a new step listener
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public void AddStepListener(PhysicsStepListener listener) => Jolt.PInvoke.PhysicsSystem_AddStepListener(this, listener);
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/PhysicsSystem.h#L154">Jolt/Physics/PhysicsSystem.h:154</see>
|
||||
/// <br/>
|
||||
/// <c>void RemoveStepListener(PhysicsStepListener *inListener)</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Removes a step listener
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public void RemoveStepListener(PhysicsStepListener listener) => Jolt.PInvoke.PhysicsSystem_RemoveStepListener(this, listener);
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/PhysicsSystem.h#L162">Jolt/Physics/PhysicsSystem.h:162</see>
|
||||
/// <br/>
|
||||
/// <c>EPhysicsUpdateError Update(float inDeltaTime, int inCollisionSteps, TempAllocator *inTempAllocator, JobSystem *inJobSystem)</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <code>
|
||||
/// Simulate the system.
|
||||
/// The world steps for a total of inDeltaTime seconds. This is divided in inCollisionSteps iterations.
|
||||
/// Each iteration consists of collision detection followed by an integration step.
|
||||
/// This function internally spawns jobs using inJobSystem and waits for them to complete, so no jobs will be running when this function returns.
|
||||
/// The temp allocator is used, for example, to store the list of bodies that are in contact, how they form islands together
|
||||
/// and data to solve the contacts between bodies. At the end of the Update call, all allocated memory will have been freed.
|
||||
/// </code>
|
||||
/// </remarks>
|
||||
public EPhysicsUpdateError Update(float deltaTime, int collisionSteps, TempAllocator tempAllocator, JobSystem jobSystem) => Jolt.PInvoke.PhysicsSystem_Update(this, deltaTime, collisionSteps, tempAllocator, jobSystem);
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/PhysicsSystem.h#L171">Jolt/Physics/PhysicsSystem.h:171</see>
|
||||
/// <br/>
|
||||
/// <c>void SaveBodyState(const Body &inBody, StateRecorder &inStream) const</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Saving state of a single body.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public void SaveBodyState(Body body, StateRecorder stream) => Jolt.PInvoke.PhysicsSystem_SaveBodyState(this, body, stream);
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/PhysicsSystem.h#L174">Jolt/Physics/PhysicsSystem.h:174</see>
|
||||
/// <br/>
|
||||
/// <c>void RestoreBodyState(Body &ioBody, StateRecorder &inStream)</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Restoring state of a single body.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public void RestoreBodyState(Body body, StateRecorder stream) => Jolt.PInvoke.PhysicsSystem_RestoreBodyState(this, body, stream);
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/PhysicsSystem.h#L181">Jolt/Physics/PhysicsSystem.h:181</see>
|
||||
/// <br/>
|
||||
/// <c>void DrawBodies(const BodyManager::DrawSettings &inSettings, DebugRenderer *inRenderer, const BodyDrawFilter *inBodyFilter = nullptr)</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Draw the state of the bodies (debugging purposes)
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public void DrawBodies(ref BodyManager.DrawSettings settings, DebugRenderer renderer, BodyDrawFilter bodyFilter) => Jolt.PInvoke.PhysicsSystem_DrawBodies(this, ref settings, renderer, bodyFilter);
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/PhysicsSystem.h#L184">Jolt/Physics/PhysicsSystem.h:184</see>
|
||||
/// <br/>
|
||||
/// <c>void DrawConstraints(DebugRenderer *inRenderer)</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Draw the constraints only (debugging purposes)
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public void DrawConstraints(DebugRenderer renderer) => Jolt.PInvoke.PhysicsSystem_DrawConstraints(this, renderer);
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/PhysicsSystem.h#L187">Jolt/Physics/PhysicsSystem.h:187</see>
|
||||
/// <br/>
|
||||
/// <c>void DrawConstraintLimits(DebugRenderer *inRenderer)</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Draw the constraint limits only (debugging purposes)
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public void DrawConstraintLimits(DebugRenderer renderer) => Jolt.PInvoke.PhysicsSystem_DrawConstraintLimits(this, renderer);
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/PhysicsSystem.h#L190">Jolt/Physics/PhysicsSystem.h:190</see>
|
||||
/// <br/>
|
||||
/// <c>void DrawConstraintReferenceFrame(DebugRenderer *inRenderer)</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Draw the constraint reference frames only (debugging purposes)
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public void DrawConstraintReferenceFrame(DebugRenderer renderer) => Jolt.PInvoke.PhysicsSystem_DrawConstraintReferenceFrame(this, renderer);
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/PhysicsSystem.h#L194">Jolt/Physics/PhysicsSystem.h:194</see>
|
||||
/// <br/>
|
||||
/// <c>void SetGravity(Vec3Arg inGravity)</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Set gravity value
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public void SetGravity(float3 gravity) => Jolt.PInvoke.PhysicsSystem_SetGravity(this, gravity);
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/PhysicsSystem.h#L195">Jolt/Physics/PhysicsSystem.h:195</see>
|
||||
/// <br/>
|
||||
/// <c>Vec3 GetGravity() const</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public float3 GetGravity() => Jolt.PInvoke.PhysicsSystem_GetGravity(this);
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/PhysicsSystem.h#L198">Jolt/Physics/PhysicsSystem.h:198</see>
|
||||
/// <br/>
|
||||
/// <c>inline const BodyLockInterfaceNoLock & GetBodyLockInterfaceNoLock() const</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Returns a locking interface that won't actually lock the body. Use with great care!
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// The returned handle is borrowed from its owner; don't Dispose it.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public BodyLockInterfaceNoLock GetBodyLockInterfaceNoLock() => Jolt.PInvoke.PhysicsSystem_GetBodyLockInterfaceNoLock(this);
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/PhysicsSystem.h#L201">Jolt/Physics/PhysicsSystem.h:201</see>
|
||||
/// <br/>
|
||||
/// <c>inline const BodyLockInterfaceLocking & GetBodyLockInterface() const</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Returns a locking interface that locks the body so other threads cannot modify it.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// The returned handle is borrowed from its owner; don't Dispose it.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public BodyLockInterfaceLocking GetBodyLockInterface() => Jolt.PInvoke.PhysicsSystem_GetBodyLockInterface(this);
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/PhysicsSystem.h#L204">Jolt/Physics/PhysicsSystem.h:204</see>
|
||||
/// <br/>
|
||||
/// <c>const ObjectVsBroadPhaseLayerFilter &GetObjectVsBroadPhaseLayerFilter() const</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Broadphase layer filter that decides if two objects can collide, this was passed to the Init function.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// The returned handle is borrowed from its owner; don't Dispose it.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public ObjectVsBroadPhaseLayerFilter GetObjectVsBroadPhaseLayerFilter() => Jolt.PInvoke.PhysicsSystem_GetObjectVsBroadPhaseLayerFilter(this);
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/PhysicsSystem.h#L207">Jolt/Physics/PhysicsSystem.h:207</see>
|
||||
/// <br/>
|
||||
/// <c>const ObjectLayerPairFilter &GetObjectLayerPairFilter() const</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Object layer filter that decides if two objects can collide, this was passed to the Init function.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// The returned handle is borrowed from its owner; don't Dispose it.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public ObjectLayerPairFilter GetObjectLayerPairFilter() => Jolt.PInvoke.PhysicsSystem_GetObjectLayerPairFilter(this);
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/PhysicsSystem.h#L216">Jolt/Physics/PhysicsSystem.h:216</see>
|
||||
/// <br/>
|
||||
/// <c>uint GetNumBodies() const</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Gets the current amount of bodies that are in the body manager
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public uint GetNumBodies() => Jolt.PInvoke.PhysicsSystem_GetNumBodies(this);
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/PhysicsSystem.h#L219">Jolt/Physics/PhysicsSystem.h:219</see>
|
||||
/// <br/>
|
||||
/// <c>uint32 GetNumActiveBodies(EBodyType inType) const</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Gets the current amount of active bodies that are in the body manager
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public uint GetNumActiveBodies(EBodyType type) => Jolt.PInvoke.PhysicsSystem_GetNumActiveBodies(this, type);
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/PhysicsSystem.h#L222">Jolt/Physics/PhysicsSystem.h:222</see>
|
||||
/// <br/>
|
||||
/// <c>uint GetMaxBodies() const</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Get the maximum amount of bodies that this physics system supports
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public uint GetMaxBodies() => Jolt.PInvoke.PhysicsSystem_GetMaxBodies(this);
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// C++:
|
||||
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/PhysicsSystem.h#L248">Jolt/Physics/PhysicsSystem.h:248</see>
|
||||
/// <br/>
|
||||
/// <c>bool WereBodiesInContact(const BodyID &inBody1ID, const BodyID &inBody2ID) const</c>
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <code>
|
||||
/// Check if 2 bodies were in contact during the last simulation step. Since contacts are only detected between active bodies, so at least one of the bodies must be active in order for this function to work.
|
||||
/// It queries the state at the time of the last PhysicsSystem::Update and will return true if the bodies were in contact, even if one of the bodies was moved / removed afterwards.
|
||||
/// This function can be called from any thread when the PhysicsSystem::Update is not running. During PhysicsSystem::Update this function is only valid during contact callbacks:
|
||||
/// - During the ContactListener::OnContactAdded callback this function can be used to determine if a different contact pair between the bodies was active in the previous simulation step (function returns true) or if this is the first step that the bodies are touching (function returns false).
|
||||
/// - During the ContactListener::OnContactRemoved callback this function can be used to determine if this is the last contact pair between the bodies (function returns false) or if there are other contacts still present (function returns true).
|
||||
/// </code>
|
||||
/// </remarks>
|
||||
public bool WereBodiesInContact(uint body1ID, uint body2ID) => Jolt.PInvoke.PhysicsSystem_WereBodiesInContact(this, body1ID, body2ID);
|
||||
public void Dispose() => Jolt.PInvoke.PhysicsSystem_Destroy(this);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue