//
// Generated by Brutal.Jolt.Generate; do not edit by hand.
#nullable enable
using System.Runtime.CompilerServices;
using Brutal.Interop;
using Brutal.Numerics;
namespace Brutal.JoltApi
{
///
///
/// Settings for constructing a rigid body
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:30
///
/// class BodyCreationSettings
///
///
[InteropHandle]
public readonly partial struct BodyCreationSettings : IDisposable
{
///
///
/// Constructor
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:36
///
/// BodyCreationSettings() = default
///
///
public static BodyCreationSettings Create() => Jolt.PInvoke.BodyCreationSettings_Create();
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:37
///
/// BodyCreationSettings(const ShapeSettings *inShape, RVec3Arg inPosition, QuatArg inRotation, EMotionType inMotionType, ObjectLayer inObjectLayer)
///
///
public static BodyCreationSettings Create(
ShapeSettings shape,
float3 position,
floatQuat rotation,
MotionType motionType,
ushort objectLayer
) => Jolt.PInvoke.BodyCreationSettings_Create_2(shape, position, rotation, motionType, objectLayer);
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:38
///
/// BodyCreationSettings(const Shape *inShape, RVec3Arg inPosition, QuatArg inRotation, EMotionType inMotionType, ObjectLayer inObjectLayer)
///
///
public static BodyCreationSettings Create(
Shape shape,
float3 position,
floatQuat rotation,
MotionType motionType,
ushort objectLayer
) => Jolt.PInvoke.BodyCreationSettings_Create_3(shape, position, rotation, motionType, objectLayer);
///
///
/// Access to the shape settings object. This contains serializable (non-runtime optimized) information
/// about the Shape.
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:45
///
/// const ShapeSettings * GetShapeSettings() const
///
///
///
///
/// The returned handle carries its own reference; Dispose it once when you're done.
///
///
public ShapeSettings GetShapeSettings() => Jolt.PInvoke.BodyCreationSettings_GetShapeSettings(this);
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:46
///
/// void SetShapeSettings(const ShapeSettings *inShape)
///
///
public void SetShapeSettings(ShapeSettings shape) =>
Jolt.PInvoke.BodyCreationSettings_SetShapeSettings(this, shape);
///
///
/// Convert ShapeSettings object into a Shape object. This will free the ShapeSettings object and make the
/// object ready for runtime. Serialization is no longer possible after this.
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:49
///
/// Shape::ShapeResult ConvertShapeSettings()
///
///
///
///
/// Throws JoltException with Jolt's error message when the operation fails.
///
///
public Shape ConvertShapeSettings()
{
var _handle = Jolt.PInvoke.BodyCreationSettings_ConvertShapeSettings(this);
if (_handle.IsNull())
throw JoltException.FromLastError();
return _handle;
}
///
///
/// Access to the run-time shape object. Will convert from ShapeSettings object if needed.
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:52
///
/// const Shape * GetShape() const
///
///
///
///
/// The returned handle carries its own reference; Dispose it once when you're done.
///
///
public Shape GetShape() => Jolt.PInvoke.BodyCreationSettings_GetShape(this);
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:53
///
/// void SetShape(const Shape *inShape)
///
///
public void SetShape(Shape shape) => Jolt.PInvoke.BodyCreationSettings_SetShape(this, shape);
///
///
/// Check if the mass properties of this body will be calculated (only relevant for kinematic or dynamic
/// objects that need a MotionProperties object)
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:56
///
/// bool HasMassProperties() const
///
///
public bool HasMassProperties() => Jolt.PInvoke.BodyCreationSettings_HasMassProperties(this);
///
///
/// Calculate (or return when overridden) the mass and inertia for this body
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:59
///
/// MassProperties GetMassProperties() const
///
///
///
///
/// The returned handle is an owned copy; Dispose it when you're done with it.
///
///
public MassProperties GetMassProperties() => Jolt.PInvoke.BodyCreationSettings_GetMassProperties(this);
///
///
/// Saves the state of this object in binary form to inStream. Doesn't store the shape nor the group filter.
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:62
///
/// void SaveBinaryState(StreamOut &inStream) const
///
///
public void SaveBinaryState(StreamOut stream) =>
Jolt.PInvoke.BodyCreationSettings_SaveBinaryState(this, stream);
///
///
/// Restore the state of this object from inStream. Doesn't restore the shape nor the group filter.
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:65
///
/// void RestoreBinaryState(StreamIn &inStream)
///
///
public void RestoreBinaryState(StreamIn stream) =>
Jolt.PInvoke.BodyCreationSettings_RestoreBinaryState(this, stream);
///
///
/// Save body creation settings, its shape, materials and group filter. Pass in an empty map in ioShapeMap /
/// ioMaterialMap / ioGroupFilterMap or reuse the same map while saving multiple shapes to the same stream
/// in order to avoid writing duplicates. Pass nullptr to ioShapeMap and ioMaterial map to skip saving
/// shapes Pass nullptr to ioGroupFilterMap to skip saving group filters
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:77
///
/// void SaveWithChildren(StreamOut &inStream, ShapeToIDMap *ioShapeMap, MaterialToIDMap *ioMaterialMap, GroupFilterToIDMap *ioGroupFilterMap) const
///
///
///
///
/// A null shapeMap leaves the objects it covers out of the stream: Jolt writes them as null (a body's shape
/// needs both its shape and material maps).
///
///
/// A null materialMap leaves the objects it covers out of the stream: Jolt writes them as null (a body's
/// shape needs both its shape and material maps).
///
///
/// A null groupFilterMap leaves the objects it covers out of the stream: Jolt writes them as null (a body's
/// shape needs both its shape and material maps).
///
///
public void SaveWithChildren(
StreamOut stream,
ShapeToIDMap shapeMap,
MaterialToIDMap materialMap,
GroupFilterToIDMap groupFilterMap
) => Jolt.PInvoke.BodyCreationSettings_SaveWithChildren(this, stream, shapeMap, materialMap, groupFilterMap);
///
///
/// Restore body creation settings, its shape, materials and group filter. Pass in an empty map in
/// ioShapeMap / ioMaterialMap / ioGroupFilterMap or reuse the same map while reading multiple shapes from
/// the same stream in order to restore duplicates.
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:82
///
/// static BCSResult sRestoreWithChildren(StreamIn &inStream, IDToShapeMap &ioShapeMap, IDToMaterialMap &ioMaterialMap, IDToGroupFilterMap &ioGroupFilterMap)
///
///
///
///
/// Throws JoltException with Jolt's error message when the operation fails. The returned handle is an owned
/// copy; Dispose it when you're done with it.
///
///
public static BodyCreationSettings RestoreWithChildren(
StreamIn stream,
IDToShapeMap shapeMap,
IDToMaterialMap materialMap,
IDToGroupFilterMap groupFilterMap
)
{
var _handle = Jolt.PInvoke.BodyCreationSettings_RestoreWithChildren(
stream,
shapeMap,
materialMap,
groupFilterMap
);
if (_handle.IsNull())
throw JoltException.FromLastError();
return _handle;
}
///
///
/// Position of the body (not of the center of mass)
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:84
///
/// RVec3 mPosition = RVec3::sZero()
///
///
public float3 GetPosition() => Jolt.PInvoke.BodyCreationSettings_GetPosition(this);
///
///
/// Position of the body (not of the center of mass)
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:84
///
/// RVec3 mPosition = RVec3::sZero()
///
///
public void SetPosition(float3 value) => Jolt.PInvoke.BodyCreationSettings_SetPosition(this, value);
///
///
/// Rotation of the body
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:85
///
/// Quat mRotation = Quat::sIdentity()
///
///
public floatQuat GetRotation() => Jolt.PInvoke.BodyCreationSettings_GetRotation(this);
///
///
/// Rotation of the body
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:85
///
/// Quat mRotation = Quat::sIdentity()
///
///
public void SetRotation(floatQuat value) => Jolt.PInvoke.BodyCreationSettings_SetRotation(this, value);
///
///
/// World space linear velocity of the center of mass (m/s)
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:86
///
/// Vec3 mLinearVelocity = Vec3::sZero()
///
///
public float3 GetLinearVelocity() => Jolt.PInvoke.BodyCreationSettings_GetLinearVelocity(this);
///
///
/// World space linear velocity of the center of mass (m/s)
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:86
///
/// Vec3 mLinearVelocity = Vec3::sZero()
///
///
public void SetLinearVelocity(float3 value) => Jolt.PInvoke.BodyCreationSettings_SetLinearVelocity(this, value);
///
///
/// World space angular velocity (rad/s)
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:87
///
/// Vec3 mAngularVelocity = Vec3::sZero()
///
///
public float3 GetAngularVelocity() => Jolt.PInvoke.BodyCreationSettings_GetAngularVelocity(this);
///
///
/// World space angular velocity (rad/s)
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:87
///
/// Vec3 mAngularVelocity = Vec3::sZero()
///
///
public void SetAngularVelocity(float3 value) =>
Jolt.PInvoke.BodyCreationSettings_SetAngularVelocity(this, value);
///
///
/// User data value (can be used by application)
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:90
///
/// uint64 mUserData = 0
///
///
public ulong GetUserData() => Jolt.PInvoke.BodyCreationSettings_GetUserData(this);
///
///
/// User data value (can be used by application)
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:90
///
/// uint64 mUserData = 0
///
///
public void SetUserData(ulong value) => Jolt.PInvoke.BodyCreationSettings_SetUserData(this, value);
///
///
/// The collision layer this body belongs to (determines if two objects can collide)
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:93
///
/// ObjectLayer mObjectLayer = 0
///
///
///
///
/// @name Collision settings
///
///
public ushort GetObjectLayer() => Jolt.PInvoke.BodyCreationSettings_GetObjectLayer(this);
///
///
/// The collision layer this body belongs to (determines if two objects can collide)
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:93
///
/// ObjectLayer mObjectLayer = 0
///
///
///
///
/// @name Collision settings
///
///
public void SetObjectLayer(ushort value) => Jolt.PInvoke.BodyCreationSettings_SetObjectLayer(this, value);
///
///
/// The collision group this body belongs to (determines if two objects can collide)
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:94
///
/// CollisionGroup mCollisionGroup
///
///
///
///
/// The returned handle is an owned copy; Dispose it when you're done with it.
///
///
public CollisionGroup GetCollisionGroup() => Jolt.PInvoke.BodyCreationSettings_GetCollisionGroup(this);
///
///
/// The collision group this body belongs to (determines if two objects can collide)
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:94
///
/// CollisionGroup mCollisionGroup
///
///
///
///
/// The value is copied into the field; the handle you pass stays yours to Dispose.
///
///
public void SetCollisionGroup(CollisionGroup value) =>
Jolt.PInvoke.BodyCreationSettings_SetCollisionGroup(this, value);
///
///
/// Motion type, determines if the object is static, dynamic or kinematic
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:97
///
/// EMotionType mMotionType = EMotionType::Dynamic
///
///
///
///
/// @name Simulation properties
///
///
public MotionType GetMotionType() => Jolt.PInvoke.BodyCreationSettings_GetMotionType(this);
///
///
/// Motion type, determines if the object is static, dynamic or kinematic
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:97
///
/// EMotionType mMotionType = EMotionType::Dynamic
///
///
///
///
/// @name Simulation properties
///
///
public void SetMotionType(MotionType value) => Jolt.PInvoke.BodyCreationSettings_SetMotionType(this, value);
///
///
/// Which degrees of freedom this body has (can be used to limit simulation to 2D)
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:98
///
/// EAllowedDOFs mAllowedDOFs = EAllowedDOFs::All
///
///
public AllowedDOFs GetAllowedDOFs() => Jolt.PInvoke.BodyCreationSettings_GetAllowedDOFs(this);
///
///
/// Which degrees of freedom this body has (can be used to limit simulation to 2D)
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:98
///
/// EAllowedDOFs mAllowedDOFs = EAllowedDOFs::All
///
///
public void SetAllowedDOFs(AllowedDOFs value) => Jolt.PInvoke.BodyCreationSettings_SetAllowedDOFs(this, value);
///
///
/// When this body is created as static, this setting tells the system to create a MotionProperties object
/// so that the object can be switched to kinematic or dynamic
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:99
///
/// bool mAllowDynamicOrKinematic = false
///
///
public bool GetAllowDynamicOrKinematic() => Jolt.PInvoke.BodyCreationSettings_GetAllowDynamicOrKinematic(this);
///
///
/// When this body is created as static, this setting tells the system to create a MotionProperties object
/// so that the object can be switched to kinematic or dynamic
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:99
///
/// bool mAllowDynamicOrKinematic = false
///
///
public void SetAllowDynamicOrKinematic(bool value) =>
Jolt.PInvoke.BodyCreationSettings_SetAllowDynamicOrKinematic(this, value);
///
///
/// If this body is a sensor. A sensor will receive collision callbacks, but will not cause any collision
/// responses and can be used as a trigger volume. See description at Body::SetIsSensor.
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:100
///
/// bool mIsSensor = false
///
///
public bool GetIsSensor() => Jolt.PInvoke.BodyCreationSettings_GetIsSensor(this);
///
///
/// If this body is a sensor. A sensor will receive collision callbacks, but will not cause any collision
/// responses and can be used as a trigger volume. See description at Body::SetIsSensor.
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:100
///
/// bool mIsSensor = false
///
///
public void SetIsSensor(bool value) => Jolt.PInvoke.BodyCreationSettings_SetIsSensor(this, value);
///
///
/// If kinematic objects can generate contact points against other kinematic or static objects. See
/// description at Body::SetCollideKinematicVsNonDynamic.
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:101
///
/// bool mCollideKinematicVsNonDynamic = false
///
///
public bool GetCollideKinematicVsNonDynamic() =>
Jolt.PInvoke.BodyCreationSettings_GetCollideKinematicVsNonDynamic(this);
///
///
/// If kinematic objects can generate contact points against other kinematic or static objects. See
/// description at Body::SetCollideKinematicVsNonDynamic.
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:101
///
/// bool mCollideKinematicVsNonDynamic = false
///
///
public void SetCollideKinematicVsNonDynamic(bool value) =>
Jolt.PInvoke.BodyCreationSettings_SetCollideKinematicVsNonDynamic(this, value);
///
///
/// If this body should use manifold reduction (see description at Body::SetUseManifoldReduction)
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:102
///
/// bool mUseManifoldReduction = true
///
///
public bool GetUseManifoldReduction() => Jolt.PInvoke.BodyCreationSettings_GetUseManifoldReduction(this);
///
///
/// If this body should use manifold reduction (see description at Body::SetUseManifoldReduction)
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:102
///
/// bool mUseManifoldReduction = true
///
///
public void SetUseManifoldReduction(bool value) =>
Jolt.PInvoke.BodyCreationSettings_SetUseManifoldReduction(this, value);
///
///
/// 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)
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:103
///
/// bool mApplyGyroscopicForce = false
///
///
public bool GetApplyGyroscopicForce() => Jolt.PInvoke.BodyCreationSettings_GetApplyGyroscopicForce(this);
///
///
/// 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)
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:103
///
/// bool mApplyGyroscopicForce = false
///
///
public void SetApplyGyroscopicForce(bool value) =>
Jolt.PInvoke.BodyCreationSettings_SetApplyGyroscopicForce(this, value);
///
///
/// Motion quality, or how well it detects collisions when it has a high velocity
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:104
///
/// EMotionQuality mMotionQuality = EMotionQuality::Discrete
///
///
public MotionQuality GetMotionQuality() => Jolt.PInvoke.BodyCreationSettings_GetMotionQuality(this);
///
///
/// Motion quality, or how well it detects collisions when it has a high velocity
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:104
///
/// EMotionQuality mMotionQuality = EMotionQuality::Discrete
///
///
public void SetMotionQuality(MotionQuality value) =>
Jolt.PInvoke.BodyCreationSettings_SetMotionQuality(this, value);
///
///
/// 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.
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:105
///
/// bool mEnhancedInternalEdgeRemoval = false
///
///
public bool GetEnhancedInternalEdgeRemoval() =>
Jolt.PInvoke.BodyCreationSettings_GetEnhancedInternalEdgeRemoval(this);
///
///
/// 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.
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:105
///
/// bool mEnhancedInternalEdgeRemoval = false
///
///
public void SetEnhancedInternalEdgeRemoval(bool value) =>
Jolt.PInvoke.BodyCreationSettings_SetEnhancedInternalEdgeRemoval(this, value);
///
///
/// If this body can go to sleep or not
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:106
///
/// bool mAllowSleeping = true
///
///
public bool GetAllowSleeping() => Jolt.PInvoke.BodyCreationSettings_GetAllowSleeping(this);
///
///
/// If this body can go to sleep or not
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:106
///
/// bool mAllowSleeping = true
///
///
public void SetAllowSleeping(bool value) => Jolt.PInvoke.BodyCreationSettings_SetAllowSleeping(this, value);
///
///
/// Friction of the body (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.
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:107
///
/// float mFriction = 0.2f
///
///
public float GetFriction() => Jolt.PInvoke.BodyCreationSettings_GetFriction(this);
///
///
/// Friction of the body (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.
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:107
///
/// float mFriction = 0.2f
///
///
public void SetFriction(float value) => Jolt.PInvoke.BodyCreationSettings_SetFriction(this, value);
///
///
/// Restitution of body (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.
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:108
///
/// float mRestitution = 0.0f
///
///
public float GetRestitution() => Jolt.PInvoke.BodyCreationSettings_GetRestitution(this);
///
///
/// Restitution of body (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.
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:108
///
/// float mRestitution = 0.0f
///
///
public void SetRestitution(float value) => Jolt.PInvoke.BodyCreationSettings_SetRestitution(this, value);
///
///
/// Linear damping: dv/dt = -c * v. c. Value should be zero or positive and is usually close to 0.
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:109
///
/// float mLinearDamping = 0.05f
///
///
public float GetLinearDamping() => Jolt.PInvoke.BodyCreationSettings_GetLinearDamping(this);
///
///
/// Linear damping: dv/dt = -c * v. c. Value should be zero or positive and is usually close to 0.
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:109
///
/// float mLinearDamping = 0.05f
///
///
public void SetLinearDamping(float value) => Jolt.PInvoke.BodyCreationSettings_SetLinearDamping(this, value);
///
///
/// Angular damping: dw/dt = -c * w. c. Value should be zero or positive and is usually close to 0.
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:110
///
/// float mAngularDamping = 0.05f
///
///
public float GetAngularDamping() => Jolt.PInvoke.BodyCreationSettings_GetAngularDamping(this);
///
///
/// Angular damping: dw/dt = -c * w. c. Value should be zero or positive and is usually close to 0.
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:110
///
/// float mAngularDamping = 0.05f
///
///
public void SetAngularDamping(float value) => Jolt.PInvoke.BodyCreationSettings_SetAngularDamping(this, value);
///
///
/// Maximum linear velocity that this body can reach (m/s)
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:111
///
/// float mMaxLinearVelocity = 500.0f
///
///
public float GetMaxLinearVelocity() => Jolt.PInvoke.BodyCreationSettings_GetMaxLinearVelocity(this);
///
///
/// Maximum linear velocity that this body can reach (m/s)
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:111
///
/// float mMaxLinearVelocity = 500.0f
///
///
public void SetMaxLinearVelocity(float value) =>
Jolt.PInvoke.BodyCreationSettings_SetMaxLinearVelocity(this, value);
///
///
/// Maximum angular velocity that this body can reach (rad/s)
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:112
///
/// float mMaxAngularVelocity = 0.25f * JPH_PI * 60.0f
///
///
public float GetMaxAngularVelocity() => Jolt.PInvoke.BodyCreationSettings_GetMaxAngularVelocity(this);
///
///
/// Maximum angular velocity that this body can reach (rad/s)
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:112
///
/// float mMaxAngularVelocity = 0.25f * JPH_PI * 60.0f
///
///
public void SetMaxAngularVelocity(float value) =>
Jolt.PInvoke.BodyCreationSettings_SetMaxAngularVelocity(this, value);
///
///
/// Value to multiply gravity with for this body
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:113
///
/// float mGravityFactor = 1.0f
///
///
public float GetGravityFactor() => Jolt.PInvoke.BodyCreationSettings_GetGravityFactor(this);
///
///
/// Value to multiply gravity with for this body
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:113
///
/// float mGravityFactor = 1.0f
///
///
public void SetGravityFactor(float value) => Jolt.PInvoke.BodyCreationSettings_SetGravityFactor(this, value);
///
///
/// Used only when this body is dynamic and colliding. Override for the number of solver velocity iterations
/// to run, 0 means use the default in PhysicsSettings::mNumVelocitySteps. The number of iterations to use
/// is the max of all contacts and constraints in the island.
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:114
///
/// uint mNumVelocityStepsOverride = 0
///
///
public uint GetNumVelocityStepsOverride() =>
Jolt.PInvoke.BodyCreationSettings_GetNumVelocityStepsOverride(this);
///
///
/// Used only when this body is dynamic and colliding. Override for the number of solver velocity iterations
/// to run, 0 means use the default in PhysicsSettings::mNumVelocitySteps. The number of iterations to use
/// is the max of all contacts and constraints in the island.
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:114
///
/// uint mNumVelocityStepsOverride = 0
///
///
public void SetNumVelocityStepsOverride(uint value) =>
Jolt.PInvoke.BodyCreationSettings_SetNumVelocityStepsOverride(this, value);
///
///
/// Used only when this body is dynamic and colliding. Override for the number of solver position iterations
/// to run, 0 means use the default in PhysicsSettings::mNumPositionSteps. The number of iterations to use
/// is the max of all contacts and constraints in the island.
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:115
///
/// uint mNumPositionStepsOverride = 0
///
///
public uint GetNumPositionStepsOverride() =>
Jolt.PInvoke.BodyCreationSettings_GetNumPositionStepsOverride(this);
///
///
/// Used only when this body is dynamic and colliding. Override for the number of solver position iterations
/// to run, 0 means use the default in PhysicsSettings::mNumPositionSteps. The number of iterations to use
/// is the max of all contacts and constraints in the island.
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:115
///
/// uint mNumPositionStepsOverride = 0
///
///
public void SetNumPositionStepsOverride(uint value) =>
Jolt.PInvoke.BodyCreationSettings_SetNumPositionStepsOverride(this, value);
///
///
/// Determines how mMassPropertiesOverride will be used
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:118
///
/// EOverrideMassProperties mOverrideMassProperties = EOverrideMassProperties::CalculateMassAndInertia
///
///
///
///
/// @name Mass properties of the body (by default calculated by the shape)
///
///
public OverrideMassProperties GetOverrideMassProperties() =>
Jolt.PInvoke.BodyCreationSettings_GetOverrideMassProperties(this);
///
///
/// Determines how mMassPropertiesOverride will be used
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:118
///
/// EOverrideMassProperties mOverrideMassProperties = EOverrideMassProperties::CalculateMassAndInertia
///
///
///
///
/// @name Mass properties of the body (by default calculated by the shape)
///
///
public void SetOverrideMassProperties(OverrideMassProperties value) =>
Jolt.PInvoke.BodyCreationSettings_SetOverrideMassProperties(this, value);
///
///
/// When calculating the inertia (not when it is provided) the calculated inertia will be multiplied by this
/// value
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:119
///
/// float mInertiaMultiplier = 1.0f
///
///
public float GetInertiaMultiplier() => Jolt.PInvoke.BodyCreationSettings_GetInertiaMultiplier(this);
///
///
/// When calculating the inertia (not when it is provided) the calculated inertia will be multiplied by this
/// value
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:119
///
/// float mInertiaMultiplier = 1.0f
///
///
public void SetInertiaMultiplier(float value) =>
Jolt.PInvoke.BodyCreationSettings_SetInertiaMultiplier(this, value);
///
///
/// Contains replacement mass settings which override the automatically calculated values
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:120
///
/// MassProperties mMassPropertiesOverride
///
///
///
///
/// The returned handle is an owned copy; Dispose it when you're done with it.
///
///
public MassProperties GetMassPropertiesOverride() =>
Jolt.PInvoke.BodyCreationSettings_GetMassPropertiesOverride(this);
///
///
/// Contains replacement mass settings which override the automatically calculated values
///
///
/// C++:
/// Jolt/Physics/Body/BodyCreationSettings.h:120
///
/// MassProperties mMassPropertiesOverride
///
///
///
///
/// The value is copied into the field; the handle you pass stays yours to Dispose.
///
///
public void SetMassPropertiesOverride(MassProperties value) =>
Jolt.PInvoke.BodyCreationSettings_SetMassPropertiesOverride(this, value);
public void Dispose() => Jolt.PInvoke.BodyCreationSettings_Destroy(this);
}
}