// // Generated by Brutal.Jolt.Generate; do not edit by hand. #nullable enable using Brutal.Interop; using Brutal.Numerics; namespace Brutal.JoltApi { /// /// /// C++: /// Jolt/Physics/Character/CharacterVirtual.h:22 ///
/// class CharacterVirtualSettings : public CharacterBaseSettings ///
///
/// /// /// Contains the configuration of a character /// /// [InteropHandle] public readonly partial struct CharacterVirtualSettings : IDisposable { /// /// /// C++: /// Jolt/Physics/Character/CharacterVirtual.h:28 ///
/// CharacterVirtualSettings() = default ///
///
/// /// /// Constructor /// /// public static CharacterVirtualSettings Create() => Jolt.PInvoke.CharacterVirtualSettings_Create(); /// /// /// C++: /// Jolt/Physics/Character/CharacterVirtual.h:36 ///
/// float mMass = 70.0f ///
///
/// /// /// Character mass (kg). Used to push down objects with gravity when the character is standing on top. /// /// public float GetMass() => Jolt.PInvoke.CharacterVirtualSettings_GetMass(this); /// /// /// C++: /// Jolt/Physics/Character/CharacterVirtual.h:36 ///
/// float mMass = 70.0f ///
///
/// /// /// Character mass (kg). Used to push down objects with gravity when the character is standing on top. /// /// public void SetMass(float value) => Jolt.PInvoke.CharacterVirtualSettings_SetMass(this, value); /// /// /// C++: /// Jolt/Physics/Character/CharacterVirtual.h:39 ///
/// float mMaxStrength = 100.0f ///
///
/// /// /// Maximum force with which the character can push other bodies (N). /// /// public float GetMaxStrength() => Jolt.PInvoke.CharacterVirtualSettings_GetMaxStrength(this); /// /// /// C++: /// Jolt/Physics/Character/CharacterVirtual.h:39 ///
/// float mMaxStrength = 100.0f ///
///
/// /// /// Maximum force with which the character can push other bodies (N). /// /// public void SetMaxStrength(float value) => Jolt.PInvoke.CharacterVirtualSettings_SetMaxStrength(this, value); /// /// /// C++: /// Jolt/Physics/Character/CharacterVirtual.h:42 ///
/// Vec3 mShapeOffset = Vec3::sZero() ///
///
/// /// /// An extra offset applied to the shape in local space. This allows applying an extra offset to the shape /// in local space. /// /// public float3 GetShapeOffset() => Jolt.PInvoke.CharacterVirtualSettings_GetShapeOffset(this); /// /// /// C++: /// Jolt/Physics/Character/CharacterVirtual.h:42 ///
/// Vec3 mShapeOffset = Vec3::sZero() ///
///
/// /// /// An extra offset applied to the shape in local space. This allows applying an extra offset to the shape /// in local space. /// /// public void SetShapeOffset(float3 value) => Jolt.PInvoke.CharacterVirtualSettings_SetShapeOffset(this, value); /// /// /// When colliding with back faces, the character will not be able to move through back facing triangles. /// Use this if you have triangles that need to collide on both sides. /// /// /// C++: /// Jolt/Physics/Character/CharacterVirtual.h:45 ///
/// EBackFaceMode mBackFaceMode = EBackFaceMode::CollideWithBackFaces ///
///
/// /// /// @name Movement settings /// /// public EBackFaceMode GetBackFaceMode() => Jolt.PInvoke.CharacterVirtualSettings_GetBackFaceMode(this); /// /// /// When colliding with back faces, the character will not be able to move through back facing triangles. /// Use this if you have triangles that need to collide on both sides. /// /// /// C++: /// Jolt/Physics/Character/CharacterVirtual.h:45 ///
/// EBackFaceMode mBackFaceMode = EBackFaceMode::CollideWithBackFaces ///
///
/// /// /// @name Movement settings /// /// public void SetBackFaceMode(EBackFaceMode value) => Jolt.PInvoke.CharacterVirtualSettings_SetBackFaceMode(this, value); /// /// /// How far to scan outside of the shape for predictive contacts. A value of 0 will most likely cause the /// character to get stuck as it cannot properly calculate a sliding direction anymore. A value that's too /// high will cause ghost collisions. /// /// /// C++: /// Jolt/Physics/Character/CharacterVirtual.h:46 ///
/// float mPredictiveContactDistance = 0.1f ///
///
public float GetPredictiveContactDistance() => Jolt.PInvoke.CharacterVirtualSettings_GetPredictiveContactDistance(this); /// /// /// How far to scan outside of the shape for predictive contacts. A value of 0 will most likely cause the /// character to get stuck as it cannot properly calculate a sliding direction anymore. A value that's too /// high will cause ghost collisions. /// /// /// C++: /// Jolt/Physics/Character/CharacterVirtual.h:46 ///
/// float mPredictiveContactDistance = 0.1f ///
///
public void SetPredictiveContactDistance(float value) => Jolt.PInvoke.CharacterVirtualSettings_SetPredictiveContactDistance(this, value); /// /// /// Max amount of collision loops /// /// /// C++: /// Jolt/Physics/Character/CharacterVirtual.h:47 ///
/// uint mMaxCollisionIterations = 5 ///
///
public uint GetMaxCollisionIterations() => Jolt.PInvoke.CharacterVirtualSettings_GetMaxCollisionIterations(this); /// /// /// Max amount of collision loops /// /// /// C++: /// Jolt/Physics/Character/CharacterVirtual.h:47 ///
/// uint mMaxCollisionIterations = 5 ///
///
public void SetMaxCollisionIterations(uint value) => Jolt.PInvoke.CharacterVirtualSettings_SetMaxCollisionIterations(this, value); /// /// /// How often to try stepping in the constraint solving /// /// /// C++: /// Jolt/Physics/Character/CharacterVirtual.h:48 ///
/// uint mMaxConstraintIterations = 15 ///
///
public uint GetMaxConstraintIterations() => Jolt.PInvoke.CharacterVirtualSettings_GetMaxConstraintIterations(this); /// /// /// How often to try stepping in the constraint solving /// /// /// C++: /// Jolt/Physics/Character/CharacterVirtual.h:48 ///
/// uint mMaxConstraintIterations = 15 ///
///
public void SetMaxConstraintIterations(uint value) => Jolt.PInvoke.CharacterVirtualSettings_SetMaxConstraintIterations(this, value); /// /// /// Early out condition: If this much time is left to simulate we are done /// /// /// C++: /// Jolt/Physics/Character/CharacterVirtual.h:49 ///
/// float mMinTimeRemaining = 1.0e-4f ///
///
public float GetMinTimeRemaining() => Jolt.PInvoke.CharacterVirtualSettings_GetMinTimeRemaining(this); /// /// /// Early out condition: If this much time is left to simulate we are done /// /// /// C++: /// Jolt/Physics/Character/CharacterVirtual.h:49 ///
/// float mMinTimeRemaining = 1.0e-4f ///
///
public void SetMinTimeRemaining(float value) => Jolt.PInvoke.CharacterVirtualSettings_SetMinTimeRemaining(this, value); /// /// /// How far we're willing to penetrate geometry /// /// /// C++: /// Jolt/Physics/Character/CharacterVirtual.h:50 ///
/// float mCollisionTolerance = 1.0e-3f ///
///
public float GetCollisionTolerance() => Jolt.PInvoke.CharacterVirtualSettings_GetCollisionTolerance(this); /// /// /// How far we're willing to penetrate geometry /// /// /// C++: /// Jolt/Physics/Character/CharacterVirtual.h:50 ///
/// float mCollisionTolerance = 1.0e-3f ///
///
public void SetCollisionTolerance(float value) => Jolt.PInvoke.CharacterVirtualSettings_SetCollisionTolerance(this, value); /// /// /// How far we try to stay away from the geometry, this ensures that the sweep will hit as little as /// possible lowering the collision cost and reducing the risk of getting stuck /// /// /// C++: /// Jolt/Physics/Character/CharacterVirtual.h:51 ///
/// float mCharacterPadding = 0.02f ///
///
public float GetCharacterPadding() => Jolt.PInvoke.CharacterVirtualSettings_GetCharacterPadding(this); /// /// /// How far we try to stay away from the geometry, this ensures that the sweep will hit as little as /// possible lowering the collision cost and reducing the risk of getting stuck /// /// /// C++: /// Jolt/Physics/Character/CharacterVirtual.h:51 ///
/// float mCharacterPadding = 0.02f ///
///
public void SetCharacterPadding(float value) => Jolt.PInvoke.CharacterVirtualSettings_SetCharacterPadding(this, value); /// /// /// Max num hits to collect in order to avoid excess of contact points collection /// /// /// C++: /// Jolt/Physics/Character/CharacterVirtual.h:52 ///
/// uint mMaxNumHits = 256 ///
///
public uint GetMaxNumHits() => Jolt.PInvoke.CharacterVirtualSettings_GetMaxNumHits(this); /// /// /// Max num hits to collect in order to avoid excess of contact points collection /// /// /// C++: /// Jolt/Physics/Character/CharacterVirtual.h:52 ///
/// uint mMaxNumHits = 256 ///
///
public void SetMaxNumHits(uint value) => Jolt.PInvoke.CharacterVirtualSettings_SetMaxNumHits(this, value); /// /// /// Cos(angle) where angle is the maximum angle between two hits contact normals that are allowed to be /// merged during hit reduction. Default is around 2.5 degrees. Set to -1 to turn off. /// /// /// C++: /// Jolt/Physics/Character/CharacterVirtual.h:53 ///
/// float mHitReductionCosMaxAngle = 0.999f ///
///
public float GetHitReductionCosMaxAngle() => Jolt.PInvoke.CharacterVirtualSettings_GetHitReductionCosMaxAngle(this); /// /// /// Cos(angle) where angle is the maximum angle between two hits contact normals that are allowed to be /// merged during hit reduction. Default is around 2.5 degrees. Set to -1 to turn off. /// /// /// C++: /// Jolt/Physics/Character/CharacterVirtual.h:53 ///
/// float mHitReductionCosMaxAngle = 0.999f ///
///
public void SetHitReductionCosMaxAngle(float value) => Jolt.PInvoke.CharacterVirtualSettings_SetHitReductionCosMaxAngle(this, value); /// /// /// This value governs how fast a penetration will be resolved, 0 = nothing is resolved, 1 = everything in /// one update /// /// /// C++: /// Jolt/Physics/Character/CharacterVirtual.h:54 ///
/// float mPenetrationRecoverySpeed = 1.0f ///
///
public float GetPenetrationRecoverySpeed() => Jolt.PInvoke.CharacterVirtualSettings_GetPenetrationRecoverySpeed(this); /// /// /// This value governs how fast a penetration will be resolved, 0 = nothing is resolved, 1 = everything in /// one update /// /// /// C++: /// Jolt/Physics/Character/CharacterVirtual.h:54 ///
/// float mPenetrationRecoverySpeed = 1.0f ///
///
public void SetPenetrationRecoverySpeed(float value) => Jolt.PInvoke.CharacterVirtualSettings_SetPenetrationRecoverySpeed(this, value); /// /// /// C++: /// Jolt/Physics/Character/CharacterVirtual.h:60 ///
/// RefConst<Shape> mInnerBodyShape ///
///
/// /// /// This character can optionally have an inner rigid body. This rigid body can be used to give the character presence in the world. When set it means that: /// - Regular collision checks (e.g. NarrowPhaseQuery::CastRay) will collide with the rigid body (they cannot collide with CharacterVirtual since it is not added to the broad phase) /// - Regular contact callbacks will be called through the ContactListener (next to the ones that will be passed to the CharacterContactListener) /// - Fast moving objects of motion quality LinearCast will not be able to pass through the CharacterVirtual in 1 time step /// /// public Shape GetInnerBodyShape() => Jolt.PInvoke.CharacterVirtualSettings_GetInnerBodyShape(this); /// /// /// C++: /// Jolt/Physics/Character/CharacterVirtual.h:60 ///
/// RefConst<Shape> mInnerBodyShape ///
///
/// /// /// This character can optionally have an inner rigid body. This rigid body can be used to give the character presence in the world. When set it means that: /// - Regular collision checks (e.g. NarrowPhaseQuery::CastRay) will collide with the rigid body (they cannot collide with CharacterVirtual since it is not added to the broad phase) /// - Regular contact callbacks will be called through the ContactListener (next to the ones that will be passed to the CharacterContactListener) /// - Fast moving objects of motion quality LinearCast will not be able to pass through the CharacterVirtual in 1 time step /// /// public void SetInnerBodyShape(Shape value) => Jolt.PInvoke.CharacterVirtualSettings_SetInnerBodyShape(this, value); /// /// /// C++: /// Jolt/Physics/Character/CharacterVirtual.h:64 ///
/// BodyID mInnerBodyIDOverride ///
///
/// /// /// For a deterministic simulation, it is important to have a deterministic body ID. When set and when mInnerBodyShape is specified, /// the inner body will be created with this specified ID instead of a generated ID. /// /// public uint GetInnerBodyIDOverride() => Jolt.PInvoke.CharacterVirtualSettings_GetInnerBodyIDOverride(this); /// /// /// C++: /// Jolt/Physics/Character/CharacterVirtual.h:64 ///
/// BodyID mInnerBodyIDOverride ///
///
/// /// /// For a deterministic simulation, it is important to have a deterministic body ID. When set and when mInnerBodyShape is specified, /// the inner body will be created with this specified ID instead of a generated ID. /// /// public void SetInnerBodyIDOverride(uint value) => Jolt.PInvoke.CharacterVirtualSettings_SetInnerBodyIDOverride(this, value); /// /// /// C++: /// Jolt/Physics/Character/CharacterVirtual.h:67 ///
/// ObjectLayer mInnerBodyLayer = 0 ///
///
/// /// /// Layer that the inner rigid body will be added to /// /// public ushort GetInnerBodyLayer() => Jolt.PInvoke.CharacterVirtualSettings_GetInnerBodyLayer(this); /// /// /// C++: /// Jolt/Physics/Character/CharacterVirtual.h:67 ///
/// ObjectLayer mInnerBodyLayer = 0 ///
///
/// /// /// Layer that the inner rigid body will be added to /// /// public void SetInnerBodyLayer(ushort value) => Jolt.PInvoke.CharacterVirtualSettings_SetInnerBodyLayer(this, value); public void AddRef() => Jolt.PInvoke.CharacterVirtualSettings_AddRef(this); public void Release() => Jolt.PInvoke.CharacterVirtualSettings_Release(this); public uint GetRefCount() => Jolt.PInvoke.CharacterVirtualSettings_GetRefCount(this); public static implicit operator CharacterBaseSettings(CharacterVirtualSettings value) => Jolt.PInvoke.CharacterVirtualSettings_AsCharacterBaseSettings(value); public void Dispose() { if (IsNull()) return; Release(); } } }