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
SubtypeIdstringThe string name of the texture SubtypeId.
sizeVector2The 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
SubtypeIdstringThe string name of the texture SubtypeId.
texSizeVector2The total resolution of the source texture atlas in pixels.
texCoordsVector2The pixel offset of the sprite starting from the top-left corner.
sizeVector2The 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
TextureIDMyStringIdThe hashed MyStringId of the texture.
sizeVector2The 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
SubtypeIdMyStringIdThe hashed MyStringId of the texture.
texSizeVector2The total resolution of the source texture atlas in pixels.
offsetVector2The pixel offset of the sprite starting from the top-left corner.
sizeVector2The size of the specific sprite region in pixels.
Fields
AnnulusMat
High-resolution ring/donut texture (1024x1024).
public static readonly Material AnnulusMat
Field Value
CircleMat
High-resolution circle texture (1024x1024).
public static readonly Material CircleMat
Field Value
Default
A plain white 4x4 texture used for solid color UI elements.
public static readonly Material Default
Field Value
Size
The dimensions of the material sprite in pixels.
public readonly Vector2 Size
Field Value
TextureID
The unique SubtypeId of the underlying Transparent Material.
public readonly MyStringId TextureID
Field Value
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