RecursiveAI.OnePhysics.Tools 1.0.0

Prefix Reserved
dotnet add package RecursiveAI.OnePhysics.Tools --version 1.0.0
                    
NuGet\Install-Package RecursiveAI.OnePhysics.Tools -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="RecursiveAI.OnePhysics.Tools" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="RecursiveAI.OnePhysics.Tools" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="RecursiveAI.OnePhysics.Tools" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add RecursiveAI.OnePhysics.Tools --version 1.0.0
                    
#r "nuget: RecursiveAI.OnePhysics.Tools, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package RecursiveAI.OnePhysics.Tools@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=RecursiveAI.OnePhysics.Tools&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=RecursiveAI.OnePhysics.Tools&version=1.0.0
                    
Install as a Cake Tool

RecursiveAI.OnePhysics.Tools

Authoring-time geometry for RecursiveAI.OnePhysics: turn meshes and sprites into shapes a physics world can use. Nothing here is needed at runtime. Deterministic: the same input gives the same bits on every platform and at every thread count.

using RecursiveAI.OnePhysics.Tools;

// Concave mesh -> compound of convex hulls.
var result = ConvexDecomposer.Decompose(vertices, indices, new ConvexDecompositionOptions { MaxHulls = 16 });
var body = world.AddCompound(result.ToCompoundParts(), at: new Vector3D(0, 5, 0));

// Clean a mesh, then get its mass properties.
var clean = MeshCleaner.Clean(vertices, indices);
var mass = MeshMass.Compute(clean.Vertices, clean.Indices);

// Closed mesh -> tetrahedra for a soft body; polygon with holes -> quality triangles for a 2D soft body.
var tets = Tetrahedralizer.Generate(clean.Vertices, clean.Indices, new TetrahedralizeOptions { TargetEdgeLength = 0.1f });
var jelly = world3D.AddSoftBody(tets.ToSoftBodyMesh(), at: new Vector3D(0, 3, 0));
var tris = TriangleMesher.Generate(outline, holes);

// Skeleton (and skinned points) -> ragdoll definition, with the bone mapping for the balance controller.
var figure = AutoRagdoller.Create(boneNames, parents, bindPositions, skin: new SkinnedPoints3D(points, boneIndices, boneWeights));
var ragdoll = world3D.AddRagdoll(figure.Definition);

// Polygon (with holes) and sprite -> convex pieces for polygon shapes.
var pieces = PolygonDecomposer.Decompose(outline, holes);
var sprite = SpriteOutliner.ToConvexPieces(alpha, width, height);

The tools: ConvexDecomposer, HullSimplifier, MeshCleaner, MeshMass, PolygonDecomposer, SpriteOutliner, Tetrahedralizer, TriangleMesher, AutoRagdoller. Bad input raises GeometryToolException with an error kind and a message that names the value. The specification is in docs/spec/tools.md.

Licence MIT OR Apache-2.0. Copyright (c) Recursive AI, LLC.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 139 11/11/2026

See CHANGELOG.md in the repository.