Repository navigation
DiGi.GLTF.WebAPI.Classes
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.WebAPIControllerInheritance System.Object → Microsoft.AspNetCore.Mvc.ControllerBase → DiGi.WebAPI.Classes.WebAPIController → GLTFSceneController
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));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.
System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.IActionResult>
A System.Threading.Tasks.Task<> holding the DiGi.GLTF.Classes.GLTFScene JSON.
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));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.
System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.IActionResult>
A System.Threading.Tasks.Task<> holding the .glb file.