// // Generated by Brutal.Jolt.Generate; do not edit by hand. #nullable enable using Brutal.Interop; using Brutal.Numerics; namespace Brutal.JoltApi { /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:35 ///
/// class BodyInterface : public NonCopyable ///
///
/// /// /// Class that provides operations on bodies using a body ID. Note that if you need to do multiple operations on a single body, it is more efficient to lock the body once and combine the operations. /// All quantities are in world space unless otherwise specified. /// /// [InteropHandle] public readonly partial struct BodyInterface { /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:39 ///
/// void Init(BodyLockInterface &inBodyLockInterface, BodyManager &inBodyManager, BroadPhase &inBroadPhase) ///
///
/// /// /// Initialize the interface (should only be called by PhysicsSystem) /// /// public void Init(BodyLockInterface bodyLockInterface, BodyManager bodyManager, BroadPhase broadPhase) => Jolt.PInvoke.BodyInterface_Init(this, bodyLockInterface, bodyManager, broadPhase); /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:43 ///
/// Body * CreateBody(const BodyCreationSettings &inSettings) ///
///
/// /// /// Create a rigid body /// @return Created body or null when out of bodies /// /// /// The returned handle is borrowed from its owner; don't Dispose it. /// /// public Body CreateBody(BodyCreationSettings settings) => Jolt.PInvoke.BodyInterface_CreateBody(this, settings); /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:47 ///
/// Body * CreateSoftBody(const SoftBodyCreationSettings &inSettings) ///
///
/// /// /// Create a soft body /// @return Created body or null when out of bodies /// /// /// The returned handle is borrowed from its owner; don't Dispose it. /// /// public Body CreateSoftBody(SoftBodyCreationSettings settings) => Jolt.PInvoke.BodyInterface_CreateSoftBody(this, settings); /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:52 ///
/// Body * CreateBodyWithID(const BodyID &inBodyID, const BodyCreationSettings &inSettings) ///
///
/// /// /// Create a rigid body with specified ID. This function can be used if a simulation is to run in sync between clients or if a simulation needs to be restored exactly. /// The ID created on the server can be replicated to the client and used to create a deterministic simulation. /// @return Created body or null when the body ID is invalid or a body of the same ID already exists. /// /// /// The returned handle is borrowed from its owner; don't Dispose it. /// /// public Body CreateBodyWithID(uint bodyID, BodyCreationSettings settings) => Jolt.PInvoke.BodyInterface_CreateBodyWithID(this, bodyID, settings); /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:55 ///
/// Body * CreateSoftBodyWithID(const BodyID &inBodyID, const SoftBodyCreationSettings &inSettings) ///
///
/// /// /// Create a soft body with specified ID. See comments at CreateBodyWithID. /// /// /// The returned handle is borrowed from its owner; don't Dispose it. /// /// public Body CreateSoftBodyWithID(uint bodyID, SoftBodyCreationSettings settings) => Jolt.PInvoke.BodyInterface_CreateSoftBodyWithID(this, bodyID, settings); /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:60 ///
/// Body * CreateBodyWithoutID(const BodyCreationSettings &inSettings) const ///
///
/// /// /// Advanced use only. Creates a rigid body without specifying an ID. This body cannot be added to the physics system until it has been assigned a body ID. /// This can be used to decouple allocation from registering the body. A call to CreateBodyWithoutID followed by AssignBodyID is equivalent to calling CreateBodyWithID. /// @return Created body /// /// /// The returned handle is borrowed from its owner; don't Dispose it. /// /// public Body CreateBodyWithoutID(BodyCreationSettings settings) => Jolt.PInvoke.BodyInterface_CreateBodyWithoutID(this, settings); /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:63 ///
/// Body * CreateSoftBodyWithoutID(const SoftBodyCreationSettings &inSettings) const ///
///
/// /// /// Advanced use only. Creates a body without specifying an ID. See comments at CreateBodyWithoutID. /// /// /// The returned handle is borrowed from its owner; don't Dispose it. /// /// public Body CreateSoftBodyWithoutID(SoftBodyCreationSettings settings) => Jolt.PInvoke.BodyInterface_CreateSoftBodyWithoutID(this, settings); /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:67 ///
/// void DestroyBodyWithoutID(Body *inBody) const ///
///
/// /// /// Advanced use only. Destroy a body previously created with CreateBodyWithoutID that hasn't gotten an ID yet through the AssignBodyID function, /// or a body that has had its body ID unassigned through UnassignBodyIDs. Bodies that have an ID should be destroyed through DestroyBody. /// /// public void DestroyBodyWithoutID(Body body) => Jolt.PInvoke.BodyInterface_DestroyBodyWithoutID(this, body); /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:71 ///
/// bool AssignBodyID(Body *ioBody) ///
///
/// /// /// Advanced use only. Assigns the next available body ID to a body that was created using CreateBodyWithoutID. After this call, the body can be added to the physics system. /// @return false if the body already has an ID or out of body ids. /// /// public bool AssignBodyID(Body body) => Jolt.PInvoke.BodyInterface_AssignBodyID(this, body); /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:75 ///
/// bool AssignBodyID(Body *ioBody, const BodyID &inBodyID) ///
///
/// /// /// Advanced use only. Assigns a body ID to a body that was created using CreateBodyWithoutID. After this call, the body can be added to the physics system. /// @return false if the body already has an ID or if the ID is not valid. /// /// public bool AssignBodyID(Body body, uint bodyID) => Jolt.PInvoke.BodyInterface_AssignBodyID_2(this, body, bodyID); /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:78 ///
/// Body * UnassignBodyID(const BodyID &inBodyID) ///
///
/// /// /// Advanced use only. See UnassignBodyIDs. Unassigns the ID of a single body. /// /// /// The returned handle is borrowed from its owner; don't Dispose it. /// /// public Body UnassignBodyID(uint bodyID) => Jolt.PInvoke.BodyInterface_UnassignBodyID(this, bodyID); /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:89 ///
/// void DestroyBody(const BodyID &inBodyID) ///
///
/// /// /// Destroy a body. /// Make sure that you remove the body from the physics system using BodyInterface::RemoveBody before calling this function. /// /// public void DestroyBody(uint bodyID) => Jolt.PInvoke.BodyInterface_DestroyBody(this, bodyID); /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:93 ///
/// void DestroyBodies(const BodyID *inBodyIDs, int inNumber) ///
///
/// /// /// Destroy multiple bodies /// Make sure that you remove the bodies from the physics system using BodyInterface::RemoveBody before calling this function. /// /// public unsafe void DestroyBodies(Ptr bodyIDs, ElementCount number) => Jolt.PInvoke.BodyInterface_DestroyBodies(this, bodyIDs, number); /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:99 ///
/// void AddBody(const BodyID &inBodyID, EActivation inActivationMode) ///
///
/// /// /// Add body to the physics system. /// Note that if you need to add multiple bodies, use the AddBodiesPrepare/AddBodiesFinalize function. /// Adding many bodies, one at a time, results in a really inefficient broadphase until PhysicsSystem::OptimizeBroadPhase is called or when PhysicsSystem::Update rebuilds the tree! /// After adding, to get a body by ID use the BodyLockRead or BodyLockWrite interface! /// /// public void AddBody(uint bodyID, EActivation activationMode) => Jolt.PInvoke.BodyInterface_AddBody(this, bodyID, activationMode); /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:102 ///
/// void RemoveBody(const BodyID &inBodyID) ///
///
/// /// /// Remove body from the physics system. Note that you need to add a body to the physics system before you /// can remove it. /// /// public void RemoveBody(uint bodyID) => Jolt.PInvoke.BodyInterface_RemoveBody(this, bodyID); /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:105 ///
/// bool IsAdded(const BodyID &inBodyID) const ///
///
/// /// /// Check if a body has been added to the physics system. /// /// public bool IsAdded(uint bodyID) => Jolt.PInvoke.BodyInterface_IsAdded(this, bodyID); /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:109 ///
/// BodyID CreateAndAddBody(const BodyCreationSettings &inSettings, EActivation inActivationMode) ///
///
/// /// /// Combines CreateBody and AddBody /// @return Created body ID or an invalid ID when out of bodies /// /// public uint CreateAndAddBody(BodyCreationSettings settings, EActivation activationMode) => Jolt.PInvoke.BodyInterface_CreateAndAddBody(this, settings, activationMode); /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:113 ///
/// BodyID CreateAndAddSoftBody(const SoftBodyCreationSettings &inSettings, EActivation inActivationMode) ///
///
/// /// /// Combines CreateSoftBody and AddBody /// @return Created body ID or an invalid ID when out of bodies /// /// public uint CreateAndAddSoftBody(SoftBodyCreationSettings settings, EActivation activationMode) => Jolt.PInvoke.BodyInterface_CreateAndAddSoftBody(this, settings, activationMode); /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:137 ///
/// void RemoveBodies(BodyID *ioBodies, int inNumber) ///
///
/// /// /// Remove inNumber bodies in ioBodies from the PhysicsSystem. Note that bodies need to be added to the physics system before they can be removed. /// ioBodies may be shuffled around by this function. /// /// public unsafe void RemoveBodies(Ptr bodies, ElementCount number) => Jolt.PInvoke.BodyInterface_RemoveBodies(this, bodies, number); /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:142 ///
/// void ActivateBody(const BodyID &inBodyID) ///
///
/// /// /// @name Activate / deactivate a body. Note that you need to add a body to the physics system before you can activate it. /// @{ /// /// public void ActivateBody(uint bodyID) => Jolt.PInvoke.BodyInterface_ActivateBody(this, bodyID); /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:143 ///
/// void ActivateBodies(const BodyID *inBodyIDs, int inNumber) ///
///
public unsafe void ActivateBodies(Ptr bodyIDs, ElementCount number) => Jolt.PInvoke.BodyInterface_ActivateBodies(this, bodyIDs, number); /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:144 ///
/// void ActivateBodiesInAABox(const AABox &inBox, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter, const ObjectLayerFilter &inObjectLayerFilter) ///
///
public void ActivateBodiesInAABox(AABox box, BroadPhaseLayerFilter broadPhaseLayerFilter, ObjectLayerFilter objectLayerFilter) => Jolt.PInvoke.BodyInterface_ActivateBodiesInAABox(this, box, broadPhaseLayerFilter, objectLayerFilter); /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:145 ///
/// void DeactivateBody(const BodyID &inBodyID) ///
///
public void DeactivateBody(uint bodyID) => Jolt.PInvoke.BodyInterface_DeactivateBody(this, bodyID); /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:146 ///
/// void DeactivateBodies(const BodyID *inBodyIDs, int inNumber) ///
///
public unsafe void DeactivateBodies(Ptr bodyIDs, ElementCount number) => Jolt.PInvoke.BodyInterface_DeactivateBodies(this, bodyIDs, number); /// /// /// Checks if a body is currently actively simulating /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:147 ///
/// bool IsActive(const BodyID &inBodyID) const ///
///
public bool IsActive(uint bodyID) => Jolt.PInvoke.BodyInterface_IsActive(this, bodyID); /// /// /// @see Body::ResetSleepTimer /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:148 ///
/// void ResetSleepTimer(const BodyID &inBodyID) ///
///
public void ResetSleepTimer(uint bodyID) => Jolt.PInvoke.BodyInterface_ResetSleepTimer(this, bodyID); /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:152 ///
/// TwoBodyConstraint * CreateConstraint(const TwoBodyConstraintSettings *inSettings, const BodyID &inBodyID1, const BodyID &inBodyID2) ///
///
/// /// /// Create a two body constraint /// /// public TwoBodyConstraint CreateConstraint(TwoBodyConstraintSettings settings, uint bodyID1, uint bodyID2) => Jolt.PInvoke.BodyInterface_CreateConstraint(this, settings, bodyID1, bodyID2); /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:156 ///
/// void ActivateConstraint(const TwoBodyConstraint *inConstraint) ///
///
/// /// /// Activate non-static bodies attached to a constraint. /// Note that the bodies involved in the constraint should be added to the physics system before activating a constraint. /// /// public void ActivateConstraint(TwoBodyConstraint constraint) => Jolt.PInvoke.BodyInterface_ActivateConstraint(this, constraint); /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:162 ///
/// RefConst<Shape> GetShape(const BodyID &inBodyID) const ///
///
/// /// /// Get the current shape /// /// public Shape GetShape(uint bodyID) => Jolt.PInvoke.BodyInterface_GetShape(this, bodyID); /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:169 ///
/// void SetShape(const BodyID &inBodyID, const Shape *inShape, bool inUpdateMassProperties, EActivation inActivationMode) const ///
///
/// /// /// Set a new shape on the body /// @param inBodyID Body ID of body that had its shape changed /// @param inShape The new shape /// @param inUpdateMassProperties When true, the mass and inertia tensor is recalculated /// @param inActivationMode Whether or not to activate the body /// /// public void SetShape(uint bodyID, Shape shape, bool updateMassProperties, EActivation activationMode) => Jolt.PInvoke.BodyInterface_SetShape(this, bodyID, shape, updateMassProperties, activationMode); /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:176 ///
/// void NotifyShapeChanged(const BodyID &inBodyID, Vec3Arg inPreviousCenterOfMass, bool inUpdateMassProperties, EActivation inActivationMode) const ///
///
/// /// /// Notify all systems to indicate that a shape has changed (usable for MutableCompoundShapes) /// @param inBodyID Body ID of body that had its shape changed /// @param inPreviousCenterOfMass Center of mass of the shape before the alterations /// @param inUpdateMassProperties When true, the mass and inertia tensor is recalculated /// @param inActivationMode Whether or not to activate the body /// /// public void NotifyShapeChanged(uint bodyID, float3 previousCenterOfMass, bool updateMassProperties, EActivation activationMode) => Jolt.PInvoke.BodyInterface_NotifyShapeChanged(this, bodyID, previousCenterOfMass, updateMassProperties, activationMode); /// /// /// The collision layer this body belongs to (determines if two objects can collide) /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:181 ///
/// void SetObjectLayer(const BodyID &inBodyID, ObjectLayer inLayer) ///
///
/// /// /// @name Object layer of a body /// @{ /// /// public void SetObjectLayer(uint bodyID, ushort layer) => Jolt.PInvoke.BodyInterface_SetObjectLayer(this, bodyID, layer); /// /// /// @see Body::GetObjectLayer /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:182 ///
/// ObjectLayer GetObjectLayer(const BodyID &inBodyID) const ///
///
public ushort GetObjectLayer(uint bodyID) => Jolt.PInvoke.BodyInterface_GetObjectLayer(this, bodyID); /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:187 ///
/// void SetPositionAndRotation(const BodyID &inBodyID, RVec3Arg inPosition, QuatArg inRotation, EActivation inActivationMode) ///
///
/// /// /// @name Position and rotation of a body /// @{ /// /// public void SetPositionAndRotation(uint bodyID, float3 position, floatQuat rotation, EActivation activationMode) => Jolt.PInvoke.BodyInterface_SetPositionAndRotation(this, bodyID, position, rotation, activationMode); /// /// /// Will only update the position/rotation and activate the body when the difference is larger than a very /// small number. This avoids updating the broadphase/waking up a body when the resulting /// position/orientation doesn't really change. /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:188 ///
/// void SetPositionAndRotationWhenChanged(const BodyID &inBodyID, RVec3Arg inPosition, QuatArg inRotation, EActivation inActivationMode) ///
///
public void SetPositionAndRotationWhenChanged(uint bodyID, float3 position, floatQuat rotation, EActivation activationMode) => Jolt.PInvoke.BodyInterface_SetPositionAndRotationWhenChanged(this, bodyID, position, rotation, activationMode); /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:189 ///
/// void GetPositionAndRotation(const BodyID &inBodyID, RVec3 &outPosition, Quat &outRotation) const ///
///
public void GetPositionAndRotation(uint bodyID, out float3 position, out floatQuat rotation) => Jolt.PInvoke.BodyInterface_GetPositionAndRotation(this, bodyID, out position, out rotation); /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:190 ///
/// void SetPosition(const BodyID &inBodyID, RVec3Arg inPosition, EActivation inActivationMode) ///
///
public void SetPosition(uint bodyID, float3 position, EActivation activationMode) => Jolt.PInvoke.BodyInterface_SetPosition(this, bodyID, position, activationMode); /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:191 ///
/// RVec3 GetPosition(const BodyID &inBodyID) const ///
///
public float3 GetPosition(uint bodyID) => Jolt.PInvoke.BodyInterface_GetPosition(this, bodyID); /// /// /// @see Body::GetCenterOfMassPosition /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:192 ///
/// RVec3 GetCenterOfMassPosition(const BodyID &inBodyID) const ///
///
public float3 GetCenterOfMassPosition(uint bodyID) => Jolt.PInvoke.BodyInterface_GetCenterOfMassPosition(this, bodyID); /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:193 ///
/// void SetRotation(const BodyID &inBodyID, QuatArg inRotation, EActivation inActivationMode) ///
///
public void SetRotation(uint bodyID, floatQuat rotation, EActivation activationMode) => Jolt.PInvoke.BodyInterface_SetRotation(this, bodyID, rotation, activationMode); /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:194 ///
/// Quat GetRotation(const BodyID &inBodyID) const ///
///
public floatQuat GetRotation(uint bodyID) => Jolt.PInvoke.BodyInterface_GetRotation(this, bodyID); /// /// /// @see Body::GetWorldTransform /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:195 ///
/// RMat44 GetWorldTransform(const BodyID &inBodyID) const ///
///
public float4x4 GetWorldTransform(uint bodyID) => Jolt.PInvoke.BodyInterface_GetWorldTransform(this, bodyID); /// /// /// @see Body::GetCenterOfMassTransform /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:196 ///
/// RMat44 GetCenterOfMassTransform(const BodyID &inBodyID) const ///
///
public float4x4 GetCenterOfMassTransform(uint bodyID) => Jolt.PInvoke.BodyInterface_GetCenterOfMassTransform(this, bodyID); /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:200 ///
/// void MoveKinematic(const BodyID &inBodyID, RVec3Arg inTargetPosition, QuatArg inTargetRotation, float inDeltaTime) ///
///
/// /// /// Set velocity of body such that it will be positioned at inTargetPosition/Rotation in inDeltaTime seconds /// (will activate body if needed) /// /// public void MoveKinematic(uint bodyID, float3 targetPosition, floatQuat targetRotation, float deltaTime) => Jolt.PInvoke.BodyInterface_MoveKinematic(this, bodyID, targetPosition, targetRotation, deltaTime); /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:204 ///
/// void SetLinearAndAngularVelocity(const BodyID &inBodyID, Vec3Arg inLinearVelocity, Vec3Arg inAngularVelocity) ///
///
/// /// /// Linear or angular velocity (functions will activate body if needed). /// Note that the linear velocity is the velocity of the center of mass, which may not coincide with the position of your object, to correct for this: \f$VelocityCOM = Velocity - AngularVelocity \times ShapeCOM\f$ /// /// public void SetLinearAndAngularVelocity(uint bodyID, float3 linearVelocity, float3 angularVelocity) => Jolt.PInvoke.BodyInterface_SetLinearAndAngularVelocity(this, bodyID, linearVelocity, angularVelocity); /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:205 ///
/// void GetLinearAndAngularVelocity(const BodyID &inBodyID, Vec3 &outLinearVelocity, Vec3 &outAngularVelocity) const ///
///
public void GetLinearAndAngularVelocity(uint bodyID, out float3 linearVelocity, out float3 angularVelocity) => Jolt.PInvoke.BodyInterface_GetLinearAndAngularVelocity(this, bodyID, out linearVelocity, out angularVelocity); /// /// /// @see Body::SetLinearVelocity /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:206 ///
/// void SetLinearVelocity(const BodyID &inBodyID, Vec3Arg inLinearVelocity) ///
///
public void SetLinearVelocity(uint bodyID, float3 linearVelocity) => Jolt.PInvoke.BodyInterface_SetLinearVelocity(this, bodyID, linearVelocity); /// /// /// @see Body::GetLinearVelocity /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:207 ///
/// Vec3 GetLinearVelocity(const BodyID &inBodyID) const ///
///
public float3 GetLinearVelocity(uint bodyID) => Jolt.PInvoke.BodyInterface_GetLinearVelocity(this, bodyID); /// /// /// Add velocity to current velocity /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:208 ///
/// void AddLinearVelocity(const BodyID &inBodyID, Vec3Arg inLinearVelocity) ///
///
public void AddLinearVelocity(uint bodyID, float3 linearVelocity) => Jolt.PInvoke.BodyInterface_AddLinearVelocity(this, bodyID, linearVelocity); /// /// /// Add linear and angular to current velocities /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:209 ///
/// void AddLinearAndAngularVelocity(const BodyID &inBodyID, Vec3Arg inLinearVelocity, Vec3Arg inAngularVelocity) ///
///
public void AddLinearAndAngularVelocity(uint bodyID, float3 linearVelocity, float3 angularVelocity) => Jolt.PInvoke.BodyInterface_AddLinearAndAngularVelocity(this, bodyID, linearVelocity, angularVelocity); /// /// /// @see Body::SetAngularVelocity /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:210 ///
/// void SetAngularVelocity(const BodyID &inBodyID, Vec3Arg inAngularVelocity) ///
///
public void SetAngularVelocity(uint bodyID, float3 angularVelocity) => Jolt.PInvoke.BodyInterface_SetAngularVelocity(this, bodyID, angularVelocity); /// /// /// @see Body::GetAngularVelocity /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:211 ///
/// Vec3 GetAngularVelocity(const BodyID &inBodyID) const ///
///
public float3 GetAngularVelocity(uint bodyID) => Jolt.PInvoke.BodyInterface_GetAngularVelocity(this, bodyID); /// /// /// Velocity of point inPoint (in world space, e.g. on the surface of the body) of the body. @see /// Body::GetPointVelocity /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:212 ///
/// Vec3 GetPointVelocity(const BodyID &inBodyID, RVec3Arg inPoint) const ///
///
public float3 GetPointVelocity(uint bodyID, float3 point) => Jolt.PInvoke.BodyInterface_GetPointVelocity(this, bodyID, point); /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:216 ///
/// void SetPositionRotationAndVelocity(const BodyID &inBodyID, RVec3Arg inPosition, QuatArg inRotation, Vec3Arg inLinearVelocity, Vec3Arg inAngularVelocity) ///
///
/// /// /// Set the complete motion state of a body. /// Note that the linear velocity is the velocity of the center of mass, which may not coincide with the position of your object, to correct for this: \f$VelocityCOM = Velocity - AngularVelocity \times ShapeCOM\f$ /// /// public void SetPositionRotationAndVelocity(uint bodyID, float3 position, floatQuat rotation, float3 linearVelocity, float3 angularVelocity) => Jolt.PInvoke.BodyInterface_SetPositionRotationAndVelocity(this, bodyID, position, rotation, linearVelocity, angularVelocity); /// /// /// @see Body::AddForce /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:220 ///
/// void AddForce(const BodyID &inBodyID, Vec3Arg inForce, EActivation inActivationMode = EActivation::Activate) ///
///
/// /// /// @name Add forces to the body. Note that you should add a body to the physics system before applying forces or torques. /// @{ /// /// public void AddForce(uint bodyID, float3 force, EActivation activationMode) => Jolt.PInvoke.BodyInterface_AddForce(this, bodyID, force, activationMode); /// /// /// Applied at world space position inPoint. @see Body::AddForce /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:221 ///
/// void AddForce(const BodyID &inBodyID, Vec3Arg inForce, RVec3Arg inPoint, EActivation inActivationMode = EActivation::Activate) ///
///
public void AddForce(uint bodyID, float3 force, float3 point, EActivation activationMode) => Jolt.PInvoke.BodyInterface_AddForce_2(this, bodyID, force, point, activationMode); /// /// /// @see Body::AddTorque /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:222 ///
/// void AddTorque(const BodyID &inBodyID, Vec3Arg inTorque, EActivation inActivationMode = EActivation::Activate) ///
///
public void AddTorque(uint bodyID, float3 torque, EActivation activationMode) => Jolt.PInvoke.BodyInterface_AddTorque(this, bodyID, torque, activationMode); /// /// /// A combination of Body::AddForce and Body::AddTorque /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:223 ///
/// void AddForceAndTorque(const BodyID &inBodyID, Vec3Arg inForce, Vec3Arg inTorque, EActivation inActivationMode = EActivation::Activate) ///
///
public void AddForceAndTorque(uint bodyID, float3 force, float3 torque, EActivation activationMode) => Jolt.PInvoke.BodyInterface_AddForceAndTorque(this, bodyID, force, torque, activationMode); /// /// /// Applied at center of mass. @see Body::AddImpulse /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:228 ///
/// void AddImpulse(const BodyID &inBodyID, Vec3Arg inImpulse) ///
///
/// /// /// @name Add an impulse to the body. Note that you should add a body to the physics system before applying impulses. /// @{ /// /// public void AddImpulse(uint bodyID, float3 impulse) => Jolt.PInvoke.BodyInterface_AddImpulse(this, bodyID, impulse); /// /// /// Applied at world space position inPoint. @see Body::AddImpulse /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:229 ///
/// void AddImpulse(const BodyID &inBodyID, Vec3Arg inImpulse, RVec3Arg inPoint) ///
///
public void AddImpulse(uint bodyID, float3 impulse, float3 point) => Jolt.PInvoke.BodyInterface_AddImpulse_2(this, bodyID, impulse, point); /// /// /// @see Body::AddAngularImpulse /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:230 ///
/// void AddAngularImpulse(const BodyID &inBodyID, Vec3Arg inAngularImpulse) ///
///
public void AddAngularImpulse(uint bodyID, float3 angularImpulse) => Jolt.PInvoke.BodyInterface_AddAngularImpulse(this, bodyID, angularImpulse); /// /// /// @see Body::ApplyBuoyancyImpulse /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:231 ///
/// bool ApplyBuoyancyImpulse(const BodyID &inBodyID, RVec3Arg inSurfacePosition, Vec3Arg inSurfaceNormal, float inBuoyancy, float inLinearDrag, float inAngularDrag, Vec3Arg inFluidVelocity, Vec3Arg inGravity, float inDeltaTime) ///
///
public bool ApplyBuoyancyImpulse(uint bodyID, float3 surfacePosition, float3 surfaceNormal, float buoyancy, float linearDrag, float angularDrag, float3 fluidVelocity, float3 gravity, float deltaTime) => Jolt.PInvoke.BodyInterface_ApplyBuoyancyImpulse(this, bodyID, surfacePosition, surfaceNormal, buoyancy, linearDrag, angularDrag, fluidVelocity, gravity, deltaTime); /// /// /// @see Body::GetBodyType /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:236 ///
/// EBodyType GetBodyType(const BodyID &inBodyID) const ///
///
/// /// /// @name Body type /// @{ /// /// public EBodyType GetBodyType(uint bodyID) => Jolt.PInvoke.BodyInterface_GetBodyType(this, bodyID); /// /// /// @see Body::SetMotionType /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:241 ///
/// void SetMotionType(const BodyID &inBodyID, EMotionType inMotionType, EActivation inActivationMode) ///
///
/// /// /// @name Body motion type /// @{ /// /// public void SetMotionType(uint bodyID, EMotionType motionType, EActivation activationMode) => Jolt.PInvoke.BodyInterface_SetMotionType(this, bodyID, motionType, activationMode); /// /// /// @see Body::GetMotionType /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:242 ///
/// EMotionType GetMotionType(const BodyID &inBodyID) const ///
///
public EMotionType GetMotionType(uint bodyID) => Jolt.PInvoke.BodyInterface_GetMotionType(this, bodyID); /// /// /// How well it detects collisions when it has a high velocity /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:247 ///
/// void SetMotionQuality(const BodyID &inBodyID, EMotionQuality inMotionQuality) ///
///
/// /// /// @name Body motion quality /// @{ /// /// public void SetMotionQuality(uint bodyID, EMotionQuality motionQuality) => Jolt.PInvoke.BodyInterface_SetMotionQuality(this, bodyID, motionQuality); /// /// /// @see MotionProperties::GetMotionQuality /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:248 ///
/// EMotionQuality GetMotionQuality(const BodyID &inBodyID) const ///
///
public EMotionQuality GetMotionQuality(uint bodyID) => Jolt.PInvoke.BodyInterface_GetMotionQuality(this, bodyID); /// /// /// @see Body::GetInverseInertia /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:252 ///
/// Mat44 GetInverseInertia(const BodyID &inBodyID) const ///
///
/// /// /// Get inverse inertia tensor in world space /// /// public float4x4 GetInverseInertia(uint bodyID) => Jolt.PInvoke.BodyInterface_GetInverseInertia(this, bodyID); /// /// /// @see Body::SetRestitution /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:256 ///
/// void SetRestitution(const BodyID &inBodyID, float inRestitution) ///
///
/// /// /// @name Restitution /// @{ /// /// public void SetRestitution(uint bodyID, float restitution) => Jolt.PInvoke.BodyInterface_SetRestitution(this, bodyID, restitution); /// /// /// @see Body::GetRestitution /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:257 ///
/// float GetRestitution(const BodyID &inBodyID) const ///
///
public float GetRestitution(uint bodyID) => Jolt.PInvoke.BodyInterface_GetRestitution(this, bodyID); /// /// /// @see Body::SetFriction /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:262 ///
/// void SetFriction(const BodyID &inBodyID, float inFriction) ///
///
/// /// /// @name Friction /// @{ /// /// public void SetFriction(uint bodyID, float friction) => Jolt.PInvoke.BodyInterface_SetFriction(this, bodyID, friction); /// /// /// @see Body::GetFriction /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:263 ///
/// float GetFriction(const BodyID &inBodyID) const ///
///
public float GetFriction(uint bodyID) => Jolt.PInvoke.BodyInterface_GetFriction(this, bodyID); /// /// /// @see MotionProperties::SetGravityFactor /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:268 ///
/// void SetGravityFactor(const BodyID &inBodyID, float inGravityFactor) ///
///
/// /// /// @name Gravity factor /// @{ /// /// public void SetGravityFactor(uint bodyID, float gravityFactor) => Jolt.PInvoke.BodyInterface_SetGravityFactor(this, bodyID, gravityFactor); /// /// /// @see MotionProperties::GetGravityFactor /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:269 ///
/// float GetGravityFactor(const BodyID &inBodyID) const ///
///
public float GetGravityFactor(uint bodyID) => Jolt.PInvoke.BodyInterface_GetGravityFactor(this, bodyID); /// /// /// @see MotionProperties::SetMaxLinearVelocity /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:274 ///
/// void SetMaxLinearVelocity(const BodyID &inBodyID, float inLinearVelocity) ///
///
/// /// /// @name Max linear velocity /// @{ /// /// public void SetMaxLinearVelocity(uint bodyID, float linearVelocity) => Jolt.PInvoke.BodyInterface_SetMaxLinearVelocity(this, bodyID, linearVelocity); /// /// /// @see MotionProperties::GetMaxLinearVelocity /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:275 ///
/// float GetMaxLinearVelocity(const BodyID &inBodyID) const ///
///
public float GetMaxLinearVelocity(uint bodyID) => Jolt.PInvoke.BodyInterface_GetMaxLinearVelocity(this, bodyID); /// /// /// @see MotionProperties::SetMaxAngularVelocity /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:280 ///
/// void SetMaxAngularVelocity(const BodyID &inBodyID, float inAngularVelocity) ///
///
/// /// /// @name Max angular velocity /// @{ /// /// public void SetMaxAngularVelocity(uint bodyID, float angularVelocity) => Jolt.PInvoke.BodyInterface_SetMaxAngularVelocity(this, bodyID, angularVelocity); /// /// /// @see MotionProperties::GetMaxAngularVelocity /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:281 ///
/// float GetMaxAngularVelocity(const BodyID &inBodyID) const ///
///
public float GetMaxAngularVelocity(uint bodyID) => Jolt.PInvoke.BodyInterface_GetMaxAngularVelocity(this, bodyID); /// /// /// @see Body::SetUseManifoldReduction /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:286 ///
/// void SetUseManifoldReduction(const BodyID &inBodyID, bool inUseReduction) ///
///
/// /// /// @name Manifold reduction /// @{ /// /// public void SetUseManifoldReduction(uint bodyID, bool useReduction) => Jolt.PInvoke.BodyInterface_SetUseManifoldReduction(this, bodyID, useReduction); /// /// /// @see Body::GetUseManifoldReduction /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:287 ///
/// bool GetUseManifoldReduction(const BodyID &inBodyID) const ///
///
public bool GetUseManifoldReduction(uint bodyID) => Jolt.PInvoke.BodyInterface_GetUseManifoldReduction(this, bodyID); /// /// /// @see Body::SetIsSensor /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:292 ///
/// void SetIsSensor(const BodyID &inBodyID, bool inIsSensor) ///
///
/// /// /// @name Sensor /// @{ /// /// public void SetIsSensor(uint bodyID, bool isSensor) => Jolt.PInvoke.BodyInterface_SetIsSensor(this, bodyID, isSensor); /// /// /// @see Body::IsSensor /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:293 ///
/// bool IsSensor(const BodyID &inBodyID) const ///
///
public bool IsSensor(uint bodyID) => Jolt.PInvoke.BodyInterface_IsSensor(this, bodyID); /// /// /// @see Body::SetCollisionGroup /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:298 ///
/// void SetCollisionGroup(const BodyID &inBodyID, const CollisionGroup &inCollisionGroup) ///
///
/// /// /// @name Collision group /// @{ /// /// public void SetCollisionGroup(uint bodyID, CollisionGroup collisionGroup) => Jolt.PInvoke.BodyInterface_SetCollisionGroup(this, bodyID, collisionGroup); /// /// /// @see Body::GetCollisionGroup /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:299 ///
/// const CollisionGroup & GetCollisionGroup(const BodyID &inBodyID) const ///
///
/// /// /// The returned handle is borrowed from its owner; don't Dispose it. /// /// public CollisionGroup GetCollisionGroup(uint bodyID) => Jolt.PInvoke.BodyInterface_GetCollisionGroup(this, bodyID); /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:306 ///
/// uint64 GetUserData(const BodyID &inBodyID) const ///
///
/// /// /// Get the user data for a body /// /// public ulong GetUserData(uint bodyID) => Jolt.PInvoke.BodyInterface_GetUserData(this, bodyID); /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:307 ///
/// void SetUserData(const BodyID &inBodyID, uint64 inUserData) const ///
///
public void SetUserData(uint bodyID, ulong userData) => Jolt.PInvoke.BodyInterface_SetUserData(this, bodyID, userData); /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:310 ///
/// const PhysicsMaterial * GetMaterial(const BodyID &inBodyID, const SubShapeID &inSubShapeID) const ///
///
/// /// /// Get the material for a particular sub shape /// /// public PhysicsMaterial GetMaterial(uint bodyID, uint subShapeID) => Jolt.PInvoke.BodyInterface_GetMaterial(this, bodyID, subShapeID); /// /// /// C++: /// Jolt/Physics/Body/BodyInterface.h:313 ///
/// void InvalidateContactCache(const BodyID &inBodyID) ///
///
/// /// /// Set the Body::EFlags::InvalidateContactCache flag for the specified body. This means that the collision /// cache is invalid for any body pair involving that body until the next physics step. /// /// public void InvalidateContactCache(uint bodyID) => Jolt.PInvoke.BodyInterface_InvalidateContactCache(this, bodyID); } }