GS.Gltf.Collisions 1.0.0

dotnet add package GS.Gltf.Collisions --version 1.0.0
NuGet\Install-Package GS.Gltf.Collisions -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="GS.Gltf.Collisions" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add GS.Gltf.Collisions --version 1.0.0
#r "nuget: GS.Gltf.Collisions, 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.
// Install GS.Gltf.Collisions as a Cake Addin
#addin nuget:?package=GS.Gltf.Collisions&version=1.0.0

// Install GS.Gltf.Collisions as a Cake Tool
#tool nuget:?package=GS.Gltf.Collisions&version=1.0.0

GS.Gltf.Collisions

.NET Core 3.1 library to find intersecting meshes in 3D glTF files.

Not the fastest yet, but stable and 100% pure C#, ready to be built and utilized in any .NET codebase.

image

Quick Start

Add using GS.Gltf.Collisions;

Create settings according to which collisions will be detected, supplying paths to one or many glTF files:

var inputFiles = new List<string> { "Just.gltf", "An.glb", "Example.glb" };
var settings = new CollisionSettings(inputFiles);

Create detector object and run detection method

var detector = new CollisionDetector(settings);
var result = detector.Detect();

Help

Result of collision detection is the list of CollisionResult objects, each containing pair of intersecting elements and BoundingBoxs.

Each of both elements is represented by KeyValuePair where key is model index, value is glTF node index. All bounding boxes are axis aligned. There are minimum one - around points of intersection, and maximum - around intersecting elements.

CollisionSettings.OutputMode enumeration has 3 options:

  • InMemory - just calculates intersection result without writing any files to disk
  • SeparateFile - creates glTF file containing red axis aligned bounding boxes for each intersected pair of elements
  • MergeAll - creates one glTF file with all input models merged and adds red bounding boxes nodes in it

Resources

https://github.com/jslee02/awesome-collision-detection#other-awesome-lists

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.1 is compatible. 
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 197 6/5/2022