brutal/Brutal.Jolt/Generated/Classes/StreamIn.gen.cs
Rian Drake b578433e37 first
2026-10-15 17:10:50 +13:00

106 lines
4.1 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>
/// Simple binary input stream
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Core/StreamIn.h#L12">Jolt/Core/StreamIn.h:12</see>
/// <br/>
/// <c>class StreamIn : public NonCopyable</c>
/// </para>
/// </summary>
[InteropHandle]
public readonly partial struct StreamIn
{
/// <summary>
/// <para>
/// Read a string of bytes from the binary stream
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Core/StreamIn.h#L19">Jolt/Core/StreamIn.h:19</see>
/// <br/>
/// <c>virtual void ReadBytes(void *outData, size_t inNumBytes) = 0</c>
/// </para>
/// </summary>
public unsafe void ReadBytes(Ptr data, ByteSize numBytes) =>
Jolt.PInvoke.StreamIn_ReadBytes(this, data, (nuint)numBytes);
/// <summary>
/// <para>
/// Returns true when an attempt has been made to read past the end of the file. Note that this follows the
/// convention of std::basic_ios::eof which only returns true when an attempt is made to read past the end,
/// not when the read pointer is at the end.
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Core/StreamIn.h#L23">Jolt/Core/StreamIn.h:23</see>
/// <br/>
/// <c>virtual bool IsEOF() const = 0</c>
/// </para>
/// </summary>
public bool IsEOF() => Jolt.PInvoke.StreamIn_IsEOF(this);
/// <summary>
/// <para>
/// Returns true if there was an IO failure
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Core/StreamIn.h#L26">Jolt/Core/StreamIn.h:26</see>
/// <br/>
/// <c>virtual bool IsFailed() const = 0</c>
/// </para>
/// </summary>
public bool IsFailed() => Jolt.PInvoke.StreamIn_IsFailed(this);
/// <summary>
/// <para>
/// Read a Vec3 (don't read W)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Core/StreamIn.h#L92">Jolt/Core/StreamIn.h:92</see>
/// <br/>
/// <c>void Read(Vec3 &amp;outVec)</c>
/// </para>
/// </summary>
public void Read(out float3 vec) => Jolt.PInvoke.StreamIn_Read(this, out vec);
/// <summary>
/// <para>
/// Read a DVec3 (don't read W)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Core/StreamIn.h#L99">Jolt/Core/StreamIn.h:99</see>
/// <br/>
/// <c>void Read(DVec3 &amp;outVec)</c>
/// </para>
/// </summary>
public void Read(out double3 vec) => Jolt.PInvoke.StreamIn_Read_2(this, out vec);
/// <summary>
/// <para>
/// Read a DMat44 (don't read W component of translation)
/// </para>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/e77f175595e64cb44218cc9d9d56fc365ad0e36a/Jolt/Core/StreamIn.h#L106">Jolt/Core/StreamIn.h:106</see>
/// <br/>
/// <c>void Read(DMat44 &amp;outVec)</c>
/// </para>
/// </summary>
public void Read(out double4x4 vec) => Jolt.PInvoke.StreamIn_Read_3(this, out vec);
}
}