Toast Engine
Loading...
Searching...
No Matches
assets::VoxelPalette Class Reference
Inheritance diagram for assets::VoxelPalette:
Collaboration diagram for assets::VoxelPalette:

Public Member Functions

 VoxelPalette (voxel::Palette palette, VoxelMaterialSlots slots, std::vector< uint8_t > defaulted)
void reload (const toml::table &table)
auto type () const -> std::string_view override
auto serialize (SaveMode mode) const -> std::vector< uint8_t > override
auto palette () const noexcept -> const voxel::Palette &
auto slots () const noexcept -> const VoxelMaterialSlots &
auto materialLibrary () const -> const voxel::MaterialLibrary &
auto defaultedEntries () const noexcept -> const std::vector< uint8_t > &
 Round tripped so the warning survives a save.
Public Member Functions inherited from assets::Asset
 Asset (const Asset &)=delete
auto operator= (const Asset &) -> Asset &=delete
auto refCount () const noexcept -> uint32_t

Static Public Member Functions

static auto fromToml (const toml::table &table) -> std::unique_ptr< VoxelPalette >
 Throws on values an entry cannot hold and leaves material existence to validatePalette.

Additional Inherited Members

Protected Member Functions inherited from assets::Asset
void addRef () noexcept
void release () noexcept

Member Function Documentation

◆ serialize()

auto assets::VoxelPalette::serialize ( SaveMode mode) const -> std::vector< uint8_t >
nodiscardoverridevirtual

Implements assets::ISaveable.

◆ type()

auto assets::VoxelPalette::type ( ) const -> std::string_view
inlinenodiscardoverridevirtual

Implements assets::Asset.


The documentation for this class was generated from the following files:
  • engine/src/toast/voxel/assets/voxel_palette.hpp
  • engine/src/toast/voxel/assets/voxel_palette.cpp