Packs multiple small textures in a single, bigger one. Helps to optimize video memory costs and render calls.
    public class AtlasTexture : Texture

Texture resource aimed at managing big textures files that pack multiple smaller textures. Consists of a Texture, a margin that defines the border width,

and a region that defines the actual area of the AtlasTexture.

Inheritance Chain

Constructors

    public AtlasTexture()

Properties

    public Texture Atlas { get; set; }

The texture that contains the atlas. Can be any Texture subtype.

    public bool FilterClip { get; set; }

If true, clips the area outside of the region to avoid bleeding of the surrounding texture pixels.

    public Rect2 Margin { get; set; }

The margin around the region. The Rect2’s ‘size’ parameter (‘w’ and ‘h’ in the editor) resizes the texture so it fits within the margin.

    public Rect2 Region { get; set; }

The AtlasTexture’s used region.

Methods

    public Texture GetAtlas()

Getter for Atlas

    public Rect2 GetMargin()

Getter for Margin

    public Rect2 GetRegion()

Getter for Region

    public bool HasFilterClip()

Getter for FilterClip

    public void SetAtlas(Texture atlas)

Setter for Atlas

    public void SetFilterClip(bool enable)

Setter for FilterClip

    public void SetMargin(Rect2 margin)

Setter for Margin

    public void SetRegion(Rect2 region)

Setter for Region

Tags: