IModelReader

Description

interface Tinman.Engine.Models.IModelReader

Base interface for classes that read 3D models.

Public / Methods

Read​Model


public method ReadModel → ()

returns → IModel

The read 3D model.

Reads the 3D model using the current options.

When the ReadModel method is called multiple times, the same IModel object will be returned, unless the model reader options have been modified.

After calling ReadModel, the IValidatable.Validate method may be called in order to receive additional errors and warnings that might have occurred while reading the model data.

IOException

If an I/O error has occurred.

ValidatingException

If the model reader has reported a critical error, for example an unsupported file format feature.

Read​Model​Debug


public method ReadModelDebug → (2)

fileName in : string

[not-empty]
The base file name to use for diagnostics output (see remarks).

directory in : Path

[not-null]
The output directory for diagnostic files.

Runs diagnostics on this model reader, in order to analyse and fix problems.

This method will generated diagnostic files in the given directory in, which will be named according to fileName in and a file suffix that is defined by the implementation. Each implementation must output the following standard files:

IOException

If an I/O error has occurred.

Public / Attributes

File​Format


[Constant]
public attribute FileFormat → (get)

value : ModelFormat

[not-null]
The model format.

The model format that has created this reader.

Options


[Constant]
public attribute Options → (get)

value : ModelReaderOptions

[not-null]
The model reader options to use.

The options of the model reader object.

A IModelReader implementation may choose freely which options to support and which to ignore. Please refer to the documentation of the ModelFormat that is returned by FileFormat for details on which options are supported.

Extensions

Write​CMH


[OwnerReturn] [OwnerThis]
public static method WriteCMH → (1)

filePath in : Path

[not-null]
Path to the output file.

returns → IOperation

The background operation.

Writes the whole model hierarchy to a self-contained CMH file.

See also

ModelFormat.CMH