mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
1142 lines
55 KiB
C#
1142 lines
55 KiB
C#
// <auto-generated/>
|
|
// 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
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// Settings for constructing a rigid body
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L30">Jolt/Physics/Body/BodyCreationSettings.h:30</see>
|
|
/// <br/>
|
|
/// <c>class BodyCreationSettings</c>
|
|
/// </para>
|
|
/// </summary>
|
|
[InteropHandle]
|
|
public readonly partial struct BodyCreationSettings : IDisposable
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// Constructor
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L36">Jolt/Physics/Body/BodyCreationSettings.h:36</see>
|
|
/// <br/>
|
|
/// <c>BodyCreationSettings() = default</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public static BodyCreationSettings Create() => Jolt.PInvoke.BodyCreationSettings_Create();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L37">Jolt/Physics/Body/BodyCreationSettings.h:37</see>
|
|
/// <br/>
|
|
/// <c>BodyCreationSettings(const ShapeSettings *inShape, RVec3Arg inPosition, QuatArg inRotation, EMotionType inMotionType, ObjectLayer inObjectLayer)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public static BodyCreationSettings Create(
|
|
ShapeSettings shape,
|
|
float3 position,
|
|
floatQuat rotation,
|
|
MotionType motionType,
|
|
ushort objectLayer
|
|
) => Jolt.PInvoke.BodyCreationSettings_Create_2(shape, position, rotation, motionType, objectLayer);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L38">Jolt/Physics/Body/BodyCreationSettings.h:38</see>
|
|
/// <br/>
|
|
/// <c>BodyCreationSettings(const Shape *inShape, RVec3Arg inPosition, QuatArg inRotation, EMotionType inMotionType, ObjectLayer inObjectLayer)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public static BodyCreationSettings Create(
|
|
Shape shape,
|
|
float3 position,
|
|
floatQuat rotation,
|
|
MotionType motionType,
|
|
ushort objectLayer
|
|
) => Jolt.PInvoke.BodyCreationSettings_Create_3(shape, position, rotation, motionType, objectLayer);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Access to the shape settings object. This contains serializable (non-runtime optimized) information
|
|
/// about the Shape.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L45">Jolt/Physics/Body/BodyCreationSettings.h:45</see>
|
|
/// <br/>
|
|
/// <c>const ShapeSettings * GetShapeSettings() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// The returned handle carries its own reference; Dispose it once when you're done.
|
|
/// </para>
|
|
/// </remarks>
|
|
public ShapeSettings GetShapeSettings() => Jolt.PInvoke.BodyCreationSettings_GetShapeSettings(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L46">Jolt/Physics/Body/BodyCreationSettings.h:46</see>
|
|
/// <br/>
|
|
/// <c>void SetShapeSettings(const ShapeSettings *inShape)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetShapeSettings(ShapeSettings shape) =>
|
|
Jolt.PInvoke.BodyCreationSettings_SetShapeSettings(this, shape);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// 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.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L49">Jolt/Physics/Body/BodyCreationSettings.h:49</see>
|
|
/// <br/>
|
|
/// <c>Shape::ShapeResult ConvertShapeSettings()</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Throws JoltException with Jolt's error message when the operation fails.
|
|
/// </para>
|
|
/// </remarks>
|
|
public Shape ConvertShapeSettings()
|
|
{
|
|
var _handle = Jolt.PInvoke.BodyCreationSettings_ConvertShapeSettings(this);
|
|
if (_handle.IsNull())
|
|
throw JoltException.FromLastError();
|
|
return _handle;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Access to the run-time shape object. Will convert from ShapeSettings object if needed.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L52">Jolt/Physics/Body/BodyCreationSettings.h:52</see>
|
|
/// <br/>
|
|
/// <c>const Shape * GetShape() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// The returned handle carries its own reference; Dispose it once when you're done.
|
|
/// </para>
|
|
/// </remarks>
|
|
public Shape GetShape() => Jolt.PInvoke.BodyCreationSettings_GetShape(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L53">Jolt/Physics/Body/BodyCreationSettings.h:53</see>
|
|
/// <br/>
|
|
/// <c>void SetShape(const Shape *inShape)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetShape(Shape shape) => Jolt.PInvoke.BodyCreationSettings_SetShape(this, shape);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Check if the mass properties of this body will be calculated (only relevant for kinematic or dynamic
|
|
/// objects that need a MotionProperties object)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L56">Jolt/Physics/Body/BodyCreationSettings.h:56</see>
|
|
/// <br/>
|
|
/// <c>bool HasMassProperties() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public bool HasMassProperties() => Jolt.PInvoke.BodyCreationSettings_HasMassProperties(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Calculate (or return when overridden) the mass and inertia for this body
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L59">Jolt/Physics/Body/BodyCreationSettings.h:59</see>
|
|
/// <br/>
|
|
/// <c>MassProperties GetMassProperties() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// The returned handle is an owned copy; Dispose it when you're done with it.
|
|
/// </para>
|
|
/// </remarks>
|
|
public MassProperties GetMassProperties() => Jolt.PInvoke.BodyCreationSettings_GetMassProperties(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Saves the state of this object in binary form to inStream. Doesn't store the shape nor the group filter.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L62">Jolt/Physics/Body/BodyCreationSettings.h:62</see>
|
|
/// <br/>
|
|
/// <c>void SaveBinaryState(StreamOut &inStream) const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SaveBinaryState(StreamOut stream) =>
|
|
Jolt.PInvoke.BodyCreationSettings_SaveBinaryState(this, stream);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Restore the state of this object from inStream. Doesn't restore the shape nor the group filter.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L65">Jolt/Physics/Body/BodyCreationSettings.h:65</see>
|
|
/// <br/>
|
|
/// <c>void RestoreBinaryState(StreamIn &inStream)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void RestoreBinaryState(StreamIn stream) =>
|
|
Jolt.PInvoke.BodyCreationSettings_RestoreBinaryState(this, stream);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// 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
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L77">Jolt/Physics/Body/BodyCreationSettings.h:77</see>
|
|
/// <br/>
|
|
/// <c>void SaveWithChildren(StreamOut &inStream, ShapeToIDMap *ioShapeMap, MaterialToIDMap *ioMaterialMap, GroupFilterToIDMap *ioGroupFilterMap) const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// 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).
|
|
/// </para>
|
|
/// <para>
|
|
/// 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).
|
|
/// </para>
|
|
/// <para>
|
|
/// 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).
|
|
/// </para>
|
|
/// </remarks>
|
|
public void SaveWithChildren(
|
|
StreamOut stream,
|
|
ShapeToIDMap shapeMap,
|
|
MaterialToIDMap materialMap,
|
|
GroupFilterToIDMap groupFilterMap
|
|
) => Jolt.PInvoke.BodyCreationSettings_SaveWithChildren(this, stream, shapeMap, materialMap, groupFilterMap);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// 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.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L82">Jolt/Physics/Body/BodyCreationSettings.h:82</see>
|
|
/// <br/>
|
|
/// <c>static BCSResult sRestoreWithChildren(StreamIn &inStream, IDToShapeMap &ioShapeMap, IDToMaterialMap &ioMaterialMap, IDToGroupFilterMap &ioGroupFilterMap)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// 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.
|
|
/// </para>
|
|
/// </remarks>
|
|
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;
|
|
}
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Position of the body (not of the center of mass)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L84">Jolt/Physics/Body/BodyCreationSettings.h:84</see>
|
|
/// <br/>
|
|
/// <c>RVec3 mPosition = RVec3::sZero()</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float3 GetPosition() => Jolt.PInvoke.BodyCreationSettings_GetPosition(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Position of the body (not of the center of mass)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L84">Jolt/Physics/Body/BodyCreationSettings.h:84</see>
|
|
/// <br/>
|
|
/// <c>RVec3 mPosition = RVec3::sZero()</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetPosition(float3 value) => Jolt.PInvoke.BodyCreationSettings_SetPosition(this, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Rotation of the body
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L85">Jolt/Physics/Body/BodyCreationSettings.h:85</see>
|
|
/// <br/>
|
|
/// <c>Quat mRotation = Quat::sIdentity()</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public floatQuat GetRotation() => Jolt.PInvoke.BodyCreationSettings_GetRotation(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Rotation of the body
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L85">Jolt/Physics/Body/BodyCreationSettings.h:85</see>
|
|
/// <br/>
|
|
/// <c>Quat mRotation = Quat::sIdentity()</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetRotation(floatQuat value) => Jolt.PInvoke.BodyCreationSettings_SetRotation(this, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// World space linear velocity of the center of mass (m/s)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L86">Jolt/Physics/Body/BodyCreationSettings.h:86</see>
|
|
/// <br/>
|
|
/// <c>Vec3 mLinearVelocity = Vec3::sZero()</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float3 GetLinearVelocity() => Jolt.PInvoke.BodyCreationSettings_GetLinearVelocity(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// World space linear velocity of the center of mass (m/s)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L86">Jolt/Physics/Body/BodyCreationSettings.h:86</see>
|
|
/// <br/>
|
|
/// <c>Vec3 mLinearVelocity = Vec3::sZero()</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetLinearVelocity(float3 value) => Jolt.PInvoke.BodyCreationSettings_SetLinearVelocity(this, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// World space angular velocity (rad/s)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L87">Jolt/Physics/Body/BodyCreationSettings.h:87</see>
|
|
/// <br/>
|
|
/// <c>Vec3 mAngularVelocity = Vec3::sZero()</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float3 GetAngularVelocity() => Jolt.PInvoke.BodyCreationSettings_GetAngularVelocity(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// World space angular velocity (rad/s)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L87">Jolt/Physics/Body/BodyCreationSettings.h:87</see>
|
|
/// <br/>
|
|
/// <c>Vec3 mAngularVelocity = Vec3::sZero()</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetAngularVelocity(float3 value) =>
|
|
Jolt.PInvoke.BodyCreationSettings_SetAngularVelocity(this, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// User data value (can be used by application)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L90">Jolt/Physics/Body/BodyCreationSettings.h:90</see>
|
|
/// <br/>
|
|
/// <c>uint64 mUserData = 0</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public ulong GetUserData() => Jolt.PInvoke.BodyCreationSettings_GetUserData(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// User data value (can be used by application)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L90">Jolt/Physics/Body/BodyCreationSettings.h:90</see>
|
|
/// <br/>
|
|
/// <c>uint64 mUserData = 0</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetUserData(ulong value) => Jolt.PInvoke.BodyCreationSettings_SetUserData(this, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// The collision layer this body belongs to (determines if two objects can collide)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L93">Jolt/Physics/Body/BodyCreationSettings.h:93</see>
|
|
/// <br/>
|
|
/// <c>ObjectLayer mObjectLayer = 0</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// @name Collision settings
|
|
/// </para>
|
|
/// </remarks>
|
|
public ushort GetObjectLayer() => Jolt.PInvoke.BodyCreationSettings_GetObjectLayer(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// The collision layer this body belongs to (determines if two objects can collide)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L93">Jolt/Physics/Body/BodyCreationSettings.h:93</see>
|
|
/// <br/>
|
|
/// <c>ObjectLayer mObjectLayer = 0</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// @name Collision settings
|
|
/// </para>
|
|
/// </remarks>
|
|
public void SetObjectLayer(ushort value) => Jolt.PInvoke.BodyCreationSettings_SetObjectLayer(this, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// The collision group this body belongs to (determines if two objects can collide)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L94">Jolt/Physics/Body/BodyCreationSettings.h:94</see>
|
|
/// <br/>
|
|
/// <c>CollisionGroup mCollisionGroup</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// The returned handle is an owned copy; Dispose it when you're done with it.
|
|
/// </para>
|
|
/// </remarks>
|
|
public CollisionGroup GetCollisionGroup() => Jolt.PInvoke.BodyCreationSettings_GetCollisionGroup(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// The collision group this body belongs to (determines if two objects can collide)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L94">Jolt/Physics/Body/BodyCreationSettings.h:94</see>
|
|
/// <br/>
|
|
/// <c>CollisionGroup mCollisionGroup</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// The value is copied into the field; the handle you pass stays yours to Dispose.
|
|
/// </para>
|
|
/// </remarks>
|
|
public void SetCollisionGroup(CollisionGroup value) =>
|
|
Jolt.PInvoke.BodyCreationSettings_SetCollisionGroup(this, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Motion type, determines if the object is static, dynamic or kinematic
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L97">Jolt/Physics/Body/BodyCreationSettings.h:97</see>
|
|
/// <br/>
|
|
/// <c>EMotionType mMotionType = EMotionType::Dynamic</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// @name Simulation properties
|
|
/// </para>
|
|
/// </remarks>
|
|
public MotionType GetMotionType() => Jolt.PInvoke.BodyCreationSettings_GetMotionType(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Motion type, determines if the object is static, dynamic or kinematic
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L97">Jolt/Physics/Body/BodyCreationSettings.h:97</see>
|
|
/// <br/>
|
|
/// <c>EMotionType mMotionType = EMotionType::Dynamic</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// @name Simulation properties
|
|
/// </para>
|
|
/// </remarks>
|
|
public void SetMotionType(MotionType value) => Jolt.PInvoke.BodyCreationSettings_SetMotionType(this, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Which degrees of freedom this body has (can be used to limit simulation to 2D)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L98">Jolt/Physics/Body/BodyCreationSettings.h:98</see>
|
|
/// <br/>
|
|
/// <c>EAllowedDOFs mAllowedDOFs = EAllowedDOFs::All</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public AllowedDOFs GetAllowedDOFs() => Jolt.PInvoke.BodyCreationSettings_GetAllowedDOFs(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Which degrees of freedom this body has (can be used to limit simulation to 2D)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L98">Jolt/Physics/Body/BodyCreationSettings.h:98</see>
|
|
/// <br/>
|
|
/// <c>EAllowedDOFs mAllowedDOFs = EAllowedDOFs::All</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetAllowedDOFs(AllowedDOFs value) => Jolt.PInvoke.BodyCreationSettings_SetAllowedDOFs(this, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// 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
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L99">Jolt/Physics/Body/BodyCreationSettings.h:99</see>
|
|
/// <br/>
|
|
/// <c>bool mAllowDynamicOrKinematic = false</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public bool GetAllowDynamicOrKinematic() => Jolt.PInvoke.BodyCreationSettings_GetAllowDynamicOrKinematic(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// 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
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L99">Jolt/Physics/Body/BodyCreationSettings.h:99</see>
|
|
/// <br/>
|
|
/// <c>bool mAllowDynamicOrKinematic = false</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetAllowDynamicOrKinematic(bool value) =>
|
|
Jolt.PInvoke.BodyCreationSettings_SetAllowDynamicOrKinematic(this, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// 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.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L100">Jolt/Physics/Body/BodyCreationSettings.h:100</see>
|
|
/// <br/>
|
|
/// <c>bool mIsSensor = false</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public bool GetIsSensor() => Jolt.PInvoke.BodyCreationSettings_GetIsSensor(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// 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.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L100">Jolt/Physics/Body/BodyCreationSettings.h:100</see>
|
|
/// <br/>
|
|
/// <c>bool mIsSensor = false</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetIsSensor(bool value) => Jolt.PInvoke.BodyCreationSettings_SetIsSensor(this, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// If kinematic objects can generate contact points against other kinematic or static objects. See
|
|
/// description at Body::SetCollideKinematicVsNonDynamic.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L101">Jolt/Physics/Body/BodyCreationSettings.h:101</see>
|
|
/// <br/>
|
|
/// <c>bool mCollideKinematicVsNonDynamic = false</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public bool GetCollideKinematicVsNonDynamic() =>
|
|
Jolt.PInvoke.BodyCreationSettings_GetCollideKinematicVsNonDynamic(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// If kinematic objects can generate contact points against other kinematic or static objects. See
|
|
/// description at Body::SetCollideKinematicVsNonDynamic.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L101">Jolt/Physics/Body/BodyCreationSettings.h:101</see>
|
|
/// <br/>
|
|
/// <c>bool mCollideKinematicVsNonDynamic = false</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetCollideKinematicVsNonDynamic(bool value) =>
|
|
Jolt.PInvoke.BodyCreationSettings_SetCollideKinematicVsNonDynamic(this, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// If this body should use manifold reduction (see description at Body::SetUseManifoldReduction)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L102">Jolt/Physics/Body/BodyCreationSettings.h:102</see>
|
|
/// <br/>
|
|
/// <c>bool mUseManifoldReduction = true</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public bool GetUseManifoldReduction() => Jolt.PInvoke.BodyCreationSettings_GetUseManifoldReduction(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// If this body should use manifold reduction (see description at Body::SetUseManifoldReduction)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L102">Jolt/Physics/Body/BodyCreationSettings.h:102</see>
|
|
/// <br/>
|
|
/// <c>bool mUseManifoldReduction = true</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetUseManifoldReduction(bool value) =>
|
|
Jolt.PInvoke.BodyCreationSettings_SetUseManifoldReduction(this, value);
|
|
|
|
/// <summary>
|
|
/// <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>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L103">Jolt/Physics/Body/BodyCreationSettings.h:103</see>
|
|
/// <br/>
|
|
/// <c>bool mApplyGyroscopicForce = false</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public bool GetApplyGyroscopicForce() => Jolt.PInvoke.BodyCreationSettings_GetApplyGyroscopicForce(this);
|
|
|
|
/// <summary>
|
|
/// <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>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L103">Jolt/Physics/Body/BodyCreationSettings.h:103</see>
|
|
/// <br/>
|
|
/// <c>bool mApplyGyroscopicForce = false</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetApplyGyroscopicForce(bool value) =>
|
|
Jolt.PInvoke.BodyCreationSettings_SetApplyGyroscopicForce(this, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Motion quality, or how well it detects collisions when it has a high velocity
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L104">Jolt/Physics/Body/BodyCreationSettings.h:104</see>
|
|
/// <br/>
|
|
/// <c>EMotionQuality mMotionQuality = EMotionQuality::Discrete</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public MotionQuality GetMotionQuality() => Jolt.PInvoke.BodyCreationSettings_GetMotionQuality(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Motion quality, or how well it detects collisions when it has a high velocity
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L104">Jolt/Physics/Body/BodyCreationSettings.h:104</see>
|
|
/// <br/>
|
|
/// <c>EMotionQuality mMotionQuality = EMotionQuality::Discrete</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetMotionQuality(MotionQuality value) =>
|
|
Jolt.PInvoke.BodyCreationSettings_SetMotionQuality(this, value);
|
|
|
|
/// <summary>
|
|
/// <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>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L105">Jolt/Physics/Body/BodyCreationSettings.h:105</see>
|
|
/// <br/>
|
|
/// <c>bool mEnhancedInternalEdgeRemoval = false</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public bool GetEnhancedInternalEdgeRemoval() =>
|
|
Jolt.PInvoke.BodyCreationSettings_GetEnhancedInternalEdgeRemoval(this);
|
|
|
|
/// <summary>
|
|
/// <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>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L105">Jolt/Physics/Body/BodyCreationSettings.h:105</see>
|
|
/// <br/>
|
|
/// <c>bool mEnhancedInternalEdgeRemoval = false</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetEnhancedInternalEdgeRemoval(bool value) =>
|
|
Jolt.PInvoke.BodyCreationSettings_SetEnhancedInternalEdgeRemoval(this, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// If this body can go to sleep or not
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L106">Jolt/Physics/Body/BodyCreationSettings.h:106</see>
|
|
/// <br/>
|
|
/// <c>bool mAllowSleeping = true</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public bool GetAllowSleeping() => Jolt.PInvoke.BodyCreationSettings_GetAllowSleeping(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// If this body can go to sleep or not
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L106">Jolt/Physics/Body/BodyCreationSettings.h:106</see>
|
|
/// <br/>
|
|
/// <c>bool mAllowSleeping = true</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetAllowSleeping(bool value) => Jolt.PInvoke.BodyCreationSettings_SetAllowSleeping(this, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// 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.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L107">Jolt/Physics/Body/BodyCreationSettings.h:107</see>
|
|
/// <br/>
|
|
/// <c>float mFriction = 0.2f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float GetFriction() => Jolt.PInvoke.BodyCreationSettings_GetFriction(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// 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.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L107">Jolt/Physics/Body/BodyCreationSettings.h:107</see>
|
|
/// <br/>
|
|
/// <c>float mFriction = 0.2f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetFriction(float value) => Jolt.PInvoke.BodyCreationSettings_SetFriction(this, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// 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.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L108">Jolt/Physics/Body/BodyCreationSettings.h:108</see>
|
|
/// <br/>
|
|
/// <c>float mRestitution = 0.0f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float GetRestitution() => Jolt.PInvoke.BodyCreationSettings_GetRestitution(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// 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.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L108">Jolt/Physics/Body/BodyCreationSettings.h:108</see>
|
|
/// <br/>
|
|
/// <c>float mRestitution = 0.0f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetRestitution(float value) => Jolt.PInvoke.BodyCreationSettings_SetRestitution(this, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Linear damping: dv/dt = -c * v. c. Value should be zero or positive and is usually close to 0.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L109">Jolt/Physics/Body/BodyCreationSettings.h:109</see>
|
|
/// <br/>
|
|
/// <c>float mLinearDamping = 0.05f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float GetLinearDamping() => Jolt.PInvoke.BodyCreationSettings_GetLinearDamping(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Linear damping: dv/dt = -c * v. c. Value should be zero or positive and is usually close to 0.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L109">Jolt/Physics/Body/BodyCreationSettings.h:109</see>
|
|
/// <br/>
|
|
/// <c>float mLinearDamping = 0.05f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetLinearDamping(float value) => Jolt.PInvoke.BodyCreationSettings_SetLinearDamping(this, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Angular damping: dw/dt = -c * w. c. Value should be zero or positive and is usually close to 0.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L110">Jolt/Physics/Body/BodyCreationSettings.h:110</see>
|
|
/// <br/>
|
|
/// <c>float mAngularDamping = 0.05f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float GetAngularDamping() => Jolt.PInvoke.BodyCreationSettings_GetAngularDamping(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Angular damping: dw/dt = -c * w. c. Value should be zero or positive and is usually close to 0.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L110">Jolt/Physics/Body/BodyCreationSettings.h:110</see>
|
|
/// <br/>
|
|
/// <c>float mAngularDamping = 0.05f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetAngularDamping(float value) => Jolt.PInvoke.BodyCreationSettings_SetAngularDamping(this, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Maximum linear velocity that this body can reach (m/s)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L111">Jolt/Physics/Body/BodyCreationSettings.h:111</see>
|
|
/// <br/>
|
|
/// <c>float mMaxLinearVelocity = 500.0f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float GetMaxLinearVelocity() => Jolt.PInvoke.BodyCreationSettings_GetMaxLinearVelocity(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Maximum linear velocity that this body can reach (m/s)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L111">Jolt/Physics/Body/BodyCreationSettings.h:111</see>
|
|
/// <br/>
|
|
/// <c>float mMaxLinearVelocity = 500.0f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetMaxLinearVelocity(float value) =>
|
|
Jolt.PInvoke.BodyCreationSettings_SetMaxLinearVelocity(this, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Maximum angular velocity that this body can reach (rad/s)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L112">Jolt/Physics/Body/BodyCreationSettings.h:112</see>
|
|
/// <br/>
|
|
/// <c>float mMaxAngularVelocity = 0.25f * JPH_PI * 60.0f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float GetMaxAngularVelocity() => Jolt.PInvoke.BodyCreationSettings_GetMaxAngularVelocity(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Maximum angular velocity that this body can reach (rad/s)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L112">Jolt/Physics/Body/BodyCreationSettings.h:112</see>
|
|
/// <br/>
|
|
/// <c>float mMaxAngularVelocity = 0.25f * JPH_PI * 60.0f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetMaxAngularVelocity(float value) =>
|
|
Jolt.PInvoke.BodyCreationSettings_SetMaxAngularVelocity(this, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Value to multiply gravity with for this body
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L113">Jolt/Physics/Body/BodyCreationSettings.h:113</see>
|
|
/// <br/>
|
|
/// <c>float mGravityFactor = 1.0f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float GetGravityFactor() => Jolt.PInvoke.BodyCreationSettings_GetGravityFactor(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Value to multiply gravity with for this body
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L113">Jolt/Physics/Body/BodyCreationSettings.h:113</see>
|
|
/// <br/>
|
|
/// <c>float mGravityFactor = 1.0f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetGravityFactor(float value) => Jolt.PInvoke.BodyCreationSettings_SetGravityFactor(this, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// 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.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L114">Jolt/Physics/Body/BodyCreationSettings.h:114</see>
|
|
/// <br/>
|
|
/// <c>uint mNumVelocityStepsOverride = 0</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public uint GetNumVelocityStepsOverride() =>
|
|
Jolt.PInvoke.BodyCreationSettings_GetNumVelocityStepsOverride(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// 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.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L114">Jolt/Physics/Body/BodyCreationSettings.h:114</see>
|
|
/// <br/>
|
|
/// <c>uint mNumVelocityStepsOverride = 0</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetNumVelocityStepsOverride(uint value) =>
|
|
Jolt.PInvoke.BodyCreationSettings_SetNumVelocityStepsOverride(this, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// 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.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L115">Jolt/Physics/Body/BodyCreationSettings.h:115</see>
|
|
/// <br/>
|
|
/// <c>uint mNumPositionStepsOverride = 0</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public uint GetNumPositionStepsOverride() =>
|
|
Jolt.PInvoke.BodyCreationSettings_GetNumPositionStepsOverride(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// 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.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L115">Jolt/Physics/Body/BodyCreationSettings.h:115</see>
|
|
/// <br/>
|
|
/// <c>uint mNumPositionStepsOverride = 0</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetNumPositionStepsOverride(uint value) =>
|
|
Jolt.PInvoke.BodyCreationSettings_SetNumPositionStepsOverride(this, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Determines how mMassPropertiesOverride will be used
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L118">Jolt/Physics/Body/BodyCreationSettings.h:118</see>
|
|
/// <br/>
|
|
/// <c>EOverrideMassProperties mOverrideMassProperties = EOverrideMassProperties::CalculateMassAndInertia</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// @name Mass properties of the body (by default calculated by the shape)
|
|
/// </para>
|
|
/// </remarks>
|
|
public OverrideMassProperties GetOverrideMassProperties() =>
|
|
Jolt.PInvoke.BodyCreationSettings_GetOverrideMassProperties(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Determines how mMassPropertiesOverride will be used
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L118">Jolt/Physics/Body/BodyCreationSettings.h:118</see>
|
|
/// <br/>
|
|
/// <c>EOverrideMassProperties mOverrideMassProperties = EOverrideMassProperties::CalculateMassAndInertia</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// @name Mass properties of the body (by default calculated by the shape)
|
|
/// </para>
|
|
/// </remarks>
|
|
public void SetOverrideMassProperties(OverrideMassProperties value) =>
|
|
Jolt.PInvoke.BodyCreationSettings_SetOverrideMassProperties(this, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// When calculating the inertia (not when it is provided) the calculated inertia will be multiplied by this
|
|
/// value
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L119">Jolt/Physics/Body/BodyCreationSettings.h:119</see>
|
|
/// <br/>
|
|
/// <c>float mInertiaMultiplier = 1.0f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public float GetInertiaMultiplier() => Jolt.PInvoke.BodyCreationSettings_GetInertiaMultiplier(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// When calculating the inertia (not when it is provided) the calculated inertia will be multiplied by this
|
|
/// value
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L119">Jolt/Physics/Body/BodyCreationSettings.h:119</see>
|
|
/// <br/>
|
|
/// <c>float mInertiaMultiplier = 1.0f</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetInertiaMultiplier(float value) =>
|
|
Jolt.PInvoke.BodyCreationSettings_SetInertiaMultiplier(this, value);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Contains replacement mass settings which override the automatically calculated values
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L120">Jolt/Physics/Body/BodyCreationSettings.h:120</see>
|
|
/// <br/>
|
|
/// <c>MassProperties mMassPropertiesOverride</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// The returned handle is an owned copy; Dispose it when you're done with it.
|
|
/// </para>
|
|
/// </remarks>
|
|
public MassProperties GetMassPropertiesOverride() =>
|
|
Jolt.PInvoke.BodyCreationSettings_GetMassPropertiesOverride(this);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Contains replacement mass settings which override the automatically calculated values
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Body/BodyCreationSettings.h#L120">Jolt/Physics/Body/BodyCreationSettings.h:120</see>
|
|
/// <br/>
|
|
/// <c>MassProperties mMassPropertiesOverride</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// The value is copied into the field; the handle you pass stays yours to Dispose.
|
|
/// </para>
|
|
/// </remarks>
|
|
public void SetMassPropertiesOverride(MassProperties value) =>
|
|
Jolt.PInvoke.BodyCreationSettings_SetMassPropertiesOverride(this, value);
|
|
|
|
public void Dispose() => Jolt.PInvoke.BodyCreationSettings_Destroy(this);
|
|
}
|
|
}
|