mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-26 13:08:24 +01:00
692 lines
37 KiB
C#
692 lines
37 KiB
C#
// <auto-generated/>
|
|
// Generated by Brutal.Jolt.Generate; do not edit by hand.
|
|
#nullable enable
|
|
|
|
using Brutal.Interop;
|
|
using Brutal.Numerics;
|
|
namespace Brutal.JoltApi
|
|
{
|
|
public static partial class Jolt
|
|
{
|
|
public static unsafe partial class PInvoke
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Core/Memory.h#L35">Jolt/Core/Memory.h:35</see>
|
|
/// <br/>
|
|
/// <c>void RegisterDefaultAllocator()</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Register platform default allocation / free functions
|
|
/// </para>
|
|
/// </remarks>
|
|
[LibraryImport("jolt", EntryPoint = "Jolt_RegisterDefaultAllocator")]
|
|
public static partial void RegisterDefaultAllocator();
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Core/HashCombine.h#L15">Jolt/Core/HashCombine.h:15</see>
|
|
/// <br/>
|
|
/// <c>inline uint64 HashBytes(const void *inData, uint inSize, uint64 inSeed = 0xcbf29ce484222325UL)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Implements the FNV-1a hash algorithm
|
|
/// @see https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function
|
|
/// @param inData Data block of bytes
|
|
/// @param inSize Number of bytes
|
|
/// @param inSeed Seed of the hash (can be used to pass in the hash of a previous operation, otherwise leave default)
|
|
/// @return Hash
|
|
/// </code>
|
|
/// </remarks>
|
|
[LibraryImport("jolt", EntryPoint = "Jolt_HashBytes")]
|
|
public static partial ulong HashBytes(void* data, uint size, ulong seed);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Core/HashCombine.h#L28">Jolt/Core/HashCombine.h:28</see>
|
|
/// <br/>
|
|
/// <c>constexpr uint64 HashString(const char *inString, uint64 inSeed = 0xcbf29ce484222325UL)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Calculate the FNV-1a hash of inString.
|
|
/// @see https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function
|
|
/// </code>
|
|
/// </remarks>
|
|
[LibraryImport("jolt", EntryPoint = "Jolt_HashString")]
|
|
public static partial ulong HashString(byte* @string, ulong seed);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Core/HashCombine.h#L43">Jolt/Core/HashCombine.h:43</see>
|
|
/// <br/>
|
|
/// <c>inline uint64 Hash64(uint64 inValue)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// A 64 bit hash function by Thomas Wang, Jan 1997
|
|
/// See: http://web.archive.org/web/20071223173210/http://www.concentric.net/~Ttwang/tech/inthash.htm
|
|
/// @param inValue Value to hash
|
|
/// @return Hash
|
|
/// </code>
|
|
/// </remarks>
|
|
[LibraryImport("jolt", EntryPoint = "Jolt_Hash64")]
|
|
public static partial ulong Hash64(ulong value);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Math/Math.h#L16">Jolt/Math/Math.h:16</see>
|
|
/// <br/>
|
|
/// <c>constexpr float DegreesToRadians(float inV)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Convert a value from degrees to radians
|
|
/// </para>
|
|
/// </remarks>
|
|
[LibraryImport("jolt", EntryPoint = "Jolt_DegreesToRadians")]
|
|
public static partial float DegreesToRadians(float v);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Math/Math.h#L22">Jolt/Math/Math.h:22</see>
|
|
/// <br/>
|
|
/// <c>constexpr float RadiansToDegrees(float inV)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Convert a value from radians to degrees
|
|
/// </para>
|
|
/// </remarks>
|
|
[LibraryImport("jolt", EntryPoint = "Jolt_RadiansToDegrees")]
|
|
public static partial float RadiansToDegrees(float v);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Math/Math.h#L28">Jolt/Math/Math.h:28</see>
|
|
/// <br/>
|
|
/// <c>inline float CenterAngleAroundZero(float inV)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Convert angle in radians to the range \f$[-\pi, \pi]\f$
|
|
/// </para>
|
|
/// </remarks>
|
|
[LibraryImport("jolt", EntryPoint = "Jolt_CenterAngleAroundZero")]
|
|
public static partial float CenterAngleAroundZero(float v);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Math/Math.h#L98">Jolt/Math/Math.h:98</see>
|
|
/// <br/>
|
|
/// <c>inline uint CountTrailingZeros(uint32 inValue)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Compute number of trailing zero bits (how many low bits are zero)
|
|
/// </para>
|
|
/// </remarks>
|
|
[LibraryImport("jolt", EntryPoint = "Jolt_CountTrailingZeros")]
|
|
public static partial uint CountTrailingZeros(uint value);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Math/Math.h#L134">Jolt/Math/Math.h:134</see>
|
|
/// <br/>
|
|
/// <c>inline uint CountLeadingZeros(uint32 inValue)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Compute the number of leading zero bits (how many high bits are zero)
|
|
/// </para>
|
|
/// </remarks>
|
|
[LibraryImport("jolt", EntryPoint = "Jolt_CountLeadingZeros")]
|
|
public static partial uint CountLeadingZeros(uint value);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Math/Math.h#L164">Jolt/Math/Math.h:164</see>
|
|
/// <br/>
|
|
/// <c>inline uint CountBits(uint32 inValue)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Count the number of 1 bits in a value
|
|
/// </para>
|
|
/// </remarks>
|
|
[LibraryImport("jolt", EntryPoint = "Jolt_CountBits")]
|
|
public static partial uint CountBits(uint value);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Math/Math.h#L185">Jolt/Math/Math.h:185</see>
|
|
/// <br/>
|
|
/// <c>inline uint32 GetNextPowerOf2(uint32 inValue)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Get the next higher power of 2 of a value, or the value itself if the value is already a power of 2
|
|
/// </para>
|
|
/// </remarks>
|
|
[LibraryImport("jolt", EntryPoint = "Jolt_GetNextPowerOf2")]
|
|
public static partial uint GetNextPowerOf2(uint value);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Math/Trigonometry.h#L12">Jolt/Math/Trigonometry.h:12</see>
|
|
/// <br/>
|
|
/// <c>float Sin(float inX)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Sine of x (input in radians)
|
|
/// </para>
|
|
/// </remarks>
|
|
[LibraryImport("jolt", EntryPoint = "Jolt_Sin")]
|
|
public static partial float Sin(float x);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Math/Trigonometry.h#L20">Jolt/Math/Trigonometry.h:20</see>
|
|
/// <br/>
|
|
/// <c>float Cos(float inX)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Cosine of x (input in radians)
|
|
/// </para>
|
|
/// </remarks>
|
|
[LibraryImport("jolt", EntryPoint = "Jolt_Cos")]
|
|
public static partial float Cos(float x);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Math/Trigonometry.h#L28">Jolt/Math/Trigonometry.h:28</see>
|
|
/// <br/>
|
|
/// <c>float Tan(float inX)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Tangent of x (input in radians)
|
|
/// </para>
|
|
/// </remarks>
|
|
[LibraryImport("jolt", EntryPoint = "Jolt_Tan")]
|
|
public static partial float Tan(float x);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Math/Trigonometry.h#L35">Jolt/Math/Trigonometry.h:35</see>
|
|
/// <br/>
|
|
/// <c>float ASin(float inX)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Arc sine of x (returns value in the range [-PI / 2, PI / 2])
|
|
/// Note that all input values will be clamped to the range [-1, 1] and this function will not return NaNs like std::asin
|
|
/// </code>
|
|
/// </remarks>
|
|
[LibraryImport("jolt", EntryPoint = "Jolt_ASin")]
|
|
public static partial float ASin(float x);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Math/Trigonometry.h#L42">Jolt/Math/Trigonometry.h:42</see>
|
|
/// <br/>
|
|
/// <c>float ACos(float inX)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Arc cosine of x (returns value in the range [0, PI])
|
|
/// Note that all input values will be clamped to the range [-1, 1] and this function will not return NaNs like std::acos
|
|
/// </code>
|
|
/// </remarks>
|
|
[LibraryImport("jolt", EntryPoint = "Jolt_ACos")]
|
|
public static partial float ACos(float x);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Math/Trigonometry.h#L48">Jolt/Math/Trigonometry.h:48</see>
|
|
/// <br/>
|
|
/// <c>float ACosApproximate(float inX)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// An approximation of ACos, max error is 4.2e-3 over the entire range [-1, 1], is approximately 2.5x
|
|
/// faster than ACos
|
|
/// </para>
|
|
/// </remarks>
|
|
[LibraryImport("jolt", EntryPoint = "Jolt_ACosApproximate")]
|
|
public static partial float ACosApproximate(float x);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Math/Trigonometry.h#L68">Jolt/Math/Trigonometry.h:68</see>
|
|
/// <br/>
|
|
/// <c>float ATan(float inX)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Arc tangent of x (returns value in the range [-PI / 2, PI / 2])
|
|
/// </para>
|
|
/// </remarks>
|
|
[LibraryImport("jolt", EntryPoint = "Jolt_ATan")]
|
|
public static partial float ATan(float x);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Math/Trigonometry.h#L74">Jolt/Math/Trigonometry.h:74</see>
|
|
/// <br/>
|
|
/// <c>float ATan2(float inY, float inX)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Arc tangent of y / x using the signs of the arguments to determine the correct quadrant (returns
|
|
/// value in the range [-PI, PI])
|
|
/// </para>
|
|
/// </remarks>
|
|
[LibraryImport("jolt", EntryPoint = "Jolt_ATan2")]
|
|
public static partial float ATan2(float y, float x);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/ConfigurationString.h#L10">Jolt/ConfigurationString.h:10</see>
|
|
/// <br/>
|
|
/// <c>inline const char *GetConfigurationString()</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Construct a string that lists the most important configuration settings
|
|
/// </para>
|
|
/// </remarks>
|
|
[LibraryImport("jolt", EntryPoint = "Jolt_GetConfigurationString")]
|
|
public static partial byte* GetConfigurationString();
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/RegisterTypes.h#L10">Jolt/RegisterTypes.h:10</see>
|
|
/// <br/>
|
|
/// <c>extern bool VerifyJoltVersionIDInternal(uint64 inVersionID)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Internal helper function
|
|
/// </para>
|
|
/// </remarks>
|
|
[LibraryImport("jolt", EntryPoint = "Jolt_VerifyJoltVersionIDInternal")]
|
|
public static partial Brutal.Bool8 VerifyJoltVersionIDInternal(ulong versionID);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/RegisterTypes.h#L16">Jolt/RegisterTypes.h:16</see>
|
|
/// <br/>
|
|
/// <c>bool VerifyJoltVersionID()</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// This function can be used to verify the library ABI is compatible with your
|
|
/// application.
|
|
/// Use it in this way: `assert(VerifyJoltVersionID());`.
|
|
/// Returns `false` if the library used is not compatible with your app.
|
|
/// </code>
|
|
/// </remarks>
|
|
[LibraryImport("jolt", EntryPoint = "Jolt_VerifyJoltVersionID")]
|
|
public static partial Brutal.Bool8 VerifyJoltVersionID();
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/RegisterTypes.h#L19">Jolt/RegisterTypes.h:19</see>
|
|
/// <br/>
|
|
/// <c>extern void RegisterTypesInternal(uint64 inVersionID)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Internal helper function
|
|
/// </para>
|
|
/// </remarks>
|
|
[LibraryImport("jolt", EntryPoint = "Jolt_RegisterTypesInternal")]
|
|
public static partial void RegisterTypesInternal(ulong versionID);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/RegisterTypes.h#L24">Jolt/RegisterTypes.h:24</see>
|
|
/// <br/>
|
|
/// <c>void RegisterTypes()</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Register all physics types with the factory and install their collision handlers with the CollisionDispatch class.
|
|
/// If you have your own custom shape types you probably need to register their handlers with the CollisionDispatch before calling this function.
|
|
/// If you implement your own default material (PhysicsMaterial::sDefault) make sure to initialize it before this function or else this function will create one for you.
|
|
/// </code>
|
|
/// </remarks>
|
|
[LibraryImport("jolt", EntryPoint = "Jolt_RegisterTypes")]
|
|
public static partial void RegisterTypes();
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/RegisterTypes.h#L27">Jolt/RegisterTypes.h:27</see>
|
|
/// <br/>
|
|
/// <c>extern void UnregisterTypes()</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Unregisters all types with the factory and cleans up the default material
|
|
/// </para>
|
|
/// </remarks>
|
|
[LibraryImport("jolt", EntryPoint = "Jolt_UnregisterTypes")]
|
|
public static partial void UnregisterTypes();
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Core/TickCounter.h#L28">Jolt/Core/TickCounter.h:28</see>
|
|
/// <br/>
|
|
/// <c>uint64 GetProcessorTickCount()</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Functionality to get the processors cycle counter
|
|
/// </para>
|
|
/// </remarks>
|
|
[LibraryImport("jolt", EntryPoint = "Jolt_GetProcessorTickCount")]
|
|
public static partial ulong GetProcessorTickCount();
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Core/StringTools.h#L36">Jolt/Core/StringTools.h:36</see>
|
|
/// <br/>
|
|
/// <c>const char *NibbleToBinary(uint32 inNibble)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Converts the lower 4 bits of inNibble to a string that represents the number in binary format
|
|
/// </para>
|
|
/// </remarks>
|
|
[LibraryImport("jolt", EntryPoint = "Jolt_NibbleToBinary")]
|
|
public static partial byte* NibbleToBinary(uint nibble);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Geometry/AABox4.h#L193">Jolt/Geometry/AABox4.h:193</see>
|
|
/// <br/>
|
|
/// <c>Vec4 AABox4DistanceSqToPoint(Vec4Arg inPointX, Vec4Arg inPointY, Vec4Arg inPointZ, Vec4Arg inBoxMinX, Vec4Arg inBoxMinY, Vec4Arg inBoxMinZ, Vec4Arg inBoxMaxX, Vec4Arg inBoxMaxY, Vec4Arg inBoxMaxZ)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Get the squared distance between 4 AABoxes and a point
|
|
/// </para>
|
|
/// </remarks>
|
|
[LibraryImport("jolt", EntryPoint = "Jolt_AABox4DistanceSqToPoint")]
|
|
public static partial float4 AABox4DistanceSqToPoint(float4 pointX, float4 pointY, float4 pointZ, float4 boxMinX, float4 boxMinY, float4 boxMinZ, float4 boxMaxX, float4 boxMaxY, float4 boxMaxZ);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Geometry/AABox4.h#L205">Jolt/Geometry/AABox4.h:205</see>
|
|
/// <br/>
|
|
/// <c>Vec4 AABox4DistanceSqToPoint(Vec3 inPoint, Vec4Arg inBoxMinX, Vec4Arg inBoxMinY, Vec4Arg inBoxMinZ, Vec4Arg inBoxMaxX, Vec4Arg inBoxMaxY, Vec4Arg inBoxMaxZ)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Get the squared distance between 4 AABoxes and a point
|
|
/// </para>
|
|
/// </remarks>
|
|
[LibraryImport("jolt", EntryPoint = "Jolt_AABox4DistanceSqToPoint_2")]
|
|
public static partial float4 AABox4DistanceSqToPoint_2(float3 point, float4 boxMinX, float4 boxMinY, float4 boxMinZ, float4 boxMaxX, float4 boxMaxY, float4 boxMaxZ);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Geometry/RayAABox.h#L33">Jolt/Geometry/RayAABox.h:33</see>
|
|
/// <br/>
|
|
/// <c>float RayAABox(Vec3Arg inOrigin, const RayInvDirection &inInvDirection, Vec3Arg inBoundsMin, Vec3Arg inBoundsMax)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Intersect AABB with ray, returns minimal distance along ray or FLT_MAX if no hit
|
|
/// Note: Can return negative value if ray starts in box
|
|
/// </code>
|
|
/// </remarks>
|
|
[LibraryImport("jolt", EntryPoint = "Jolt_RayAABox")]
|
|
public static partial float RayAABox(float3 origin, RayInvDirection invDirection, float3 boundsMin, float3 boundsMax);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Geometry/RayAABox.h#L72">Jolt/Geometry/RayAABox.h:72</see>
|
|
/// <br/>
|
|
/// <c>Vec4 RayAABox4(Vec3Arg inOrigin, const RayInvDirection &inInvDirection, Vec4Arg inBoundsMinX, Vec4Arg inBoundsMinY, Vec4Arg inBoundsMinZ, Vec4Arg inBoundsMaxX, Vec4Arg inBoundsMaxY, Vec4Arg inBoundsMaxZ)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Intersect 4 AABBs with ray, returns minimal distance along ray or FLT_MAX if no hit
|
|
/// Note: Can return negative value if ray starts in box
|
|
/// </code>
|
|
/// </remarks>
|
|
[LibraryImport("jolt", EntryPoint = "Jolt_RayAABox4")]
|
|
public static partial float4 RayAABox4(float3 origin, RayInvDirection invDirection, float4 boundsMinX, float4 boundsMinY, float4 boundsMinZ, float4 boundsMaxX, float4 boundsMaxY, float4 boundsMaxZ);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Geometry/RayAABox.h#L136">Jolt/Geometry/RayAABox.h:136</see>
|
|
/// <br/>
|
|
/// <c>void RayAABox(Vec3Arg inOrigin, const RayInvDirection &inInvDirection, Vec3Arg inBoundsMin, Vec3Arg inBoundsMax, float &outMin, float &outMax)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Intersect AABB with ray, returns minimal and maximal distance along ray or FLT_MAX, -FLT_MAX if no hit
|
|
/// Note: Can return negative value for outMin if ray starts in box
|
|
/// </code>
|
|
/// </remarks>
|
|
[LibraryImport("jolt", EntryPoint = "Jolt_RayAABox_2")]
|
|
public static partial void RayAABox_2(float3 origin, RayInvDirection invDirection, float3 boundsMin, float3 boundsMax, out float min, out float max);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Geometry/RayAABox.h#L175">Jolt/Geometry/RayAABox.h:175</see>
|
|
/// <br/>
|
|
/// <c>bool RayAABoxHits(Vec3Arg inOrigin, const RayInvDirection &inInvDirection, Vec3Arg inBoundsMin, Vec3Arg inBoundsMax, float inClosest)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Intersect AABB with ray, returns true if there is a hit closer than inClosest
|
|
/// </para>
|
|
/// </remarks>
|
|
[LibraryImport("jolt", EntryPoint = "Jolt_RayAABoxHits")]
|
|
public static partial Brutal.Bool8 RayAABoxHits(float3 origin, RayInvDirection invDirection, float3 boundsMin, float3 boundsMax, float closest);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Geometry/RayAABox.h#L216">Jolt/Geometry/RayAABox.h:216</see>
|
|
/// <br/>
|
|
/// <c>bool RayAABoxHits(Vec3Arg inOrigin, Vec3Arg inDirection, Vec3Arg inBoundsMin, Vec3Arg inBoundsMax)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Intersect AABB with ray without hit fraction, based on separating axis test
|
|
/// @see http://www.codercorner.com/RayAABB.cpp
|
|
/// </code>
|
|
/// </remarks>
|
|
[LibraryImport("jolt", EntryPoint = "Jolt_RayAABoxHits_2")]
|
|
public static partial Brutal.Bool8 RayAABoxHits_2(float3 origin, float3 direction, float3 boundsMin, float3 boundsMax);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Geometry/RayCylinder.h#L17">Jolt/Geometry/RayCylinder.h:17</see>
|
|
/// <br/>
|
|
/// <c>float RayCylinder(Vec3Arg inRayOrigin, Vec3Arg inRayDirection, float inCylinderRadius)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Tests a ray starting at inRayOrigin and extending infinitely in inRayDirection
|
|
/// against an infinite cylinder centered along the Y axis
|
|
/// @return FLT_MAX if there is no intersection, otherwise the fraction along the ray.
|
|
/// @param inRayDirection Direction of the ray. Does not need to be normalized.
|
|
/// @param inRayOrigin Origin of the ray. If the ray starts inside the cylinder, the returned fraction will be 0.
|
|
/// @param inCylinderRadius Radius of the infinite cylinder
|
|
/// </code>
|
|
/// </remarks>
|
|
[LibraryImport("jolt", EntryPoint = "Jolt_RayCylinder")]
|
|
public static partial float RayCylinder(float3 rayOrigin, float3 rayDirection, float cylinderRadius);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Geometry/RayCylinder.h#L57">Jolt/Geometry/RayCylinder.h:57</see>
|
|
/// <br/>
|
|
/// <c>float RayCylinder(Vec3Arg inRayOrigin, Vec3Arg inRayDirection, float inCylinderHalfHeight, float inCylinderRadius)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Test a ray against a cylinder centered around the origin with its axis along the Y axis and half height specified.
|
|
/// @return FLT_MAX if there is no intersection, otherwise the fraction along the ray.
|
|
/// @param inRayDirection Ray direction. Does not need to be normalized.
|
|
/// @param inRayOrigin Origin of the ray. If the ray starts inside the cylinder, the returned fraction will be 0.
|
|
/// @param inCylinderRadius Radius of the cylinder
|
|
/// @param inCylinderHalfHeight Distance from the origin to the top (or bottom) of the cylinder
|
|
/// </code>
|
|
/// </remarks>
|
|
[LibraryImport("jolt", EntryPoint = "Jolt_RayCylinder_2")]
|
|
public static partial float RayCylinder_2(float3 rayOrigin, float3 rayDirection, float cylinderHalfHeight, float cylinderRadius);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Geometry/RaySphere.h#L17">Jolt/Geometry/RaySphere.h:17</see>
|
|
/// <br/>
|
|
/// <c>float RaySphere(Vec3Arg inRayOrigin, Vec3Arg inRayDirection, Vec3Arg inSphereCenter, float inSphereRadius)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Tests a ray starting at inRayOrigin and extending infinitely in inRayDirection against a sphere,
|
|
/// @return FLT_MAX if there is no intersection, otherwise the fraction along the ray.
|
|
/// @param inRayOrigin Ray origin. If the ray starts inside the sphere, the returned fraction will be 0.
|
|
/// @param inRayDirection Ray direction. Does not need to be normalized.
|
|
/// @param inSphereCenter Position of the center of the sphere
|
|
/// @param inSphereRadius Radius of the sphere
|
|
/// </code>
|
|
/// </remarks>
|
|
[LibraryImport("jolt", EntryPoint = "Jolt_RaySphere")]
|
|
public static partial float RaySphere(float3 rayOrigin, float3 rayDirection, float3 sphereCenter, float sphereRadius);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Geometry/RaySphere.h#L54">Jolt/Geometry/RaySphere.h:54</see>
|
|
/// <br/>
|
|
/// <c>int RaySphere(Vec3Arg inRayOrigin, Vec3Arg inRayDirection, Vec3Arg inSphereCenter, float inSphereRadius, float &outMinFraction, float &outMaxFraction)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Tests a ray starting at inRayOrigin and extending infinitely in inRayDirection against a sphere.
|
|
/// Outputs entry and exit points (outMinFraction and outMaxFraction) along the ray (which could be negative if the hit point is before the start of the ray).
|
|
/// @param inRayOrigin Ray origin. If the ray starts inside the sphere, the returned fraction will be 0.
|
|
/// @param inRayDirection Ray direction. Does not need to be normalized.
|
|
/// @param inSphereCenter Position of the center of the sphere.
|
|
/// @param inSphereRadius Radius of the sphere.
|
|
/// @param outMinFraction Returned lowest intersection fraction
|
|
/// @param outMaxFraction Returned highest intersection fraction
|
|
/// @return The amount of intersections with the sphere.
|
|
/// If 1 intersection is returned outMinFraction will be equal to outMaxFraction
|
|
/// </code>
|
|
/// </remarks>
|
|
[LibraryImport("jolt", EntryPoint = "Jolt_RaySphere_2")]
|
|
public static partial int RaySphere_2(float3 rayOrigin, float3 rayDirection, float3 sphereCenter, float sphereRadius, out float minFraction, out float maxFraction);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Geometry/RayCapsule.h#L19">Jolt/Geometry/RayCapsule.h:19</see>
|
|
/// <br/>
|
|
/// <c>float RayCapsule(Vec3Arg inRayOrigin, Vec3Arg inRayDirection, float inCapsuleHalfHeight, float inCapsuleRadius)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Tests a ray starting at inRayOrigin and extending infinitely in inRayDirection
|
|
/// against a capsule centered around the origin with its axis along the Y axis and half height specified.
|
|
/// @return FLT_MAX if there is no intersection, otherwise the fraction along the ray.
|
|
/// @param inRayDirection Ray direction. Does not need to be normalized.
|
|
/// @param inRayOrigin Origin of the ray. If the ray starts inside the capsule, the returned fraction will be 0.
|
|
/// @param inCapsuleHalfHeight Distance from the origin to the center of the top sphere (or that of the bottom)
|
|
/// @param inCapsuleRadius Radius of the top/bottom sphere
|
|
/// </code>
|
|
/// </remarks>
|
|
[LibraryImport("jolt", EntryPoint = "Jolt_RayCapsule")]
|
|
public static partial float RayCapsule(float3 rayOrigin, float3 rayDirection, float capsuleHalfHeight, float capsuleRadius);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Geometry/RayTriangle.h#L11">Jolt/Geometry/RayTriangle.h:11</see>
|
|
/// <br/>
|
|
/// <c>float RayTriangle(Vec3Arg inOrigin, Vec3Arg inDirection, Vec3Arg inV0, Vec3Arg inV1, Vec3Arg inV2)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Intersect ray with triangle, returns closest point or FLT_MAX if no hit (branch less version)
|
|
/// Adapted from: http://en.wikipedia.org/wiki/M%C3%B6ller%E2%80%93Trumbore_intersection_algorithm
|
|
/// </code>
|
|
/// </remarks>
|
|
[LibraryImport("jolt", EntryPoint = "Jolt_RayTriangle")]
|
|
public static partial float RayTriangle(float3 origin, float3 direction, float3 v0, float3 v1, float3 v2);
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Geometry/RayTriangle.h#L76">Jolt/Geometry/RayTriangle.h:76</see>
|
|
/// <br/>
|
|
/// <c>Vec4 RayTriangle4(Vec3Arg inOrigin, Vec3Arg inDirection, Vec4Arg inV0X, Vec4Arg inV0Y, Vec4Arg inV0Z, Vec4Arg inV1X, Vec4Arg inV1Y, Vec4Arg inV1Z, Vec4Arg inV2X, Vec4Arg inV2Y, Vec4Arg inV2Z)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Intersect ray with 4 triangles in SOA format, returns 4 vector of closest points or FLT_MAX if no
|
|
/// hit (uses bit tricks to do less divisions)
|
|
/// </para>
|
|
/// </remarks>
|
|
[LibraryImport("jolt", EntryPoint = "Jolt_RayTriangle4")]
|
|
public static partial float4 RayTriangle4(float3 origin, float3 direction, float4 v0X, float4 v0Y, float4 v0Z, float4 v1X, float4 v1Y, float4 v1Z, float4 v2X, float4 v2Y, float4 v2Z);
|
|
/// <summary>
|
|
/// <para>
|
|
/// The error message from the most recent failed Result-returning call on this thread, the text the
|
|
/// throwing wrappers (ShapeSettings.CreateShape and friends) report.
|
|
/// </para>
|
|
/// </summary>
|
|
[LibraryImport("jolt", EntryPoint = "Jolt_GetLastError")]
|
|
public static partial nint GetLastError();
|
|
}
|
|
}
|
|
}
|