brutal/brutal.jolt/Brutal.Jolt/Generated/Classes/StreamIn.gen.cs
2026-10-15 14:12:02 +13:00

83 lines
3.2 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
{
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Core/StreamIn.h#L12">Jolt/Core/StreamIn.h:12</see>
/// <br/>
/// <c>class StreamIn : public NonCopyable</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Simple binary input stream
/// </para>
/// </remarks>
[InteropHandle]
public readonly partial struct StreamIn
{
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/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>
/// <remarks>
/// <para>
/// Read a string of bytes from the binary stream
/// </para>
/// </remarks>
public unsafe void ReadBytes(Ptr data, ByteSize numBytes) => Jolt.PInvoke.StreamIn_ReadBytes(this, data, (nuint)numBytes);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Core/StreamIn.h#L23">Jolt/Core/StreamIn.h:23</see>
/// <br/>
/// <c>virtual bool IsEOF() const = 0</c>
/// </para>
/// </summary>
/// <remarks>
/// <code>
/// 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.
/// </code>
/// </remarks>
public bool IsEOF() => Jolt.PInvoke.StreamIn_IsEOF(this);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Core/StreamIn.h#L26">Jolt/Core/StreamIn.h:26</see>
/// <br/>
/// <c>virtual bool IsFailed() const = 0</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Returns true if there was an IO failure
/// </para>
/// </remarks>
public bool IsFailed() => Jolt.PInvoke.StreamIn_IsFailed(this);
/// <summary>
/// <para>
/// C++:
/// <see href="https://github.com/jrouwe/JoltPhysics/blob/23dadd0e603f1b321142d4c74df07fce85064989/Jolt/Core/StreamIn.h#L92">Jolt/Core/StreamIn.h:92</see>
/// <br/>
/// <c>void Read(Vec3 &amp;outVec)</c>
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// Read a Vec3 (don't read W)
/// </para>
/// </remarks>
public void Read(out float3 vec) => Jolt.PInvoke.StreamIn_Read(this, out vec);
}
}