Skip to main content
Version: Next

Velaptor.Content.AtlasData

Velaptor

Velaptor.Content

AtlasData Class

Holds data relating to a texture atlas.

public sealed class AtlasData : Velaptor.Content.IAtlasData, Velaptor.Content.IContent

Inheritance System.Object → AtlasData

Implements IAtlasData, IContent

Properties

AtlasDataFilePath

Gets the file path to the atlas data.

public string AtlasDataFilePath { get; }

Implements AtlasDataFilePath

Property Value

System.String

FilePath

Gets the path to the texture.

public string FilePath { get; }

Implements FilePath

Property Value

System.String

Name

Gets the name of the atlas.

public string Name { get; }

Implements Name

Property Value

System.String

SubTextureNames

Gets a list of unique sub texture names.

public System.Collections.Generic.IReadOnlyCollection<string> SubTextureNames { get; }

Implements SubTextureNames

Property Value

System.Collections.Generic.IReadOnlyCollection<System.String>

Remarks

Will not return duplicate names of animating sub textures. Animating sub textures will have identical names.

Texture

Gets the texture of the atlas.

public Velaptor.Content.ITexture Texture { get; }

Implements Texture

Property Value

ITexture

this[int]

The iterator for the atlas sub texture data.

public Velaptor.Graphics.AtlasSubTextureData this[int index] { get; }

Parameters

index System.Int32

The index of the item to retrieve.

Implements [this[int](Velaptor.Content.IAtlasData.md#this[int] 'Velaptor.Content.IAtlasData.this[int]')

Property Value

AtlasSubTextureData

Methods

GetFrames(string)

Gets the all the frames that have the given sub texture id.

public Velaptor.Graphics.AtlasSubTextureData[] GetFrames(string subTextureId);

Parameters

subTextureId System.String

The sub texture ID of the frames to return.

Implements GetFrames(string)

Returns

AtlasSubTextureData[]
The list of frame rectangles.