public sealed class Asset
A 3d mesh asset.

Constructors

Asset

#
public Asset(AssetPart[] firstParts, params AssetPart[] secondParts)
Create a new asset from a list of parts.
firstParts (AssetPart[])
secondParts (params AssetPart[])

Asset

#
public Asset(BinaryReader reader)
Deserialise an asset from a reader.
reader (BinaryReader)

Asset

#
public Asset(params AssetPart[] parts)
Create a new asset from a list of parts.
parts (params AssetPart[])

Properties

BoundingBox

#
public BoundingBox BoundingBox { get; }
Gets the cached boundingbox of this asset.

BoundingCircle

#
public Circle BoundingCircle { get; }
Gets the cached bounding circle of this asset.

Partials

#
public IEnumerable<AssetPart> Partials { get; }
Enumerateover all parts in this asset.

Methods

ToMesh

#
public Mesh ToMesh(AssetSeason season, AssetPalette palette, AssetColouring style)
Create a mesh instance. This always creates a new instance, so you may modify it as you see fit.
season (AssetSeason)Season for mesh.
palette (AssetPalette)Palette to apply.
style (AssetColouring)Colour style for mesh.
A single mesh containing all the parts.

Write

#
public void Write(BinaryWriter writer)
Write this asset to a stream.
writer (BinaryWriter)