Skip to content

IAssetModeler

Namespace Nfty.Core.Output in assembly Nfty.Core.

public interface IAssetModeler

Turns one finished asset into 3D model files. Lives in Core so SetWriter needn't know any model library; the CLI supplies the implementation.

Properties

Options

public abstract SetModels Options { get; }

The options the models are made with, recorded in set.json. Its SetModels.Skipped is ignored here; the writer fills it in.

Methods

FileNames(string)

public abstract IReadOnlyList<string> FileNames(string baseName);

Every file name IAssetModeler.Model() may return for an asset, derivable without building any model. The writer validates these for the whole Set before writing anything, then refuses a model file whose name was not declared here.

Parameters

  • baseName (string) - The asset's zero-padded number.

Returns. The bare file names.

Model(GeneratedAsset, string)

public abstract IReadOnlyList<SetFile>? Model(GeneratedAsset asset, string baseName);

Files for one asset, named from baseName ("0007" becomes "0007.glb"), or null when nothing in it is fully opaque. Called concurrently for different assets, so it must be a pure function of its input.

Parameters

  • asset (GeneratedAsset) - The finished asset.
  • baseName (string) - The asset's zero-padded number.

Returns. The files, or null when the asset cannot be modeled.