ModelInfo

Description

sealed class Tinman.Engine.Models.ModelInfo

Derived from

Disposable abstract

This is a helper that generates human-readable pseudo-code that describes a IModel hierarchy.

Public / Constructors

Model​Info


public constructor ModelInfo → (3)

stream in : ITextStream own

[not-null]
The text output stream to use.

toConfig opt : bool = true

Include result of IConfigurable.ToConfig, where applicable?

toString opt : bool = true

Include result of object.ToString, where applicable?

Creates a new instance of ModelInfo.

Public / Methods

Consume


public method Consume → (1)

model in : IModel

[not-null]
The model to consume.

Consumes the given model.

IOException

If an I/O error has occurred.

For


public static method For → (3)

model in : IModel

[not-null]
The model for which to generate pseudo-code.

toConfig opt : bool = true

Include result of IConfigurable.ToConfig, where applicable?

toString opt : bool = true

Include result of object.ToString, where applicable?

returns → string

The human-readable pseudo-code.

Generates pseudo-code for the given model in.

The generated code is human-readable and describes the all aspects of a model hierarchy, excluding the following data:

The model info code is supposed to be used during development, for quick inspection and verification.

Geometries


public method Geometries → ()

returns → IModelGeometry [ ]

The referenced IModelGeometry objects.

Returns the referenced IModelGeometry objects.

Materials


public method Materials → ()

returns → IMaterial [ ]

The referenced IMaterial objects.

Returns the referenced IMaterial objects.

Models


public method Models → ()

returns → IModel [ ]

The referenced IModel objects.

Returns the referenced IModel objects.

Name​Of

5 overloads


[Pure]
public method NameOf1 → (1)

material in : IMaterial

The model material object.

returns → string

The name or null if material in is not referenced by the model.

Returns the name of the given IMaterial object, as it appears in the textual dump.


[Pure]
public method NameOf2 → (1)

model in : IModel

The model object.

returns → string

The name or null if model in is not referenced by the model.

Returns the name of the given IModel object, as it appears in the textual dump.

See also

ModelInfo.Models


[Pure]
public method NameOf3 → (1)

geometry in : IModelGeometry

The model geometry object.

returns → string

The name or null if geometry in is not referenced by the model.

Returns the name of the given IModelGeometry object, as it appears in the textual dump.


[Pure]
public method NameOf4 → (1)

part in : IModelPart

The model part object.

returns → string

The name or null if part in is not referenced by the model.

Returns the name of the given IModelPart object, as it appears in the textual dump.

See also

ModelInfo.Parts


[Pure]
public method NameOf5 → (1)

texture in : IModelTexture

The model texture object.

returns → string

The name or null if texture in is not referenced by the model.

Returns the name of the given IModelTexture object, as it appears in the textual dump.

Parts


public method Parts → ()

returns → IModelPart [ ]

The referenced IModelPart objects.

Returns the referenced IModelPart objects.

Textures


public method Textures → ()

returns → IModelTexture [ ]

The referenced IModelTexture objects.

Returns the referenced IModelTexture objects.