-
Notifications
You must be signed in to change notification settings - Fork 0
DiGi.GLTF.Interfaces
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.IObjectDerived
↳ GLTFNodeConverter<TSerializableObject>
Implements IGLTFObject, DiGi.Core.Interfaces.IObject
Determines whether this converter can convert the specified object.
bool CanConvert(DiGi.Core.Interfaces.ISerializableObject serializableObject);serializableObject DiGi.Core.Interfaces.ISerializableObject
The domain object to be checked.
System.Boolean
True if this converter handles the object; otherwise, false.
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);serializableObject DiGi.Core.Interfaces.ISerializableObject
The domain object to be converted.
tolerance System.Double
The distance tolerance used during triangulation.
System.Collections.Generic.List<GLTFNode>
A list of GLTFNode instances, or null if the object cannot be converted.
Marker interface for all objects belonging to the DiGi.GLTF project.
public interface IGLTFObject : DiGi.Core.Interfaces.IObjectDerived
↳ GLTFCamera
↳ GLTFLight
↳ GLTFModel
↳ GLTFNode
↳ GLTFNodeConverter<TSerializableObject>
↳ GLTFScene
↳ IGLTFNodeConverter
↳ IGLTFSerializableObject
Implements DiGi.Core.Interfaces.IObject
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.ICloneableObjectDerived
↳ 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