AtlasDefinition.MaterialReferences
A private class in Root.Township, Alta.Utilities.Atlas. Reach it through att-stubs' publicized assemblies or Harmony's AccessTools.
Private helper in AtlasDefinition: works out how much atlas space a material needs from its main texture for its shader, scaled by its Scale setting.
Constructors
Properties
| Member | What it is |
|---|
int Height { get; private set; } | Texture height in pixels, after scaling. |
AtlasDefinition.AtlasedMaterial MaterialRect { get; } | The atlased material entry being measured. |
int Size { get; } | Area in pixels (height times width). |
int Width { get; private set; } | Texture width in pixels, after scaling. |
Methods
| Member | What it is |
|---|
void ForceSquare(int size) | Overrides the size with a square of the given side. |
2 private and internal methods
| Member | What it is |
|---|
private void ApplyScale() | Scales the size by the material's scale setting (four, two, half or quarter). |
private void GetTexture(string textureProperty) | Takes width and height from the named texture property, if the material has that texture. |