Search Results for

    Show / Hide Table of Contents

    Class SpriteAtlas

    Sprite atlas asset that contains collection of sprites combined into a single texture.

    Inheritance
    Object
    ScriptingObject
    ManagedScriptingObject
    Asset
    BinaryAsset
    TextureBase
    SpriteAtlas
    Inherited Members
    TextureBase::_customData
    Asset::_deleteFileOnUnload
    BinaryAsset::_dependantAssets
    ScriptingObject::_gcHandle
    BinaryAsset::_header
    ScriptingObject::_id
    BinaryAsset::_isSaving
    Asset::_isVirtual
    Asset::_loadingTask
    Asset::_loadState
    TextureBase::_parent
    Asset::_refCount
    BinaryAsset::_storageRef
    TextureBase::_texture
    ScriptingObject::_type
    BinaryAsset::AddDependency(BinaryAsset* asset)
    Asset::AddReference()
    Asset::Asset(const SpawnParams& params, const AssetInfo* info)
    TextureBase::CalculateChunkIndex(int32 mipIndex)
    ScriptingObject::CanCast(const ScriptingTypeHandle& from, const ScriptingTypeHandle& to)
    ScriptingObject::CanCast(const MClass* from, const MClass* to)
    TextureBase::CancelStreaming()
    ScriptingObject::Cast(ScriptingObject* obj)
    Asset::ChangeID(const Guid& newId)
    BinaryAsset::ClearDependencies()
    Asset::const
    BinaryAsset::createLoadingTask()
    Asset::CreateManaged()
    ScriptingObject::CreateManagedInternal()
    Asset::DECLARE_ENUM_7(LoadResult, Ok, Failed, MissingDataChunk, CannotLoadData, CannotLoadStorage, CannotLoadInitData, InvalidData)
    ScriptingObject::Deleted
    Asset::DeleteManaged()
    Object::DeleteObject(float timeToLive = 0.0f, bool useGameTime=false)
    Object::DeleteObjectNow()
    BinaryAsset::Dependencies
    Asset::DEPRECATED("Use GetReferences with assets and files parameter instead")
    Asset::DestroyManaged()
    SpriteAtlas
    Object::Flags
    TextureBase::Format()
    ScriptingObject::FromInterface(void* interfaceObj, const ScriptingTypeHandle& interfaceType)
    ScriptingObject::FromInterface(T* interfaceObj)
    TextureBase::GetArraySize()
    BinaryAsset::GetChunk(int32 index)
    BinaryAsset::GetChunkData(int32 index, BytesContainer& data)
    BinaryAsset::GetChunkSize(int32 index)
    ScriptingObject::GetClass()
    TextureBase::GetCurrentMemoryUsage()
    ScriptingObject::GetID()
    BinaryAsset::GetImportMetadata(String& path, String& username)
    BinaryAsset::GetImportPath()
    ScriptingObject::GetManagedInstance()
    TextureBase::GetMemoryUsage()
    TextureBase::GetMipData(int32 mipIndex, int32& rowPitch, int32& slicePitch)
    TextureBase::GetMipData(int32 mipIndex, BytesContainer& data)
    TextureBase::GetMipDataCustomPitch(int32 mipIndex, uint32& rowPitch, uint32& slicePitch)
    TextureBase::GetMipDataWithLoading(int32 mipIndex, BytesContainer& data)
    TextureBase::GetMipLevels()
    BinaryAsset::GetOrCreateChunk(int32 index)
    ScriptingObject::GetOrCreateManagedInstance()
    TextureBase::GetOwnerLocker()
    BinaryAsset::GetPath()
    TextureBase::GetPixels(Array<Color32>& pixels, int32 mipIndex = 0, int32 arrayIndex = 0)
    TextureBase::GetPixels(Array<Color>& pixels, int32 mipIndex = 0, int32 arrayIndex = 0)
    Asset::GetReferences(Array<Guid, HeapAllocation>& assets, Array<String, HeapAllocation>& files)
    Asset::GetReferences()
    Asset::GetReferencesCount()
    TextureBase::GetResidentMipLevels()
    BinaryAsset::GetSerializedVersion()
    TextureBase::GetTexture()
    TextureBase::GetTextureData(TextureData& result, bool copyData=true)
    TextureBase::GetTextureGroup()
    TextureBase::GetTextureMipData(TextureMipData& result, int32 mipIndex = 0, int32 arrayIndex = 0, bool copyData=true)
    TextureBase::GetTotalMemoryUsage()
    ScriptingObject::GetType()
    ScriptingObject::GetTypeHandle()
    Asset::GetTypeName()
    BinaryAsset::HasChunk(int32 index)
    BinaryAsset::HasChunkLoaded(int32 index)
    BinaryAsset::HasDependenciesModified()
    ScriptingObject::HasManagedInstance()
    TextureBase::HasStreamingError()
    TextureBase::Height()
    TextureBase::Init(InitData* initData)
    TextureBase::Init(InitData&& initData)
    BinaryAsset::Init(const FlaxStorageReference& storage, AssetHeader& header)
    BinaryAsset::Init(AssetInitData& initData)
    TextureBase::init(AssetInitData& initData)
    Asset::InitAsVirtual()
    BinaryAsset::InitVirtual(AssetInitData& initData)
    ScriptingObject::Is(const ScriptingTypeHandle& type)
    ScriptingObject::Is(const MClass* type)
    ScriptingObject::Is()
    Asset::IsInternalType()
    Asset::IsLoaded()
    ScriptingObject::IsRegistered()
    Asset::IsVirtual()
    Asset::LastLoadFailed()
    BinaryAsset::loadAsset()
    BinaryAsset::LoadChunk(int32 chunkIndex)
    BinaryAsset::LoadChunks(AssetChunksFlag chunks)
    SpriteAtlas
    TextureBase::LockData()
    Asset::Locker
    ManagedScriptingObject::ManagedScriptingObject(const SpawnParams& params)
    BinaryAsset::Metadata
    ScriptingObject::NewObject(const ScriptingTypeHandle& typeHandle)
    ScriptingObject::NewObject()
    Asset::OnCheckSave(const StringView& path=StringView::Empty)
    BinaryAsset::OnDeleteObject()
    BinaryAsset::OnDependencyModified(BinaryAsset* asset)
    Asset::onLoad(LoadAssetTask* task)
    Asset::onLoaded()
    Asset::OnLoaded
    Asset::onLoaded_MainThread()
    Asset::OnManagedInstanceDeleted()
    Asset::OnReloading
    BinaryAsset::onRename(const StringView& newPath)
    Asset::OnScriptingDispose()
    Asset::onUnload_MainThread()
    Asset::OnUnloaded
    ScriptingObject::RegisterObject()
    BinaryAsset::Reimport()
    BinaryAsset::ReleaseChunk(int32 index)
    BinaryAsset::ReleaseChunks()
    BinaryAsset::releaseStorage()
    Asset::Reload()
    Asset::RemoveReference()
    BinaryAsset::RequestChunkDataAsync(int32 index)
    TextureBase::RequestMipDataAsync(int32 mipIndex)
    Asset::Save(const StringView& path=StringView::Empty)
    BinaryAsset::SaveAsset(AssetInitData& data, bool silentMode=false)
    BinaryAsset::SaveAsset(const StringView& path, AssetInitData& data, bool silentMode=false)
    BinaryAsset::SaveToAsset(const StringView& path, AssetInitData& data, bool silentMode=false)
    ScriptingObject::ScriptingObject(const SpawnParams& params)
    BinaryAsset::SetChunk(int32 index, const Span<byte>& data)
    ManagedScriptingObject::SetManagedInstance(MObject* instance)
    TextureBase::SetPixels(const Span<Color32>& pixels, int32 mipIndex = 0, int32 arrayIndex = 0, bool generateMips=false)
    TextureBase::SetPixels(const Span<Color>& pixels, int32 mipIndex = 0, int32 arrayIndex = 0, bool generateMips=false)
    TextureBase::SetTextureGroup(int32 textureGroup)
    Asset::ShouldDeleteFileOnUnload()
    TextureBase::Size()
    SpriteAtlas
    Asset::startLoading()
    BinaryAsset::Storage
    TextureBase::StreamingTexture()
    ScriptingObject::ToInterface(ScriptingObject* obj, const ScriptingTypeHandle& interfaceType)
    ScriptingObject::ToInterface(ScriptingObject* obj)
    ScriptingObject::ToManaged(const ScriptingObject* obj)
    ScriptingObject::ToNative(MObject* obj)
    Asset::ToString()
    ScriptingObject::UnregisterObject()
    Asset::WaitForLoaded(double timeoutInMilliseconds=30000.0)
    TextureBase::Width()
    BinaryAsset::~BinaryAsset()
    Object::~Object()
    ScriptingObject::~ScriptingObject()
    Assembly: FlaxEngine.dll
    File: Engine/Render2D/SpriteAtlas.h
    Syntax
    public class SpriteAtlas : public TextureBase

    Fields

    Sprites

    List with all tiles in the sprite atlas.

    Declaration
    public Array<Sprite> Sprites
    Field Value
    Array<Sprite>

    Methods

    AddSprite(const Sprite& sprite)

    Adds the sprite.

    Declaration
    public SpriteHandle AddSprite(const Sprite& sprite)
    Parameters
    Sprite sprite

    The sprite.

    Returns
    SpriteHandle

    The sprite handle.

    FindSprite(const StringView& name)

    Finds the sprite by the name.

    Declaration
    public SpriteHandle FindSprite(const StringView& name) const
    Parameters
    StringView name

    The name.

    Returns
    SpriteHandle

    The sprite handle.

    getChunksToPreload()

    Gets packed chunks indices to preload before asset loading action

    Declaration
    protected virtual AssetChunksFlag getChunksToPreload() const override
    Returns
    AssetChunksFlag

    Chunks to load flags

    Overrides
    BinaryAsset::getChunksToPreload()

    GetSprite(int32 index)

    Gets the sprite data.

    Declaration
    public Sprite GetSprite(int32 index) const
    Parameters
    int32 index

    The index.

    Returns
    Sprite

    The sprite data.

    GetSpriteArea(int32 index, Rectangle& result)

    Gets the sprite area.

    Declaration
    public void GetSpriteArea(int32 index, Rectangle& result) const
    Parameters
    int32 index

    The index.

    Rectangle result

    The output sprite area.

    GetSpritesCount()

    Gets the sprites count.

    Declaration
    public int32 GetSpritesCount() const
    Returns
    int32

    load()

    Load data from the chunks

    Declaration
    protected virtual LoadResult load() override
    Returns
    LoadResult

    Loading result

    Overrides
    TextureBase::load()

    LoadSprites(ReadStream& stream)

    Declaration
    protected bool LoadSprites(ReadStream& stream)
    Parameters
    ReadStream stream

    Returns
    bool

    RemoveSprite(int32 index)

    Removes the sprite.

    Declaration
    public void RemoveSprite(int32 index)
    Parameters
    int32 index

    The sprite index.

    SaveSprites()

    Save the sprites (texture content won't be modified).

    Declaration
    public bool SaveSprites()
    Returns
    bool

    True if cannot save, otherwise false.

    SetSprite(int32 index, const Sprite& value)

    Sets the sprite data.

    Declaration
    public void SetSprite(int32 index, const Sprite& value)
    Parameters
    int32 index

    The index.

    Sprite value

    The sprite data.

    unload(bool isReloading)

    Unloads asset data

    Declaration
    protected virtual void unload(bool isReloading) override
    Parameters
    bool isReloading

    True if asset is reloading data, otherwise false.

    Overrides
    TextureBase::unload(bool isReloading)

    See Also

    TextureBase
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat