Skip to content

DiGi.GLTF.WebAPI.Classes

github-actions[bot] edited this page Jul 15, 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.FromObjects(JsonArray, string) 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 Microsoft.AspNetCore.Mvc.IActionResult FromObjects(System.Text.Json.Nodes.JsonArray? jsonArray, string? name=null);

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.

Returns

Microsoft.AspNetCore.Mvc.IActionResult
An Microsoft.AspNetCore.Mvc.IActionResult holding the DiGi.GLTF.Classes.GLTFScene JSON.

GLTFSceneController.GLB(JsonObject) Method

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

public Microsoft.AspNetCore.Mvc.IActionResult GLB(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

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

Returns

Microsoft.AspNetCore.Mvc.IActionResult
An Microsoft.AspNetCore.Mvc.IActionResult holding the .glb file.

Clone this wiki locally