Skip to content

DiGi.GLTF.Interfaces

github-actions[bot] edited this page Jul 15, 2026 · 2 revisions

DiGi.GLTF.Interfaces Namespace

Interfaces

IGLTFNodeConverter Interface

Defines a pluggable converter turning a domain DiGi.Core.Interfaces.ISerializableObject into generic GLTFNode instances.

Converters are registered with Register(IGLTFNodeConverter) (or via assembly scanning) and are consulted by ToGLTF_GLTFNodes(this ISerializableObject, double). This keeps the engine open for extension and closed for modification: supporting a new domain type only requires a new converter class in the consuming project.

public interface IGLTFNodeConverter : DiGi.GLTF.Interfaces.IGLTFObject, DiGi.Core.Interfaces.IObject

Derived
GLTFNodeConverter<TSerializableObject>

Implements IGLTFObject, DiGi.Core.Interfaces.IObject

Methods

IGLTFNodeConverter.CanConvert(ISerializableObject) Method

Determines whether this converter can convert the specified object.

bool CanConvert(DiGi.Core.Interfaces.ISerializableObject serializableObject);

Parameters

serializableObject DiGi.Core.Interfaces.ISerializableObject

The domain object to be checked.

Returns

System.Boolean
True if this converter handles the object; otherwise, false.

IGLTFNodeConverter.Convert(ISerializableObject, double) Method

Converts the specified object into GLTFNode instances holding geometry in world coordinates.

System.Collections.Generic.List<DiGi.GLTF.Classes.GLTFNode>? Convert(DiGi.Core.Interfaces.ISerializableObject serializableObject, double tolerance);

Parameters

serializableObject DiGi.Core.Interfaces.ISerializableObject

The domain object to be converted.

tolerance System.Double

The distance tolerance used during triangulation.

Returns

System.Collections.Generic.List<GLTFNode>
A list of GLTFNode instances, or null if the object cannot be converted.

IGLTFObject Interface

Marker interface for all objects belonging to the DiGi.GLTF project.

public interface IGLTFObject : DiGi.Core.Interfaces.IObject

Derived
GLTFCamera
GLTFLight
GLTFModel
GLTFNode
GLTFNodeConverter<TSerializableObject>
GLTFScene
IGLTFNodeConverter
IGLTFSerializableObject

Implements DiGi.Core.Interfaces.IObject

IGLTFSerializableObject Interface

Marker interface for all serializable objects belonging to the DiGi.GLTF project.

public interface IGLTFSerializableObject : DiGi.GLTF.Interfaces.IGLTFObject, DiGi.Core.Interfaces.IObject, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject

Derived
GLTFCamera
GLTFLight
GLTFModel
GLTFNode
GLTFScene

Implements IGLTFObject, DiGi.Core.Interfaces.IObject, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject

Clone this wiki locally