mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-26 04:58:24 +01:00
1397 lines
71 KiB
C#
1397 lines
71 KiB
C#
// <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/Body/Body.h#L34">Jolt/Physics/Body/Body.h:34</see>
|
|
/// <br/>
|
|
/// <c>class</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// A rigid body that can be simulated using the physics system
|
|
///
|
|
/// Note that internally all properties (position, velocity etc.) are tracked relative to the center of mass of the object to simplify the simulation of the object.
|
|
///
|
|
/// The offset between the position of the body and the center of mass position of the body is GetShape()-&gt;GetCenterOfMass().
|
|
/// The functions that get/set the position of the body all indicate if they are relative to the center of mass or to the original position in which the shape was created.
|
|
///
|
|
/// The linear velocity is also velocity of the center of mass, to correct for this: \f$VelocityCOM = Velocity - AngularVelocity \times ShapeCOM\f$.
|
|
/// </code>
|
|
/// </remarks>
|
|
[InteropHandle]
|
|
public readonly partial struct Body
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L408">Jolt/Physics/Body/Body.h:408</see>
|
|
/// <br/>
|
|
/// <c>enum class EFlags : uint8</c>
|
|
/// </para>
|
|
/// </summary>
|
|
[Flags]
|
|
public enum EFlags : byte
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// If this object is a sensor. A sensor will receive collision callbacks, but will not cause any
|
|
/// collision responses and can be used as a trigger volume.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L410">Jolt/Physics/Body/Body.h:410</see>
|
|
/// <br/>
|
|
/// <c>IsSensor = 1 << 0</c>
|
|
/// </para>
|
|
/// </summary>
|
|
IsSensor = 1 << 0,
|
|
/// <summary>
|
|
/// <para>
|
|
/// If kinematic objects can generate contact points against other kinematic or static objects.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L411">Jolt/Physics/Body/Body.h:411</see>
|
|
/// <br/>
|
|
/// <c>CollideKinematicVsNonDynamic = 1 << 1</c>
|
|
/// </para>
|
|
/// </summary>
|
|
CollideKinematicVsNonDynamic = 1 << 1,
|
|
/// <summary>
|
|
/// <para>
|
|
/// Set this bit to indicate that the body is in the broadphase
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L412">Jolt/Physics/Body/Body.h:412</see>
|
|
/// <br/>
|
|
/// <c>IsInBroadPhase = 1 << 2</c>
|
|
/// </para>
|
|
/// </summary>
|
|
IsInBroadPhase = 1 << 2,
|
|
/// <summary>
|
|
/// <para>
|
|
/// Set this bit to indicate that all collision caches for this body are invalid, will be reset the next
|
|
/// simulation step.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L413">Jolt/Physics/Body/Body.h:413</see>
|
|
/// <br/>
|
|
/// <c>InvalidateContactCache = 1 << 3</c>
|
|
/// </para>
|
|
/// </summary>
|
|
InvalidateContactCache = 1 << 3,
|
|
/// <summary>
|
|
/// <para>
|
|
/// Set this bit to indicate that this body can use manifold reduction (if
|
|
/// PhysicsSettings::mUseManifoldReduction is true)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L414">Jolt/Physics/Body/Body.h:414</see>
|
|
/// <br/>
|
|
/// <c>UseManifoldReduction = 1 << 4</c>
|
|
/// </para>
|
|
/// </summary>
|
|
UseManifoldReduction = 1 << 4,
|
|
/// <summary>
|
|
/// <para>
|
|
/// Set this bit to indicate that the gyroscopic force should be applied to this body (aka Dzhanibekov
|
|
/// effect, see https://en.wikipedia.org/wiki/Tennis_racket_theorem)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L415">Jolt/Physics/Body/Body.h:415</see>
|
|
/// <br/>
|
|
/// <c>ApplyGyroscopicForce = 1 << 5</c>
|
|
/// </para>
|
|
/// </summary>
|
|
ApplyGyroscopicForce = 1 << 5,
|
|
/// <summary>
|
|
/// <para>
|
|
/// Set this bit to indicate that enhanced internal edge removal should be used for this body (see
|
|
/// BodyCreationSettings::mEnhancedInternalEdgeRemoval)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L416">Jolt/Physics/Body/Body.h:416</see>
|
|
/// <br/>
|
|
/// <c>EnhancedInternalEdgeRemoval = 1 << 6</c>
|
|
/// </para>
|
|
/// </summary>
|
|
EnhancedInternalEdgeRemoval = 1 << 6,
|
|
}
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L44">Jolt/Physics/Body/Body.h:44</see>
|
|
/// <br/>
|
|
/// <c>inline const BodyID & GetID() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Get the id of this body
|
|
/// </para>
|
|
/// </remarks>
|
|
public uint GetID() => Jolt.PInvoke.Body_GetID(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L47">Jolt/Physics/Body/Body.h:47</see>
|
|
/// <br/>
|
|
/// <c>inline EBodyType GetBodyType() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Get the type of body (rigid or soft)
|
|
/// </para>
|
|
/// </remarks>
|
|
public EBodyType GetBodyType() => Jolt.PInvoke.Body_GetBodyType(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L50">Jolt/Physics/Body/Body.h:50</see>
|
|
/// <br/>
|
|
/// <c>inline bool IsRigidBody() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Check if this body is a rigid body
|
|
/// </para>
|
|
/// </remarks>
|
|
public bool IsRigidBody() => Jolt.PInvoke.Body_IsRigidBody(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L53">Jolt/Physics/Body/Body.h:53</see>
|
|
/// <br/>
|
|
/// <c>inline bool IsSoftBody() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Check if this body is a soft body
|
|
/// </para>
|
|
/// </remarks>
|
|
public bool IsSoftBody() => Jolt.PInvoke.Body_IsSoftBody(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L58">Jolt/Physics/Body/Body.h:58</see>
|
|
/// <br/>
|
|
/// <c>inline bool IsActive() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// If this body is currently actively simulating (true) or sleeping (false)
|
|
/// </para>
|
|
/// </remarks>
|
|
public bool IsActive() => Jolt.PInvoke.Body_IsActive(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L61">Jolt/Physics/Body/Body.h:61</see>
|
|
/// <br/>
|
|
/// <c>inline bool IsStatic() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Check if this body is static (not movable)
|
|
/// </para>
|
|
/// </remarks>
|
|
public bool IsStatic() => Jolt.PInvoke.Body_IsStatic(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L64">Jolt/Physics/Body/Body.h:64</see>
|
|
/// <br/>
|
|
/// <c>inline bool IsKinematic() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Check if this body is kinematic (keyframed), which means that it will move according to its current
|
|
/// velocity, but forces don't affect it
|
|
/// </para>
|
|
/// </remarks>
|
|
public bool IsKinematic() => Jolt.PInvoke.Body_IsKinematic(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L67">Jolt/Physics/Body/Body.h:67</see>
|
|
/// <br/>
|
|
/// <c>inline bool IsDynamic() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Check if this body is dynamic, which means that it moves and forces can act on it
|
|
/// </para>
|
|
/// </remarks>
|
|
public bool IsDynamic() => Jolt.PInvoke.Body_IsDynamic(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L70">Jolt/Physics/Body/Body.h:70</see>
|
|
/// <br/>
|
|
/// <c>inline bool CanBeKinematicOrDynamic() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Check if a body could be made kinematic or dynamic (if it was created dynamic or with
|
|
/// mAllowDynamicOrKinematic set to true)
|
|
/// </para>
|
|
/// </remarks>
|
|
public bool CanBeKinematicOrDynamic() => Jolt.PInvoke.Body_CanBeKinematicOrDynamic(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L77">Jolt/Physics/Body/Body.h:77</see>
|
|
/// <br/>
|
|
/// <c>inline void SetIsSensor(bool inIsSensor)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Change the body to a sensor. A sensor will receive collision callbacks, but will not cause any collision responses and can be used as a trigger volume.
|
|
/// The cheapest sensor (in terms of CPU usage) is a sensor with motion type Static (they can be moved around using BodyInterface::SetPosition/SetPositionAndRotation).
|
|
/// These sensors will only detect collisions with active Dynamic or Kinematic bodies. As soon as a body go to sleep, the contact point with the sensor will be lost.
|
|
/// If you make a sensor Dynamic or Kinematic and activate them, the sensor will be able to detect collisions with sleeping bodies too. An active sensor will never go to sleep automatically.
|
|
/// When you make a Dynamic or Kinematic sensor, make sure it is in an ObjectLayer that does not collide with Static bodies or other sensors to avoid extra overhead in the broad phase.
|
|
/// </code>
|
|
/// </remarks>
|
|
public void SetIsSensor(bool isSensor) => Jolt.PInvoke.Body_SetIsSensor(this, isSensor);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L80">Jolt/Physics/Body/Body.h:80</see>
|
|
/// <br/>
|
|
/// <c>inline bool IsSensor() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Check if this body is a sensor.
|
|
/// </para>
|
|
/// </remarks>
|
|
public bool IsSensor() => Jolt.PInvoke.Body_IsSensor(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L85">Jolt/Physics/Body/Body.h:85</see>
|
|
/// <br/>
|
|
/// <c>inline void SetCollideKinematicVsNonDynamic(bool inCollide)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// If kinematic objects can generate contact points against other kinematic or static objects.
|
|
/// Note that turning this on can be CPU intensive as much more collision detection work will be done without any effect on the simulation (kinematic objects are not affected by other kinematic/static objects).
|
|
/// This can be used to make sensors detect static objects. Note that the sensor must be kinematic and active for it to detect static objects.
|
|
/// </code>
|
|
/// </remarks>
|
|
public void SetCollideKinematicVsNonDynamic(bool collide) => Jolt.PInvoke.Body_SetCollideKinematicVsNonDynamic(this, collide);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L88">Jolt/Physics/Body/Body.h:88</see>
|
|
/// <br/>
|
|
/// <c>inline bool GetCollideKinematicVsNonDynamic() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Check if kinematic objects can generate contact points against other kinematic or static objects.
|
|
/// </para>
|
|
/// </remarks>
|
|
public bool GetCollideKinematicVsNonDynamic() => Jolt.PInvoke.Body_GetCollideKinematicVsNonDynamic(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L94">Jolt/Physics/Body/Body.h:94</see>
|
|
/// <br/>
|
|
/// <c>inline void SetUseManifoldReduction(bool inUseReduction)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// If PhysicsSettings::mUseManifoldReduction is true, this allows turning off manifold reduction for this specific body.
|
|
/// Manifold reduction by default will combine contacts with similar normals that come from different SubShapeIDs (e.g. different triangles in a mesh shape or different compound shapes).
|
|
/// If the application requires tracking exactly which SubShapeIDs are in contact, you can turn off manifold reduction. Note that this comes at a performance cost.
|
|
/// Consider using BodyInterface::SetUseManifoldReduction if the body could already be in contact with other bodies to ensure that the contact cache is invalidated and you get the correct contact callbacks.
|
|
/// </code>
|
|
/// </remarks>
|
|
public void SetUseManifoldReduction(bool useReduction) => Jolt.PInvoke.Body_SetUseManifoldReduction(this, useReduction);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L97">Jolt/Physics/Body/Body.h:97</see>
|
|
/// <br/>
|
|
/// <c>inline bool GetUseManifoldReduction() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Check if this body can use manifold reduction.
|
|
/// </para>
|
|
/// </remarks>
|
|
public bool GetUseManifoldReduction() => Jolt.PInvoke.Body_GetUseManifoldReduction(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L100">Jolt/Physics/Body/Body.h:100</see>
|
|
/// <br/>
|
|
/// <c>inline bool GetUseManifoldReductionWithBody(const Body &inBody2) const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Checks if the combination of this body and inBody2 should use manifold reduction
|
|
/// </para>
|
|
/// </remarks>
|
|
public bool GetUseManifoldReductionWithBody(Body body2) => Jolt.PInvoke.Body_GetUseManifoldReductionWithBody(this, body2);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L103">Jolt/Physics/Body/Body.h:103</see>
|
|
/// <br/>
|
|
/// <c>inline void SetApplyGyroscopicForce(bool inApply)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Set to indicate that the gyroscopic force should be applied to this body (aka Dzhanibekov effect, see
|
|
/// https://en.wikipedia.org/wiki/Tennis_racket_theorem)
|
|
/// </para>
|
|
/// </remarks>
|
|
public void SetApplyGyroscopicForce(bool apply) => Jolt.PInvoke.Body_SetApplyGyroscopicForce(this, apply);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L106">Jolt/Physics/Body/Body.h:106</see>
|
|
/// <br/>
|
|
/// <c>inline bool GetApplyGyroscopicForce() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Check if the gyroscopic force is being applied for this body
|
|
/// </para>
|
|
/// </remarks>
|
|
public bool GetApplyGyroscopicForce() => Jolt.PInvoke.Body_GetApplyGyroscopicForce(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L109">Jolt/Physics/Body/Body.h:109</see>
|
|
/// <br/>
|
|
/// <c>inline void SetEnhancedInternalEdgeRemoval(bool inApply)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Set to indicate that extra effort should be made to try to remove ghost contacts (collisions with
|
|
/// internal edges of a mesh). This is more expensive but makes bodies move smoother over a mesh with convex
|
|
/// edges.
|
|
/// </para>
|
|
/// </remarks>
|
|
public void SetEnhancedInternalEdgeRemoval(bool apply) => Jolt.PInvoke.Body_SetEnhancedInternalEdgeRemoval(this, apply);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L112">Jolt/Physics/Body/Body.h:112</see>
|
|
/// <br/>
|
|
/// <c>inline bool GetEnhancedInternalEdgeRemoval() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Check if enhanced internal edge removal is turned on
|
|
/// </para>
|
|
/// </remarks>
|
|
public bool GetEnhancedInternalEdgeRemoval() => Jolt.PInvoke.Body_GetEnhancedInternalEdgeRemoval(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L115">Jolt/Physics/Body/Body.h:115</see>
|
|
/// <br/>
|
|
/// <c>inline bool GetEnhancedInternalEdgeRemovalWithBody(const Body &inBody2) const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Checks if the combination of this body and inBody2 should use enhanced internal edge removal
|
|
/// </para>
|
|
/// </remarks>
|
|
public bool GetEnhancedInternalEdgeRemovalWithBody(Body body2) => Jolt.PInvoke.Body_GetEnhancedInternalEdgeRemovalWithBody(this, body2);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L118">Jolt/Physics/Body/Body.h:118</see>
|
|
/// <br/>
|
|
/// <c>inline EMotionType GetMotionType() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Get the bodies motion type.
|
|
/// </para>
|
|
/// </remarks>
|
|
public EMotionType GetMotionType() => Jolt.PInvoke.Body_GetMotionType(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L121">Jolt/Physics/Body/Body.h:121</see>
|
|
/// <br/>
|
|
/// <c>void SetMotionType(EMotionType inMotionType)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Set the motion type of this body. Consider using BodyInterface::SetMotionType instead of this function
|
|
/// if the body may be active or if it needs to be activated.
|
|
/// </para>
|
|
/// </remarks>
|
|
public void SetMotionType(EMotionType motionType) => Jolt.PInvoke.Body_SetMotionType(this, motionType);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L124">Jolt/Physics/Body/Body.h:124</see>
|
|
/// <br/>
|
|
/// <c>inline BroadPhaseLayer GetBroadPhaseLayer() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Get broadphase layer, this determines in which broad phase sub-tree the object is placed
|
|
/// </para>
|
|
/// </remarks>
|
|
public byte GetBroadPhaseLayer() => Jolt.PInvoke.Body_GetBroadPhaseLayer(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L127">Jolt/Physics/Body/Body.h:127</see>
|
|
/// <br/>
|
|
/// <c>inline ObjectLayer GetObjectLayer() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Get object layer, this determines which other objects it collides with
|
|
/// </para>
|
|
/// </remarks>
|
|
public ushort GetObjectLayer() => Jolt.PInvoke.Body_GetObjectLayer(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L130">Jolt/Physics/Body/Body.h:130</see>
|
|
/// <br/>
|
|
/// <c>const CollisionGroup & GetCollisionGroup() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Collision group and sub-group ID, determines which other objects it collides with
|
|
/// </para>
|
|
/// <para>
|
|
/// The returned handle is borrowed from its owner; don't Dispose it.
|
|
/// </para>
|
|
/// </remarks>
|
|
public CollisionGroup GetCollisionGroup() => Jolt.PInvoke.Body_GetCollisionGroup(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L132">Jolt/Physics/Body/Body.h:132</see>
|
|
/// <br/>
|
|
/// <c>void SetCollisionGroup(const CollisionGroup &inGroup)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetCollisionGroup(CollisionGroup group) => Jolt.PInvoke.Body_SetCollisionGroup(this, group);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L135">Jolt/Physics/Body/Body.h:135</see>
|
|
/// <br/>
|
|
/// <c>bool GetAllowSleeping() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// If this body can go to sleep. Note that disabling sleeping on a sleeping object will not wake it up.
|
|
/// </para>
|
|
/// </remarks>
|
|
public bool GetAllowSleeping() => Jolt.PInvoke.Body_GetAllowSleeping(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L136">Jolt/Physics/Body/Body.h:136</see>
|
|
/// <br/>
|
|
/// <c>void SetAllowSleeping(bool inAllow)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetAllowSleeping(bool allow) => Jolt.PInvoke.Body_SetAllowSleeping(this, allow);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L139">Jolt/Physics/Body/Body.h:139</see>
|
|
/// <br/>
|
|
/// <c>inline void ResetSleepTimer()</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Resets the sleep timer. This does not wake up the body if it is sleeping, but allows resetting the
|
|
/// system that detects when a body is sleeping.
|
|
/// </para>
|
|
/// </remarks>
|
|
public void ResetSleepTimer() => Jolt.PInvoke.Body_ResetSleepTimer(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L142">Jolt/Physics/Body/Body.h:142</see>
|
|
/// <br/>
|
|
/// <c>inline float GetFriction() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Friction (dimensionless number, usually between 0 and 1, 0 = no friction, 1 = friction force equals
|
|
/// force that presses the two bodies together). Note that bodies can have negative friction but the
|
|
/// combined friction (see PhysicsSystem::SetCombineFriction) should never go below zero.
|
|
/// </para>
|
|
/// </remarks>
|
|
public float GetFriction() => Jolt.PInvoke.Body_GetFriction(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L143">Jolt/Physics/Body/Body.h:143</see>
|
|
/// <br/>
|
|
/// <c>void SetFriction(float inFriction)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetFriction(float friction) => Jolt.PInvoke.Body_SetFriction(this, friction);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L146">Jolt/Physics/Body/Body.h:146</see>
|
|
/// <br/>
|
|
/// <c>inline float GetRestitution() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Restitution (dimensionless number, usually between 0 and 1, 0 = completely inelastic collision response,
|
|
/// 1 = completely elastic collision response). Note that bodies can have negative restitution but the
|
|
/// combined restitution (see PhysicsSystem::SetCombineRestitution) should never go below zero.
|
|
/// </para>
|
|
/// </remarks>
|
|
public float GetRestitution() => Jolt.PInvoke.Body_GetRestitution(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L147">Jolt/Physics/Body/Body.h:147</see>
|
|
/// <br/>
|
|
/// <c>void SetRestitution(float inRestitution)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetRestitution(float restitution) => Jolt.PInvoke.Body_SetRestitution(this, restitution);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L150">Jolt/Physics/Body/Body.h:150</see>
|
|
/// <br/>
|
|
/// <c>inline Vec3 GetLinearVelocity() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Get world space linear velocity of the center of mass (unit: m/s)
|
|
/// </para>
|
|
/// </remarks>
|
|
public float3 GetLinearVelocity() => Jolt.PInvoke.Body_GetLinearVelocity(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L154">Jolt/Physics/Body/Body.h:154</see>
|
|
/// <br/>
|
|
/// <c>void SetLinearVelocity(Vec3Arg inLinearVelocity)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Set world space linear velocity of the center of mass (unit: m/s).
|
|
/// If you want the body to wake up when it is sleeping, use BodyInterface::SetLinearVelocity instead.
|
|
/// </code>
|
|
/// </remarks>
|
|
public void SetLinearVelocity(float3 linearVelocity) => Jolt.PInvoke.Body_SetLinearVelocity(this, linearVelocity);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L158">Jolt/Physics/Body/Body.h:158</see>
|
|
/// <br/>
|
|
/// <c>void SetLinearVelocityClamped(Vec3Arg inLinearVelocity)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Set world space linear velocity of the center of mass, will make sure the value is clamped against the maximum linear velocity.
|
|
/// If you want the body to wake up when it is sleeping, use BodyInterface::SetLinearVelocity instead.
|
|
/// </code>
|
|
/// </remarks>
|
|
public void SetLinearVelocityClamped(float3 linearVelocity) => Jolt.PInvoke.Body_SetLinearVelocityClamped(this, linearVelocity);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L161">Jolt/Physics/Body/Body.h:161</see>
|
|
/// <br/>
|
|
/// <c>inline Vec3 GetAngularVelocity() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Get world space angular velocity of the center of mass (unit: rad/s)
|
|
/// </para>
|
|
/// </remarks>
|
|
public float3 GetAngularVelocity() => Jolt.PInvoke.Body_GetAngularVelocity(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L165">Jolt/Physics/Body/Body.h:165</see>
|
|
/// <br/>
|
|
/// <c>void SetAngularVelocity(Vec3Arg inAngularVelocity)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Set world space angular velocity of the center of mass (unit: rad/s).
|
|
/// If you want the body to wake up when it is sleeping, use BodyInterface::SetAngularVelocity instead.
|
|
/// </code>
|
|
/// </remarks>
|
|
public void SetAngularVelocity(float3 angularVelocity) => Jolt.PInvoke.Body_SetAngularVelocity(this, angularVelocity);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L169">Jolt/Physics/Body/Body.h:169</see>
|
|
/// <br/>
|
|
/// <c>void SetAngularVelocityClamped(Vec3Arg inAngularVelocity)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Set world space angular velocity of the center of mass, will make sure the value is clamped against the maximum angular velocity.
|
|
/// If you want the body to wake up when it is sleeping, use BodyInterface::SetAngularVelocity instead.
|
|
/// </code>
|
|
/// </remarks>
|
|
public void SetAngularVelocityClamped(float3 angularVelocity) => Jolt.PInvoke.Body_SetAngularVelocityClamped(this, angularVelocity);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L172">Jolt/Physics/Body/Body.h:172</see>
|
|
/// <br/>
|
|
/// <c>inline Vec3 GetPointVelocityCOM(Vec3Arg inPointRelativeToCOM) const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Velocity of point inPoint (in center of mass space, e.g. on the surface of the body) of the body (unit:
|
|
/// m/s)
|
|
/// </para>
|
|
/// </remarks>
|
|
public float3 GetPointVelocityCOM(float3 pointRelativeToCOM) => Jolt.PInvoke.Body_GetPointVelocityCOM(this, pointRelativeToCOM);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L175">Jolt/Physics/Body/Body.h:175</see>
|
|
/// <br/>
|
|
/// <c>inline Vec3 GetPointVelocity(RVec3Arg inPoint) const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Velocity of point inPoint (in world space, e.g. on the surface of the body) of the body (unit: m/s)
|
|
/// </para>
|
|
/// </remarks>
|
|
public float3 GetPointVelocity(float3 point) => Jolt.PInvoke.Body_GetPointVelocity(this, point);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L179">Jolt/Physics/Body/Body.h:179</see>
|
|
/// <br/>
|
|
/// <c>inline void AddForce(Vec3Arg inForce)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Add force (unit: N) at center of mass for the next time step, will be reset after the next call to PhysicsSystem::Update.
|
|
/// If you want the body to wake up when it is sleeping, use BodyInterface::AddForce instead.
|
|
/// </code>
|
|
/// </remarks>
|
|
public void AddForce(float3 force) => Jolt.PInvoke.Body_AddForce(this, force);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L183">Jolt/Physics/Body/Body.h:183</see>
|
|
/// <br/>
|
|
/// <c>inline void AddForce(Vec3Arg inForce, RVec3Arg inPosition)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Add force (unit: N) at world space position inPosition for the next time step, will be reset after the next call to PhysicsSystem::Update.
|
|
/// If you want the body to wake up when it is sleeping, use BodyInterface::AddForce instead.
|
|
/// </code>
|
|
/// </remarks>
|
|
public void AddForce(float3 force, float3 position) => Jolt.PInvoke.Body_AddForce_2(this, force, position);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L187">Jolt/Physics/Body/Body.h:187</see>
|
|
/// <br/>
|
|
/// <c>inline void AddTorque(Vec3Arg inTorque)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Add torque (unit: N m) for the next time step, will be reset after the next call to PhysicsSystem::Update.
|
|
/// If you want the body to wake up when it is sleeping, use BodyInterface::AddTorque instead.
|
|
/// </code>
|
|
/// </remarks>
|
|
public void AddTorque(float3 torque) => Jolt.PInvoke.Body_AddTorque(this, torque);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L190">Jolt/Physics/Body/Body.h:190</see>
|
|
/// <br/>
|
|
/// <c>inline Vec3 GetAccumulatedForce() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Get the total amount of force applied to the center of mass this time step (through AddForce calls).
|
|
/// Note that it will reset to zero after PhysicsSystem::Update.
|
|
/// </para>
|
|
/// </remarks>
|
|
public float3 GetAccumulatedForce() => Jolt.PInvoke.Body_GetAccumulatedForce(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L193">Jolt/Physics/Body/Body.h:193</see>
|
|
/// <br/>
|
|
/// <c>inline Vec3 GetAccumulatedTorque() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Get the total amount of torque applied to the center of mass this time step (through AddForce/AddTorque
|
|
/// calls). Note that it will reset to zero after PhysicsSystem::Update.
|
|
/// </para>
|
|
/// </remarks>
|
|
public float3 GetAccumulatedTorque() => Jolt.PInvoke.Body_GetAccumulatedTorque(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L196">Jolt/Physics/Body/Body.h:196</see>
|
|
/// <br/>
|
|
/// <c>void ResetForce()</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Reset the total accumulated force, not that this will be done automatically after every time step.
|
|
/// </para>
|
|
/// </remarks>
|
|
public void ResetForce() => Jolt.PInvoke.Body_ResetForce(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L199">Jolt/Physics/Body/Body.h:199</see>
|
|
/// <br/>
|
|
/// <c>void ResetTorque()</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Reset the total accumulated torque, not that this will be done automatically after every time step.
|
|
/// </para>
|
|
/// </remarks>
|
|
public void ResetTorque() => Jolt.PInvoke.Body_ResetTorque(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L202">Jolt/Physics/Body/Body.h:202</see>
|
|
/// <br/>
|
|
/// <c>void ResetMotion()</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Reset the current velocity and accumulated force and torque.
|
|
/// </para>
|
|
/// </remarks>
|
|
public void ResetMotion() => Jolt.PInvoke.Body_ResetMotion(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L205">Jolt/Physics/Body/Body.h:205</see>
|
|
/// <br/>
|
|
/// <c>inline Mat44 GetInverseInertia() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Get inverse inertia tensor in world space
|
|
/// </para>
|
|
/// </remarks>
|
|
public float4x4 GetInverseInertia() => Jolt.PInvoke.Body_GetInverseInertia(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L209">Jolt/Physics/Body/Body.h:209</see>
|
|
/// <br/>
|
|
/// <c>inline void AddImpulse(Vec3Arg inImpulse)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Add impulse to center of mass (unit: kg m/s).
|
|
/// If you want the body to wake up when it is sleeping, use BodyInterface::AddImpulse instead.
|
|
/// </code>
|
|
/// </remarks>
|
|
public void AddImpulse(float3 impulse) => Jolt.PInvoke.Body_AddImpulse(this, impulse);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L213">Jolt/Physics/Body/Body.h:213</see>
|
|
/// <br/>
|
|
/// <c>inline void AddImpulse(Vec3Arg inImpulse, RVec3Arg inPosition)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Add impulse to point in world space (unit: kg m/s).
|
|
/// If you want the body to wake up when it is sleeping, use BodyInterface::AddImpulse instead.
|
|
/// </code>
|
|
/// </remarks>
|
|
public void AddImpulse(float3 impulse, float3 position) => Jolt.PInvoke.Body_AddImpulse_2(this, impulse, position);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L217">Jolt/Physics/Body/Body.h:217</see>
|
|
/// <br/>
|
|
/// <c>inline void AddAngularImpulse(Vec3Arg inAngularImpulse)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Add angular impulse in world space (unit: N m s).
|
|
/// If you want the body to wake up when it is sleeping, use BodyInterface::AddAngularImpulse instead.
|
|
/// </code>
|
|
/// </remarks>
|
|
public void AddAngularImpulse(float3 angularImpulse) => Jolt.PInvoke.Body_AddAngularImpulse(this, angularImpulse);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L221">Jolt/Physics/Body/Body.h:221</see>
|
|
/// <br/>
|
|
/// <c>void MoveKinematic(RVec3Arg inTargetPosition, QuatArg inTargetRotation, float inDeltaTime)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Set velocity of body such that it will be positioned at inTargetPosition/Rotation in inDeltaTime seconds.
|
|
/// If you want the body to wake up when it is sleeping, use BodyInterface::MoveKinematic instead.
|
|
/// </code>
|
|
/// </remarks>
|
|
public void MoveKinematic(float3 targetPosition, floatQuat targetRotation, float deltaTime) => Jolt.PInvoke.Body_MoveKinematic(this, targetPosition, targetRotation, deltaTime);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L229">Jolt/Physics/Body/Body.h:229</see>
|
|
/// <br/>
|
|
/// <c>void GetSubmergedVolume(RVec3Arg inSurfacePosition, Vec3Arg inSurfaceNormal, float &outTotalVolume, float &outSubmergedVolume, Vec3 &outRelativeCenterOfBuoyancy) const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Gets the properties needed to do buoyancy calculations
|
|
/// @param inSurfacePosition Position of the fluid surface in world space
|
|
/// @param inSurfaceNormal Normal of the fluid surface (should point up)
|
|
/// @param outTotalVolume On return this contains the total volume of the shape
|
|
/// @param outSubmergedVolume On return this contains the submerged volume of the shape
|
|
/// @param outRelativeCenterOfBuoyancy On return this contains the center of mass of the submerged volume relative to the center of mass of the body
|
|
/// </code>
|
|
/// </remarks>
|
|
public void GetSubmergedVolume(float3 surfacePosition, float3 surfaceNormal, out float totalVolume, out float submergedVolume, out float3 relativeCenterOfBuoyancy) => Jolt.PInvoke.Body_GetSubmergedVolume(this, surfacePosition, surfaceNormal, out totalVolume, out submergedVolume, out relativeCenterOfBuoyancy);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L242">Jolt/Physics/Body/Body.h:242</see>
|
|
/// <br/>
|
|
/// <c>bool ApplyBuoyancyImpulse(RVec3Arg inSurfacePosition, Vec3Arg inSurfaceNormal, float inBuoyancy, float inLinearDrag, float inAngularDrag, Vec3Arg inFluidVelocity, Vec3Arg inGravity, float inDeltaTime)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Applies an impulse to the body that simulates fluid buoyancy and drag.
|
|
/// If you want the body to wake up when it is sleeping, use BodyInterface::ApplyBuoyancyImpulse instead.
|
|
/// @param inSurfacePosition Position of the fluid surface in world space
|
|
/// @param inSurfaceNormal Normal of the fluid surface (should point up)
|
|
/// @param inBuoyancy The buoyancy factor for the body. 1 = neutral body, &lt; 1 sinks, &gt; 1 floats. Note that we don't use the fluid density since it is harder to configure than a simple number between [0, 2]
|
|
/// @param inLinearDrag Linear drag factor that slows down the body when in the fluid (approx. 0.5)
|
|
/// @param inAngularDrag Angular drag factor that slows down rotation when the body is in the fluid (approx. 0.01)
|
|
/// @param inFluidVelocity The average velocity of the fluid (in m/s) in which the body resides
|
|
/// @param inGravity The gravity vector (pointing down)
|
|
/// @param inDeltaTime Delta time of the next simulation step (in s)
|
|
/// @return true if an impulse was applied, false if the body was not in the fluid
|
|
/// </code>
|
|
/// </remarks>
|
|
public bool ApplyBuoyancyImpulse(float3 surfacePosition, float3 surfaceNormal, float buoyancy, float linearDrag, float angularDrag, float3 fluidVelocity, float3 gravity, float deltaTime) => Jolt.PInvoke.Body_ApplyBuoyancyImpulse(this, surfacePosition, surfaceNormal, buoyancy, linearDrag, angularDrag, fluidVelocity, gravity, deltaTime);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L256">Jolt/Physics/Body/Body.h:256</see>
|
|
/// <br/>
|
|
/// <c>bool ApplyBuoyancyImpulse(float inTotalVolume, float inSubmergedVolume, Vec3Arg inRelativeCenterOfBuoyancy, float inBuoyancy, float inLinearDrag, float inAngularDrag, Vec3Arg inFluidVelocity, Vec3Arg inGravity, float inDeltaTime)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Applies an impulse to the body that simulates fluid buoyancy and drag.
|
|
/// If you want the body to wake up when it is sleeping, use BodyInterface::ApplyBuoyancyImpulse instead.
|
|
/// @param inTotalVolume Total volume of the shape of this body (m^3)
|
|
/// @param inSubmergedVolume Submerged volume of the shape of this body (m^3)
|
|
/// @param inRelativeCenterOfBuoyancy The center of mass of the submerged volume relative to the center of mass of the body
|
|
/// @param inBuoyancy The buoyancy factor for the body. 1 = neutral body, &lt; 1 sinks, &gt; 1 floats. Note that we don't use the fluid density since it is harder to configure than a simple number between [0, 2]
|
|
/// @param inLinearDrag Linear drag factor that slows down the body when in the fluid (approx. 0.5)
|
|
/// @param inAngularDrag Angular drag factor that slows down rotation when the body is in the fluid (approx. 0.01)
|
|
/// @param inFluidVelocity The average velocity of the fluid (in m/s) in which the body resides
|
|
/// @param inGravity The gravity vector (pointing down)
|
|
/// @param inDeltaTime Delta time of the next simulation step (in s)
|
|
/// @return true if an impulse was applied, false if the body was not in the fluid
|
|
/// </code>
|
|
/// </remarks>
|
|
public bool ApplyBuoyancyImpulse(float totalVolume, float submergedVolume, float3 relativeCenterOfBuoyancy, float buoyancy, float linearDrag, float angularDrag, float3 fluidVelocity, float3 gravity, float deltaTime) => Jolt.PInvoke.Body_ApplyBuoyancyImpulse_2(this, totalVolume, submergedVolume, relativeCenterOfBuoyancy, buoyancy, linearDrag, angularDrag, fluidVelocity, gravity, deltaTime);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L259">Jolt/Physics/Body/Body.h:259</see>
|
|
/// <br/>
|
|
/// <c>inline bool IsInBroadPhase() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Check if this body has been added to the physics system
|
|
/// </para>
|
|
/// </remarks>
|
|
public bool IsInBroadPhase() => Jolt.PInvoke.Body_IsInBroadPhase(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L262">Jolt/Physics/Body/Body.h:262</see>
|
|
/// <br/>
|
|
/// <c>inline bool IsCollisionCacheInvalid() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Check if this body has been changed in such a way that the collision cache should be considered invalid
|
|
/// for any body interacting with this body
|
|
/// </para>
|
|
/// </remarks>
|
|
public bool IsCollisionCacheInvalid() => Jolt.PInvoke.Body_IsCollisionCacheInvalid(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L265">Jolt/Physics/Body/Body.h:265</see>
|
|
/// <br/>
|
|
/// <c>inline const Shape * GetShape() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Get the shape of this body
|
|
/// </para>
|
|
/// </remarks>
|
|
public Shape GetShape() => Jolt.PInvoke.Body_GetShape(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L268">Jolt/Physics/Body/Body.h:268</see>
|
|
/// <br/>
|
|
/// <c>inline RVec3 GetPosition() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// World space position of the body
|
|
/// </para>
|
|
/// </remarks>
|
|
public float3 GetPosition() => Jolt.PInvoke.Body_GetPosition(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L271">Jolt/Physics/Body/Body.h:271</see>
|
|
/// <br/>
|
|
/// <c>inline Quat GetRotation() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// World space rotation of the body
|
|
/// </para>
|
|
/// </remarks>
|
|
public floatQuat GetRotation() => Jolt.PInvoke.Body_GetRotation(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L274">Jolt/Physics/Body/Body.h:274</see>
|
|
/// <br/>
|
|
/// <c>inline RMat44 GetWorldTransform() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Calculates the transform of this body
|
|
/// </para>
|
|
/// </remarks>
|
|
public float4x4 GetWorldTransform() => Jolt.PInvoke.Body_GetWorldTransform(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L277">Jolt/Physics/Body/Body.h:277</see>
|
|
/// <br/>
|
|
/// <c>inline RVec3 GetCenterOfMassPosition() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Gets the world space position of this body's center of mass
|
|
/// </para>
|
|
/// </remarks>
|
|
public float3 GetCenterOfMassPosition() => Jolt.PInvoke.Body_GetCenterOfMassPosition(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L280">Jolt/Physics/Body/Body.h:280</see>
|
|
/// <br/>
|
|
/// <c>inline RMat44 GetCenterOfMassTransform() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Calculates the transform for this body's center of mass
|
|
/// </para>
|
|
/// </remarks>
|
|
public float4x4 GetCenterOfMassTransform() => Jolt.PInvoke.Body_GetCenterOfMassTransform(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L283">Jolt/Physics/Body/Body.h:283</see>
|
|
/// <br/>
|
|
/// <c>inline RMat44 GetInverseCenterOfMassTransform() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Calculates the inverse of the transform for this body's center of mass
|
|
/// </para>
|
|
/// </remarks>
|
|
public float4x4 GetInverseCenterOfMassTransform() => Jolt.PInvoke.Body_GetInverseCenterOfMassTransform(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L286">Jolt/Physics/Body/Body.h:286</see>
|
|
/// <br/>
|
|
/// <c>inline const AABox & GetWorldSpaceBounds() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Get world space bounding box
|
|
/// </para>
|
|
/// <para>
|
|
/// The returned handle is borrowed from its owner; don't Dispose it.
|
|
/// </para>
|
|
/// </remarks>
|
|
public AABox GetWorldSpaceBounds() => Jolt.PInvoke.Body_GetWorldSpaceBounds(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L308">Jolt/Physics/Body/Body.h:308</see>
|
|
/// <br/>
|
|
/// <c>const MotionProperties *GetMotionProperties() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Access to the motion properties
|
|
/// </para>
|
|
/// <para>
|
|
/// The returned handle is borrowed from its owner; don't Dispose it.
|
|
/// </para>
|
|
/// </remarks>
|
|
public MotionProperties GetMotionProperties() => Jolt.PInvoke.Body_GetMotionProperties(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L312">Jolt/Physics/Body/Body.h:312</see>
|
|
/// <br/>
|
|
/// <c>const MotionProperties *GetMotionPropertiesUnchecked() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Access to the motion properties (version that does not check if the object is kinematic or dynamic)
|
|
/// </para>
|
|
/// <para>
|
|
/// The returned handle is borrowed from its owner; don't Dispose it.
|
|
/// </para>
|
|
/// </remarks>
|
|
public MotionProperties GetMotionPropertiesUnchecked() => Jolt.PInvoke.Body_GetMotionPropertiesUnchecked(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L316">Jolt/Physics/Body/Body.h:316</see>
|
|
/// <br/>
|
|
/// <c>uint64 GetUserData() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Access to the user data, can be used for anything by the application
|
|
/// </para>
|
|
/// </remarks>
|
|
public ulong GetUserData() => Jolt.PInvoke.Body_GetUserData(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L317">Jolt/Physics/Body/Body.h:317</see>
|
|
/// <br/>
|
|
/// <c>void SetUserData(uint64 inUserData)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetUserData(ulong userData) => Jolt.PInvoke.Body_SetUserData(this, userData);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L320">Jolt/Physics/Body/Body.h:320</see>
|
|
/// <br/>
|
|
/// <c>inline Vec3 GetWorldSpaceSurfaceNormal(const SubShapeID &inSubShapeID, RVec3Arg inPosition) const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Get surface normal of a particular sub shape and its world space surface position on this body
|
|
/// </para>
|
|
/// </remarks>
|
|
public float3 GetWorldSpaceSurfaceNormal(uint subShapeID, float3 position) => Jolt.PInvoke.Body_GetWorldSpaceSurfaceNormal(this, subShapeID, position);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L339">Jolt/Physics/Body/Body.h:339</see>
|
|
/// <br/>
|
|
/// <c>static inline bool sFindCollidingPairsCanCollide(const Body &inBody1, const Body &inBody2)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Helper function for BroadPhase::FindCollidingPairs that returns true when two bodies can collide
|
|
/// It assumes that body 1 is dynamic and active and guarantees that it body 1 collides with body 2 that body 2 will not collide with body 1 in order to avoid finding duplicate collision pairs
|
|
/// </code>
|
|
/// </remarks>
|
|
public static bool sFindCollidingPairsCanCollide(Body body1, Body body2) => Jolt.PInvoke.Body_sFindCollidingPairsCanCollide(body1, body2);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L342">Jolt/Physics/Body/Body.h:342</see>
|
|
/// <br/>
|
|
/// <c>inline void AddPositionStep(Vec3Arg inLinearVelocityTimesDeltaTime)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Update position using an Euler step (used during position integrate & constraint solving)
|
|
/// </para>
|
|
/// </remarks>
|
|
public void AddPositionStep(float3 linearVelocityTimesDeltaTime) => Jolt.PInvoke.Body_AddPositionStep(this, linearVelocityTimesDeltaTime);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L343">Jolt/Physics/Body/Body.h:343</see>
|
|
/// <br/>
|
|
/// <c>inline void SubPositionStep(Vec3Arg inLinearVelocityTimesDeltaTime)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SubPositionStep(float3 linearVelocityTimesDeltaTime) => Jolt.PInvoke.Body_SubPositionStep(this, linearVelocityTimesDeltaTime);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L346">Jolt/Physics/Body/Body.h:346</see>
|
|
/// <br/>
|
|
/// <c>inline void AddRotationStep(Vec3Arg inAngularVelocityTimesDeltaTime)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Update rotation using an Euler step (used during position integrate & constraint solving)
|
|
/// </para>
|
|
/// </remarks>
|
|
public void AddRotationStep(float3 angularVelocityTimesDeltaTime) => Jolt.PInvoke.Body_AddRotationStep(this, angularVelocityTimesDeltaTime);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L347">Jolt/Physics/Body/Body.h:347</see>
|
|
/// <br/>
|
|
/// <c>inline void SubRotationStep(Vec3Arg inAngularVelocityTimesDeltaTime)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SubRotationStep(float3 angularVelocityTimesDeltaTime) => Jolt.PInvoke.Body_SubRotationStep(this, angularVelocityTimesDeltaTime);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L350">Jolt/Physics/Body/Body.h:350</see>
|
|
/// <br/>
|
|
/// <c>inline void SetInBroadPhaseInternal(bool inInBroadPhase)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Flag if body is in the broadphase (should only be called by the BroadPhase)
|
|
/// </para>
|
|
/// </remarks>
|
|
public void SetInBroadPhaseInternal(bool inBroadPhase) => Jolt.PInvoke.Body_SetInBroadPhaseInternal(this, inBroadPhase);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L353">Jolt/Physics/Body/Body.h:353</see>
|
|
/// <br/>
|
|
/// <c>inline bool InvalidateContactCacheInternal()</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Invalidate the contact cache (should only be called by the BodyManager), will be reset the next
|
|
/// simulation step. Returns true if the contact cache was still valid.
|
|
/// </para>
|
|
/// </remarks>
|
|
public bool InvalidateContactCacheInternal() => Jolt.PInvoke.Body_InvalidateContactCacheInternal(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L356">Jolt/Physics/Body/Body.h:356</see>
|
|
/// <br/>
|
|
/// <c>inline void ValidateContactCacheInternal()</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Reset the collision cache invalid flag (should only be called by the BodyManager).
|
|
/// </para>
|
|
/// </remarks>
|
|
public void ValidateContactCacheInternal() => Jolt.PInvoke.Body_ValidateContactCacheInternal(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L359">Jolt/Physics/Body/Body.h:359</see>
|
|
/// <br/>
|
|
/// <c>void CalculateWorldSpaceBoundsInternal()</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Updates world space bounding box (should only be called by the PhysicsSystem)
|
|
/// </para>
|
|
/// </remarks>
|
|
public void CalculateWorldSpaceBoundsInternal() => Jolt.PInvoke.Body_CalculateWorldSpaceBoundsInternal(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L362">Jolt/Physics/Body/Body.h:362</see>
|
|
/// <br/>
|
|
/// <c>void SetPositionAndRotationInternal(RVec3Arg inPosition, QuatArg inRotation, bool inResetSleepTimer = true)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Function to update body's position (should only be called by the BodyInterface since it also requires
|
|
/// updating the broadphase)
|
|
/// </para>
|
|
/// </remarks>
|
|
public void SetPositionAndRotationInternal(float3 position, floatQuat rotation, bool resetSleepTimer) => Jolt.PInvoke.Body_SetPositionAndRotationInternal(this, position, rotation, resetSleepTimer);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L367">Jolt/Physics/Body/Body.h:367</see>
|
|
/// <br/>
|
|
/// <c>void UpdateCenterOfMassInternal(Vec3Arg inPreviousCenterOfMass, bool inUpdateMassProperties)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Updates the center of mass and optionally mass properties after shifting the center of mass or changes to the shape (should only be called by the BodyInterface since it also requires updating the broadphase)
|
|
/// @param inPreviousCenterOfMass Center of mass of the shape before the alterations
|
|
/// @param inUpdateMassProperties When true, the mass and inertia tensor is recalculated
|
|
/// </code>
|
|
/// </remarks>
|
|
public void UpdateCenterOfMassInternal(float3 previousCenterOfMass, bool updateMassProperties) => Jolt.PInvoke.Body_UpdateCenterOfMassInternal(this, previousCenterOfMass, updateMassProperties);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L372">Jolt/Physics/Body/Body.h:372</see>
|
|
/// <br/>
|
|
/// <c>void SetShapeInternal(const Shape *inShape, bool inUpdateMassProperties)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Function to update a body's shape (should only be called by the BodyInterface since it also requires updating the broadphase)
|
|
/// @param inShape The new shape for this body
|
|
/// @param inUpdateMassProperties When true, the mass and inertia tensor is recalculated
|
|
/// </code>
|
|
/// </remarks>
|
|
public void SetShapeInternal(Shape shape, bool updateMassProperties) => Jolt.PInvoke.Body_SetShapeInternal(this, shape, updateMassProperties);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L380">Jolt/Physics/Body/Body.h:380</see>
|
|
/// <br/>
|
|
/// <c>uint32 GetIndexInActiveBodiesInternal() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Access to the index in the BodyManager::mActiveBodies list
|
|
/// </para>
|
|
/// </remarks>
|
|
public uint GetIndexInActiveBodiesInternal() => Jolt.PInvoke.Body_GetIndexInActiveBodiesInternal(this);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Physics/Body/Body.h#L383">Jolt/Physics/Body/Body.h:383</see>
|
|
/// <br/>
|
|
/// <c>ECanSleep UpdateSleepStateInternal(float inDeltaTime, float inMaxMovement, float inTimeBeforeSleep)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Update eligibility for sleeping
|
|
/// </para>
|
|
/// </remarks>
|
|
public ECanSleep UpdateSleepStateInternal(float deltaTime, float maxMovement, float timeBeforeSleep) => Jolt.PInvoke.Body_UpdateSleepStateInternal(this, deltaTime, maxMovement, timeBeforeSleep);
|
|
}
|
|
}
|