Table of Contents

Class Material

Namespace
RichHudFramework.UI.Rendering
Assembly
RichHudClient.dll

Represents a handle to a Space Engineers Transparent Material. Supports defining full textures or specific sprites (texture regions) within a texture atlas.

public class Material
Inheritance
Material

Constructors

Material(string, Vector2)

Creates a Material using the SubtypeId of a Transparent Material. Assumes the material utilizes the full texture dimensions.

public Material(string SubtypeId, Vector2 size)

Parameters

SubtypeId string

The string name of the texture SubtypeId.

size Vector2

The resolution of the texture in pixels.

Material(string, Vector2, Vector2, Vector2)

Creates a Material representing a specific region (sprite) within a larger texture atlas.

public Material(string SubtypeId, Vector2 texSize, Vector2 texCoords, Vector2 size)

Parameters

SubtypeId string

The string name of the texture SubtypeId.

texSize Vector2

The total resolution of the source texture atlas in pixels.

texCoords Vector2

The pixel offset of the sprite starting from the top-left corner.

size Vector2

The size of the specific sprite region in pixels.

Material(MyStringId, Vector2)

Creates a Material using the hashed SubtypeId of a Transparent Material. Assumes the material utilizes the full texture dimensions.

public Material(MyStringId TextureID, Vector2 size)

Parameters

TextureID MyStringId

The hashed MyStringId of the texture.

size Vector2

The resolution of the texture in pixels.

Material(MyStringId, Vector2, Vector2, Vector2)

Creates a Material representing a specific region (sprite) within a larger texture atlas using a hashed SubtypeId.

public Material(MyStringId SubtypeId, Vector2 texSize, Vector2 offset, Vector2 size)

Parameters

SubtypeId MyStringId

The hashed MyStringId of the texture.

texSize Vector2

The total resolution of the source texture atlas in pixels.

offset Vector2

The pixel offset of the sprite starting from the top-left corner.

size Vector2

The size of the specific sprite region in pixels.

Fields

AnnulusMat

High-resolution ring/donut texture (1024x1024).

public static readonly Material AnnulusMat

Field Value

Material

CircleMat

High-resolution circle texture (1024x1024).

public static readonly Material CircleMat

Field Value

Material

Default

A plain white 4x4 texture used for solid color UI elements.

public static readonly Material Default

Field Value

Material

Size

The dimensions of the material sprite in pixels.

public readonly Vector2 Size

Field Value

Vector2

TextureID

The unique SubtypeId of the underlying Transparent Material.

public readonly MyStringId TextureID

Field Value

MyStringId

UVBounds

The normalized UV coordinates defining the region of the texture to be used. (0,0 is top-left, 1,1 is bottom-right relative to the atlas).

public readonly BoundingBox2 UVBounds

Field Value

BoundingBox2