mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
254 lines
11 KiB
C#
254 lines
11 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>
|
|
/// An infinite plane described by the formula X . Normal + Constant = 0.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/Plane.h#L10">Jolt/Geometry/Plane.h:10</see>
|
|
/// <br/>
|
|
/// <c>class Plane</c>
|
|
/// </para>
|
|
/// </summary>
|
|
[StructLayout(LayoutKind.Explicit, Size = 16)]
|
|
public partial struct Plane
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// XYZ = normal, W = constant, plane: x . normal + constant = 0
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/Plane.h#L101">Jolt/Geometry/Plane.h:101</see>
|
|
/// <br/>
|
|
/// <c>Vec4 mNormalAndConstant</c>
|
|
/// </para>
|
|
/// </summary>
|
|
[FieldOffset(0)]
|
|
public float4 NormalAndConstant;
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Constructor
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/Plane.h#L16">Jolt/Geometry/Plane.h:16</see>
|
|
/// <br/>
|
|
/// <c>Plane() = default</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Plane Create() => Jolt.PInvoke.Plane_Create();
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/Plane.h#L17">Jolt/Geometry/Plane.h:17</see>
|
|
/// <br/>
|
|
/// <c>explicit Plane(Vec4Arg inNormalAndConstant)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Plane Create(float4 normalAndConstant) => Jolt.PInvoke.Plane_Create_2(normalAndConstant);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/Plane.h#L18">Jolt/Geometry/Plane.h:18</see>
|
|
/// <br/>
|
|
/// <c>Plane(Vec3Arg inNormal, float inConstant)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Plane Create(float3 normal, float constant) => Jolt.PInvoke.Plane_Create_3(normal, constant);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Create from point and normal
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/Plane.h#L21">Jolt/Geometry/Plane.h:21</see>
|
|
/// <br/>
|
|
/// <c>static Plane sFromPointAndNormal(Vec3Arg inPoint, Vec3Arg inNormal)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Plane FromPointAndNormal(float3 point, float3 normal) =>
|
|
Jolt.PInvoke.Plane_FromPointAndNormal(point, normal);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Create from point and normal, double precision version that more accurately calculates the plane
|
|
/// constant
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/Plane.h#L24">Jolt/Geometry/Plane.h:24</see>
|
|
/// <br/>
|
|
/// <c>static Plane sFromPointAndNormal(DVec3Arg inPoint, Vec3Arg inNormal)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Plane FromPointAndNormal(double3 point, float3 normal) =>
|
|
Jolt.PInvoke.Plane_FromPointAndNormal_2(point, normal);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Create from 3 counter clockwise points
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/Plane.h#L27">Jolt/Geometry/Plane.h:27</see>
|
|
/// <br/>
|
|
/// <c>static Plane sFromPointsCCW(Vec3Arg inV1, Vec3Arg inV2, Vec3Arg inV3)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public static Plane FromPointsCCW(float3 v1, float3 v2, float3 v3) =>
|
|
Jolt.PInvoke.Plane_FromPointsCCW(v1, v2, v3);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Properties
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/Plane.h#L30">Jolt/Geometry/Plane.h:30</see>
|
|
/// <br/>
|
|
/// <c>Vec3 GetNormal() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public readonly float3 GetNormal() => Jolt.PInvoke.Plane_GetNormal(ref Unsafe.AsRef(in this));
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/Plane.h#L31">Jolt/Geometry/Plane.h:31</see>
|
|
/// <br/>
|
|
/// <c>void SetNormal(Vec3Arg inNormal)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetNormal(float3 normal) => Jolt.PInvoke.Plane_SetNormal(ref this, normal);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/Plane.h#L32">Jolt/Geometry/Plane.h:32</see>
|
|
/// <br/>
|
|
/// <c>float GetConstant() const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public readonly float GetConstant() => Jolt.PInvoke.Plane_GetConstant(ref Unsafe.AsRef(in this));
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/Plane.h#L33">Jolt/Geometry/Plane.h:33</see>
|
|
/// <br/>
|
|
/// <c>void SetConstant(float inConstant)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public void SetConstant(float constant) => Jolt.PInvoke.Plane_SetConstant(ref this, constant);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Store as 4 floats
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/Plane.h#L36">Jolt/Geometry/Plane.h:36</see>
|
|
/// <br/>
|
|
/// <c>void StoreFloat4(Float4 *outV) const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public readonly unsafe void StoreFloat4(Ptr<float4> v) =>
|
|
Jolt.PInvoke.Plane_StoreFloat4(ref Unsafe.AsRef(in this), v);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Offset the plane (positive value means move it in the direction of the plane normal)
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/Plane.h#L39">Jolt/Geometry/Plane.h:39</see>
|
|
/// <br/>
|
|
/// <c>Plane Offset(float inDistance) const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public readonly Plane Offset(float distance) => Jolt.PInvoke.Plane_Offset(ref Unsafe.AsRef(in this), distance);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Transform the plane by a matrix
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/Plane.h#L42">Jolt/Geometry/Plane.h:42</see>
|
|
/// <br/>
|
|
/// <c>inline Plane GetTransformed(Mat44Arg inTransform) const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public readonly Plane GetTransformed(in float4x4 transform) =>
|
|
Jolt.PInvoke.Plane_GetTransformed(ref Unsafe.AsRef(in this), in transform);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Scale the plane, can handle non-uniform and negative scaling
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/Plane.h#L49">Jolt/Geometry/Plane.h:49</see>
|
|
/// <br/>
|
|
/// <c>inline Plane Scaled(Vec3Arg inScale) const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public readonly Plane Scaled(float3 scale) => Jolt.PInvoke.Plane_Scaled(ref Unsafe.AsRef(in this), scale);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Distance point to plane
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/Plane.h#L57">Jolt/Geometry/Plane.h:57</see>
|
|
/// <br/>
|
|
/// <c>float SignedDistance(Vec3Arg inPoint) const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public readonly float SignedDistance(float3 point) =>
|
|
Jolt.PInvoke.Plane_SignedDistance(ref Unsafe.AsRef(in this), point);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Project inPoint onto the plane
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/Plane.h#L60">Jolt/Geometry/Plane.h:60</see>
|
|
/// <br/>
|
|
/// <c>Vec3 ProjectPointOnPlane(Vec3Arg inPoint) const</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public readonly float3 ProjectPointOnPlane(float3 point) =>
|
|
Jolt.PInvoke.Plane_ProjectPointOnPlane(ref Unsafe.AsRef(in this), point);
|
|
|
|
/// <summary>
|
|
/// <para>
|
|
/// Returns intersection point between 3 planes
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Geometry/Plane.h#L63">Jolt/Geometry/Plane.h:63</see>
|
|
/// <br/>
|
|
/// <c>static bool sIntersectPlanes(const Plane &inP1, const Plane &inP2, const Plane &inP3, Vec3 &outPoint)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
public static bool IntersectPlanes(in Plane p1, in Plane p2, in Plane p3, out float3 point) =>
|
|
Jolt.PInvoke.Plane_IntersectPlanes(in p1, in p2, in p3, out point);
|
|
}
|
|
}
|