Skip to content

DiGi.GLTF.WebAPI.Classes

github-actions[bot] edited this page Aug 21, 2026 · 2 revisions

DiGi.GLTF.WebAPI.Classes Namespace

Classes

GLTFSceneController Class

Controller responsible for composing generic DiGi.GLTF.Classes.GLTFScene instances and converting them into binary glTF (.glb) payloads.

The controller is domain agnostic: it accepts only generic DiGi.GLTF payloads (DiGi.GLTF.Classes.GLTFScene, DiGi.GLTF.Classes.GLTFNode) or raw DiGi geometry. Domain objects must be converted to DiGi.GLTF.Classes.GLTFNode instances by the consuming application before calling these endpoints.

public class GLTFSceneController : DiGi.WebAPI.Classes.WebAPIController

Inheritance System.Object → Microsoft.AspNetCore.Mvc.ControllerBase → DiGi.WebAPI.Classes.WebAPIController → GLTFSceneController

Methods

GLTFSceneController.FromObjectsAsync(JsonArray, string, CancellationToken) Method

Creates a DiGi.GLTF.Classes.GLTFScene from the provided serialized generic objects (DiGi.GLTF.Classes.GLTFNode instances or raw DiGi geometry) by translating all geometry to a local origin and storing the offset in DiGi.GLTF.Classes.GLTFScene.ReferencePoint.

public System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.IActionResult> FromObjectsAsync(System.Text.Json.Nodes.JsonArray? jsonArray, string? name=null, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

jsonArray System.Text.Json.Nodes.JsonArray

The JSON array with serialized DiGi.GLTF.Classes.GLTFNode instances or raw DiGi geometry objects.

name System.String

The optional display name of the scene.

cancellationToken System.Threading.CancellationToken

A cancellation token that can be used by the caller to cancel the asynchronous operation.

Returns

System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.IActionResult>
A System.Threading.Tasks.Task<> holding the DiGi.GLTF.Classes.GLTFScene JSON.

GLTFSceneController.GLBAsync(JsonObject, CancellationToken) Method

Converts the provided DiGi.GLTF.Classes.GLTFScene JSON into a binary glTF (.glb) file.

public System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.IActionResult> GLBAsync(System.Text.Json.Nodes.JsonObject? jsonObject, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object with the serialized DiGi.GLTF.Classes.GLTFScene.

cancellationToken System.Threading.CancellationToken

A cancellation token that can be used by the caller to cancel the asynchronous operation.

Returns

System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.IActionResult>
A System.Threading.Tasks.Task<> holding the .glb file.