mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
149 lines
6.2 KiB
C#
149 lines
6.2 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>
|
|
/// Collision tester that tests collision using a raycast
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/VehicleCollisionTester.h#L84">Jolt/Physics/Vehicle/VehicleCollisionTester.h:84</see>
|
|
/// <br/>
|
|
/// <c>class VehicleCollisionTesterRay : public VehicleCollisionTester</c>
|
|
/// </para>
|
|
/// </summary>
|
|
[InteropHandle]
|
|
public readonly partial struct VehicleCollisionTesterRay : IDisposable
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// Constructor
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Physics/Vehicle/VehicleCollisionTester.h#L93">Jolt/Physics/Vehicle/VehicleCollisionTester.h:93</see>
|
|
/// <br/>
|
|
/// <c>explicit VehicleCollisionTesterRay(ObjectLayer inObjectLayer, Vec3Arg inUp = Vec3::sAxisY(), float inMaxSlopeAngle = DegreesToRadians(80.0f))</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// Constructor
|
|
/// @param inObjectLayer Object layer to test collision with
|
|
/// @param inUp World space up vector, used to avoid colliding with vertical walls.
|
|
/// @param inMaxSlopeAngle Max angle (rad) that is considered for colliding wheels. This is to avoid colliding with vertical walls.
|
|
/// </code>
|
|
/// </remarks>
|
|
public static VehicleCollisionTesterRay Create(
|
|
ushort objectLayer,
|
|
float3 up,
|
|
float maxSlopeAngle = 1.3962634f
|
|
) => Jolt.PInvoke.VehicleCollisionTesterRay_Create(objectLayer, up, maxSlopeAngle);
|
|
|
|
/// <inheritdoc cref="VehicleCollisionTester.Collide(PhysicsSystem, VehicleConstraint, uint, float3, float3, uint, out Body, out uint, out float3, out float3, out float)"/>
|
|
public bool Collide(
|
|
PhysicsSystem physicsSystem,
|
|
VehicleConstraint vehicleConstraint,
|
|
uint wheelIndex,
|
|
float3 origin,
|
|
float3 direction,
|
|
uint vehicleBodyID,
|
|
out Body body,
|
|
out uint subShapeID,
|
|
out float3 contactPosition,
|
|
out float3 contactNormal,
|
|
out float suspensionLength
|
|
) =>
|
|
((VehicleCollisionTester)this).Collide(
|
|
physicsSystem,
|
|
vehicleConstraint,
|
|
wheelIndex,
|
|
origin,
|
|
direction,
|
|
vehicleBodyID,
|
|
out body,
|
|
out subShapeID,
|
|
out contactPosition,
|
|
out contactNormal,
|
|
out suspensionLength
|
|
);
|
|
|
|
/// <inheritdoc cref="VehicleCollisionTester.PredictContactProperties(PhysicsSystem, VehicleConstraint, uint, float3, float3, uint, ref Body, ref uint, ref float3, ref float3, ref float)"/>
|
|
public void PredictContactProperties(
|
|
PhysicsSystem physicsSystem,
|
|
VehicleConstraint vehicleConstraint,
|
|
uint wheelIndex,
|
|
float3 origin,
|
|
float3 direction,
|
|
uint vehicleBodyID,
|
|
ref Body body,
|
|
ref uint subShapeID,
|
|
ref float3 contactPosition,
|
|
ref float3 contactNormal,
|
|
ref float suspensionLength
|
|
) =>
|
|
((VehicleCollisionTester)this).PredictContactProperties(
|
|
physicsSystem,
|
|
vehicleConstraint,
|
|
wheelIndex,
|
|
origin,
|
|
direction,
|
|
vehicleBodyID,
|
|
ref body,
|
|
ref subShapeID,
|
|
ref contactPosition,
|
|
ref contactNormal,
|
|
ref suspensionLength
|
|
);
|
|
|
|
public void AddRef() => ((VehicleCollisionTester)this).AddRef();
|
|
|
|
public void Release() => ((VehicleCollisionTester)this).Release();
|
|
|
|
public uint GetRefCount() => ((VehicleCollisionTester)this).GetRefCount();
|
|
|
|
public static implicit operator VehicleCollisionTester(VehicleCollisionTesterRay value) =>
|
|
Unsafe.BitCast<VehicleCollisionTesterRay, VehicleCollisionTester>(value);
|
|
|
|
public void Dispose()
|
|
{
|
|
if (IsNull())
|
|
return;
|
|
Release();
|
|
}
|
|
|
|
/// <inheritdoc cref="VehicleCollisionTester.GetObjectLayer()"/>
|
|
public ushort GetObjectLayer() => ((VehicleCollisionTester)this).GetObjectLayer();
|
|
|
|
/// <inheritdoc cref="VehicleCollisionTester.SetObjectLayer(ushort)"/>
|
|
public void SetObjectLayer(ushort objectLayer) => ((VehicleCollisionTester)this).SetObjectLayer(objectLayer);
|
|
|
|
/// <inheritdoc cref="VehicleCollisionTester.SetBroadPhaseLayerFilter(BroadPhaseLayerFilter)"/>
|
|
public void SetBroadPhaseLayerFilter(BroadPhaseLayerFilter filter) =>
|
|
((VehicleCollisionTester)this).SetBroadPhaseLayerFilter(filter);
|
|
|
|
/// <inheritdoc cref="VehicleCollisionTester.GetBroadPhaseLayerFilter()"/>
|
|
public BroadPhaseLayerFilter GetBroadPhaseLayerFilter() =>
|
|
((VehicleCollisionTester)this).GetBroadPhaseLayerFilter();
|
|
|
|
/// <inheritdoc cref="VehicleCollisionTester.SetObjectLayerFilter(ObjectLayerFilter)"/>
|
|
public void SetObjectLayerFilter(ObjectLayerFilter filter) =>
|
|
((VehicleCollisionTester)this).SetObjectLayerFilter(filter);
|
|
|
|
/// <inheritdoc cref="VehicleCollisionTester.GetObjectLayerFilter()"/>
|
|
public ObjectLayerFilter GetObjectLayerFilter() => ((VehicleCollisionTester)this).GetObjectLayerFilter();
|
|
|
|
/// <inheritdoc cref="VehicleCollisionTester.SetBodyFilter(BodyFilter)"/>
|
|
public void SetBodyFilter(BodyFilter filter) => ((VehicleCollisionTester)this).SetBodyFilter(filter);
|
|
|
|
/// <inheritdoc cref="VehicleCollisionTester.GetBodyFilter()"/>
|
|
public BodyFilter GetBodyFilter() => ((VehicleCollisionTester)this).GetBodyFilter();
|
|
}
|
|
}
|