Box3D SoA world is public; drop Lodur friend grants; MinGW emits ymir_box3d.dll
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
7ba31c30fc
commit
eb30cac65b
4 changed files with 8 additions and 9 deletions
|
|
@ -30,7 +30,7 @@ separate native object (`ymir_box3d_soa.c`, ABI 1) so the Aetheria session's con
|
|||
w >= 0) and `joint_angular_velocity` (B minus A, in frame A). A consumer can compute a joint torque from
|
||||
these and write it as equal and opposite torques on the two body lanes.
|
||||
- State lanes change only inside `step`. Between steps a caller may read any state lane in place.
|
||||
- Managed (`src/Ymir.Box3D/Box3DSoaWorld.cs`, internal): `Box3DSoaView` exposes each lane as a span over
|
||||
- Managed (`src/Ymir.Box3D/Box3DSoaWorld.cs`, public: `Box3DSoaWorld`, `Box3DSoaView`, `Box3DSoaKind`, `Box3DSoaJointKind`; the native structs and the view constructor stay internal): `Box3DSoaView` exposes each lane as a span over
|
||||
native memory (`ReadOnlySpan` for state, `Span` for write lanes). Spans are invalid after `Dispose`.
|
||||
`Count` and `JointCount` are as of when the view was taken, so take it after the last add.
|
||||
- Determinism: one Box3D worker, bodies stepped in insertion order, same inputs give identical lane
|
||||
|
|
@ -52,5 +52,5 @@ a torque-driven jointed body.
|
|||
|
||||
Contact facts for the SoA world (Begin/Hit/End), body removal with a stable ordering rule, compound bodies
|
||||
and per-shape material, joint motors and springs (Lodur drives joints from torque lanes instead), and a
|
||||
public typed surface in `Ymir.Core` (the wrapper is internal, visible to the test assembly). Windows build
|
||||
a typed surface in `Ymir.Core` (the SoA world is public in `Ymir.Box3D`). Windows build
|
||||
and Unity consumption are unrun; cross-platform bit-identity is unclaimed.
|
||||
|
|
|
|||
|
|
@ -23,4 +23,5 @@ set_target_properties(ymir_box3d PROPERTIES
|
|||
C_VISIBILITY_PRESET hidden
|
||||
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin"
|
||||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin"
|
||||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
|
||||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
|
||||
PREFIX "")
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ using System.Runtime.InteropServices;
|
|||
|
||||
namespace Ymir.Box3D;
|
||||
|
||||
internal enum Box3DSoaKind : uint
|
||||
public enum Box3DSoaKind : uint
|
||||
{
|
||||
Sphere = 0,
|
||||
StaticBox = 1,
|
||||
|
|
@ -10,7 +10,7 @@ internal enum Box3DSoaKind : uint
|
|||
Box = 3
|
||||
}
|
||||
|
||||
internal enum Box3DSoaJointKind : uint
|
||||
public enum Box3DSoaJointKind : uint
|
||||
{
|
||||
Revolute = 0,
|
||||
Spherical = 1,
|
||||
|
|
@ -148,7 +148,7 @@ internal static unsafe partial class Box3DSoaNative
|
|||
/// world's life, the contents change only inside <see cref="Box3DSoaWorld.Step"/>, and every span is
|
||||
/// invalid once the world is disposed.
|
||||
/// </summary>
|
||||
internal readonly unsafe struct Box3DSoaView
|
||||
public readonly unsafe struct Box3DSoaView
|
||||
{
|
||||
private readonly Box3DSoaViewNative _v;
|
||||
|
||||
|
|
@ -220,7 +220,7 @@ internal readonly unsafe struct Box3DSoaView
|
|||
/// A headless 3D Box3D world: N bodies stepped deterministically (one worker, fixed order) with a
|
||||
/// structure-of-arrays state view read in place. Ymir writes no solver; Box3D decides everything.
|
||||
/// </summary>
|
||||
internal sealed class Box3DSoaWorld : IDisposable
|
||||
public sealed class Box3DSoaWorld : IDisposable
|
||||
{
|
||||
private const uint ExpectedAbi = 2;
|
||||
private nint _handle;
|
||||
|
|
|
|||
|
|
@ -2,5 +2,3 @@ using System.Runtime.CompilerServices;
|
|||
|
||||
[assembly: InternalsVisibleTo("Ymir.Core")]
|
||||
[assembly: InternalsVisibleTo("Ymir.Box3D.Soa.Tests")]
|
||||
[assembly: InternalsVisibleTo("Lodur.Body.Ymir")]
|
||||
[assembly: InternalsVisibleTo("Lodur.Tests")]
|
||||
|
|
|
|||
Loading…
Reference in a new issue