mitiru::asset

Namespace catalog extracted from docs/API_CATALOG.md (41 types, 227 items).

Namespace catalog extracted from docs/API_CATALOG.md (41 types, 227 items).

NameKindItems
AssetCategoryenum5
AssetReloadEventstruct2
AssetHotReloaderclass20
AssetManifeststruct3
AssetPipelineclass1
AssetTypeenum9
AssetMetadatastruct2
AssetRegistryclass10
FbxScenestruct3
FbxLoaderclass3
FileEventTypeenum4
FileEventstruct1
FileWatcherclass13
GameAssetCharactersclass3
GameAssetEffectsclass2
GameAssetEnvironmentclass7
GameAssetTemplatesclass14
GameAssetUIclass2
GameAssetUtilclass2
ReloadLogEntrystruct2
HotReloaderclass14
CacheMeshstruct2
MeshCacheclass7
OptimizedMeshstruct2
MeshLODstruct1
MeshOptimizerclass5
ShaderHandlestruct3
ShaderCompileResultstruct2
ShaderCacheclass12
SvgBuilderclass13
SvgShapeenum7
SvgStylestruct1
SvgElementstruct6
SvgDocumentstruct2
SvgGeneratorclass1
CompressionFormatenum6
CompressedTexturestruct5
MitexHeaderstruct5
TextureCompressorclass5
UiThemeConfigstruct10
UiThemeGeneratorclass10
enum AssetCategory : std::uint8_t 5
Shader
UiTemplate
Scenario
Custom
using AssetChangedCallback = std::function<void(const std::string& path, const std::string& newContent)>;
struct AssetReloadEvent 2
std::string path
std::string message
class AssetHotReloader 20
AssetHotReloader() = default
AssetHotReloader(const AssetHotReloader&) = delete
AssetHotReloader& operator=(const AssetHotReloader&) = delete
void watchShader(const std::string& filepath, AssetChangedCallback onChanged)
void watchUiTemplate(const std::string& filepath, AssetChangedCallback onChanged)
void watchScenario(const std::string& filepath, AssetChangedCallback onChanged)
void watchCustom(const std::string& filepath, AssetChangedCallback onChanged)
void watchDirectory(const std::string& directory, AssetCategory category, AssetChangedCallback onChanged)
void unwatch(const std::string& filepath)
void unwatchAll()
void update()
bool forceReload(const std::string& filepath)
[[nodiscard]] std::size_t assetCount() const noexcept
[[nodiscard]] std::size_t assetCount(AssetCategory category) const noexcept
[[nodiscard]] std::vector<AssetReloadEvent> reloadLog() const
void clearLog()
[[nodiscard]] uint64_t successCount() const noexcept
[[nodiscard]] uint64_t failureCount() const noexcept
[[nodiscard]] FileWatcher& watcher() noexcept
[[nodiscard]] const FileWatcher& watcher() const noexcept
struct AssetManifest 3
std::string name
std::string templateType
std::map<std::string, std::string> params
class AssetPipeline 1
[[nodiscard]] std::vector<AssetManifest> loadManifest(const std::string& json) const
enum AssetType 9
Texture
Mesh
Shader
Sound
Script
Scene
Material
[[nodiscard]] inline std::string assetTypeToString(AssetType type)
[[nodiscard]] inline std::optional<AssetType> stringToAssetType(const std::string& str)
struct AssetMetadata 2
std::string id
std::string path
class AssetRegistry 10
bool registerAsset(AssetMetadata metadata)
[[nodiscard]] const AssetMetadata* getMetadata(const std::string& id) const noexcept
[[nodiscard]] AssetMetadata* getMetadata(const std::string& id) noexcept
[[nodiscard]] std::vector<const AssetMetadata*> findByType(AssetType type) const
[[nodiscard]] const AssetMetadata* findByPath(const std::string& path) const noexcept
size_t loadManifest(const std::string& manifestContent)
[[nodiscard]] std::string saveManifest() const
[[nodiscard]] size_t count() const noexcept
bool unregister(const std::string& id)
void clear()
struct FbxScene 3
std::vector<FbxMesh> meshes
std::vector<FbxMaterial> materials
std::vector<FbxBone> bones
class FbxLoader 3
[[nodiscard]] static constexpr bool isAvailable()
[[nodiscard]] static std::optional<FbxScene> load( [[maybe_unused]] const std::string& filepath)
[[nodiscard]] static render::Mesh toEngineMesh(const FbxScene::FbxMesh& fbxMesh)
enum FileEventType 4
Created
Modified
Deleted
using FileWatchCallback = std::function<void(const FileEvent&)>;
struct FileEvent 1
std::string path
class FileWatcher 13
FileWatcher()
~FileWatcher()
FileWatcher(const FileWatcher&) = delete
FileWatcher& operator=(const FileWatcher&) = delete
FileWatcher(FileWatcher&& other) noexcept
FileWatcher& operator=(FileWatcher&& other) noexcept
void watch(const std::string& path, FileWatchCallback callback)
void unwatch(const std::string& path)
std::vector<FileEvent> poll()
[[nodiscard]] std::size_t watchCount() const noexcept
[[nodiscard]] std::vector<std::string> watchedPaths() const
void unwatchAll()
[[nodiscard]] std::size_t trackedFileCount() const noexcept
class GameAssetCharacters 3
[[nodiscard]] static SvgDocument player(float radius = 20.0f, const std::string& neonColor = "#00ffff")
[[nodiscard]] static SvgDocument npc(float size = 40.0f, const std::string& bodyColor = "#8888ff")
[[nodiscard]] static SvgDocument enemy(float size = 32.0f, const std::string& color = "#ff4444")
class GameAssetEffects 2
[[nodiscard]] static SvgDocument spikeHazard(float w = 100.0f, float h = 20.0f, int count = 5)
[[nodiscard]] static SvgDocument laserBarrier(float length = 150.0f, const std::string& color = "#ff00ff")
class GameAssetEnvironment 7
[[nodiscard]] static SvgDocument platform(float w = 120.0f, float h = 20.0f, const std::string& color = "#00ff88")
[[nodiscard]] static SvgDocument movingPlatform(float w = 120.0f, float h = 20.0f, const std::string& color = "#00ff88", const std::string& arrowDir = "right")
[[nodiscard]] static SvgDocument crumblingPlatform(float w = 120.0f, float h = 20.0f, const std::string& color = "#ff8800")
[[nodiscard]] static SvgDocument springPlatform(float w = 80.0f, float h = 20.0f)
[[nodiscard]] static SvgDocument checkpoint(float size = 40.0f)
[[nodiscard]] static SvgDocument gate(float w = 20.0f, float h = 80.0f, bool locked = true)
[[nodiscard]] static SvgDocument goal(float size = 48.0f)
class GameAssetTemplates : public GameAssetCharacters 14
using GameAssetCharacters::player
using GameAssetCharacters::npc
using GameAssetCharacters::enemy
using GameAssetEnvironment::platform
using GameAssetEnvironment::movingPlatform
using GameAssetEnvironment::crumblingPlatform
using GameAssetEnvironment::springPlatform
using GameAssetEnvironment::checkpoint
using GameAssetEnvironment::gate
using GameAssetEnvironment::goal
using GameAssetUI::collectible
using GameAssetUI::formulaButton
using GameAssetEffects::spikeHazard
using GameAssetEffects::laserBarrier
class GameAssetUI 2
[[nodiscard]] static SvgDocument collectible(float size = 24.0f, const std::string& color = "#00ffff")
[[nodiscard]] static SvgDocument formulaButton(const std::string& label = "f(x)", float size = 48.0f, const std::string& color = "#00ffff")
class GameAssetUtil 2
[[nodiscard]] static std::string darkenColor(const std::string& hexColor)
using ReloadCallback = std::function<void(const ShaderHandle&)>;
struct ReloadLogEntry 2
std::string path
std::string message
class HotReloader 14
explicit HotReloader(ShaderCache& cache)
void registerShader(const std::string& filepath, gfx::ShaderType type, ReloadCallback callback = nullptr)
void unregisterShader(const std::string& filepath)
void update()
[[nodiscard]] std::size_t shaderCount() const noexcept
[[nodiscard]] std::vector<ReloadLogEntry> reloadLog() const
void clearLog()
[[nodiscard]] uint64_t successCount() const noexcept
[[nodiscard]] uint64_t failureCount() const noexcept
[[nodiscard]] std::optional<ShaderHandle> currentHandle(const std::string& filepath) const
ShaderCompileResult forceReload(const std::string& filepath)
[[nodiscard]] FileWatcher& watcher() noexcept
[[nodiscard]] const FileWatcher& watcher() const noexcept
[[nodiscard]] inline std::optional<CacheMesh> parseSimpleObj(const std::string& objData)
struct CacheMesh 2
std::vector<CacheVertex> vertices
std::vector<uint32_t> indices
class MeshCache 7
bool load(const std::string& id, const std::string& objData)
bool loadGltf(const std::string& id, const void* data, std::size_t size)
[[nodiscard]] const CacheMesh* get(const std::string& id) const noexcept
[[nodiscard]] bool has(const std::string& id) const noexcept
bool unload(const std::string& id)
void clear()
[[nodiscard]] MeshCacheStats stats() const noexcept
struct OptimizedMesh 2
std::vector<render::Vertex3D> vertices
std::vector<uint32_t> indices
struct MeshLOD 1
std::vector<OptimizedMesh> levels
class MeshOptimizer 5
[[nodiscard]] static OptimizedMesh optimizeVertexCache( const std::vector<render::Vertex3D>& verts, const std::vector<uint32_t>& indices)
[[nodiscard]] static OptimizedMesh cleanMesh( const std::vector<render::Vertex3D>& verts, const std::vector<uint32_t>& indices)
[[nodiscard]] static MeshLOD generateLODs( const std::vector<render::Vertex3D>& verts, const std::vector<uint32_t>& indices, const std::vector<float>& targetRatios)
[[nodiscard]] static OptimizedMesh simplify( const std::vector<render::Vertex3D>& verts, const std::vector<uint32_t>& indices, int targetTriangles)
`using ShaderCompilerFn = std::function<ShaderCompileResult( std::string_view source, gfx::ShaderType type)>;`
struct ShaderHandle 3
[[nodiscard]] constexpr bool valid() const noexcept
[[nodiscard]] constexpr bool operator==(const ShaderHandle& other) const noexcept
[[nodiscard]] constexpr bool operator!=(const ShaderHandle& other) const noexcept
struct ShaderCompileResult 2
std::string errorMessage
std::vector<uint8_t> bytecode
class ShaderCache 12
ShaderCache()
explicit ShaderCache(ShaderCompilerFn compiler)
ShaderCompileResult getOrCompile(std::string_view source, gfx::ShaderType type)
bool invalidate(uint64_t sourceHash)
bool invalidateBySource(std::string_view source)
void clear()
[[nodiscard]] std::size_t size() const noexcept
[[nodiscard]] uint64_t cacheHits() const noexcept
[[nodiscard]] uint64_t cacheMisses() const noexcept
[[nodiscard]] bool contains(uint64_t sourceHash) const
[[nodiscard]] static uint64_t computeHash(std::string_view source) noexcept
void setCompiler(ShaderCompilerFn compiler)
class SvgBuilder 13
SvgBuilder(int width, int height)
SvgBuilder& rect(float x, float y, float w, float h, const std::string& fill, float rx = 0)
SvgBuilder& rectWithStroke(float x, float y, float w, float h, const std::string& fill, const std::string& stroke, float strokeWidth = 1, float rx = 0)
SvgBuilder& circle(float cx, float cy, float r, const std::string& fill)
SvgBuilder& line(float x1, float y1, float x2, float y2, const std::string& stroke, float strokeWidth = 1)
SvgBuilder& text(float x, float y, const std::string& content, float fontSize, const std::string& fill = "white")
SvgBuilder& path(const std::string& d, const std::string& fill, const std::string& stroke = "none")
SvgBuilder& beginGroup(const std::string& transform = "")
SvgBuilder& endGroup()
SvgBuilder& applyFilter(const std::string& filterId)
SvgBuilder& linearGradient(const std::string& id, const std::string& color1, const std::string& color2, bool vertical = false)
SvgBuilder& shadow(const std::string& filterId, float dx = 2, float dy = 2, float blur = 4)
[[nodiscard]] std::string build() const
enum SvgShape 7
Circle
Rect
Triangle
Polygon
Path
Text
Group
struct SvgStyle 1
std::string glowColor
struct SvgElement 6
std::string pathData
SvgStyle style
std::vector<SvgElement> children
std::string text
std::string transform
std::vector<std::pair<float, float>> points
struct SvgDocument 2
std::vector<SvgElement> elements
std::string title
class SvgGenerator 1
[[nodiscard]] static std::optional<SvgDocument> fromJson(const std::string& json)
enum CompressionFormat 6
BC1_RGB
BC3_RGBA
BC4_R
BC5_RG
BC7_RGBA
None
struct CompressedTexture 5
int width = 0
int height = 0
CompressionFormat format = CompressionFormat::None
int mipLevels = 1
std::vector<std::vector<uint8_t>> mipData
struct MitexHeader 5
uint32_t version = 1
int32_t width = 0
int32_t height = 0
uint32_t format = 0
uint32_t mipLevels = 0
class TextureCompressor 5
[[nodiscard]] static CompressedTexture compress( const uint8_t* pixels, int w, int h, CompressionFormat fmt)
[[nodiscard]] static CompressedTexture compressWithMips( const uint8_t* pixels, int w, int h, CompressionFormat fmt, int maxMips = 0)
static bool save(const CompressedTexture& tex, const std::string& path)
[[nodiscard]] static std::optional<CompressedTexture> load(const std::string& path)
[[nodiscard]] static CompressionFormat recommendFormat( bool hasAlpha, bool isNormalMap)
struct UiThemeConfig 10
enum `Style` { Flat, Rounded, Pixel, Neumorphic }
std::string primaryColor = "#4A90D9"
std::string secondaryColor = "#2C3E50"
std::string accentColor = "#E74C3C"
std::string textColor = "#FFFFFF"
std::string backgroundColor = "#1A1A2E"
float cornerRadius = 8.0f
float borderWidth = 2.0f
float padding = 8.0f
Style style = Style::Rounded
class UiThemeGenerator 10
[[nodiscard]] static UiThemeConfig fromJson(const std::string& json)
[[nodiscard]] static std::string toJson(const UiThemeConfig& config)
[[nodiscard]] static std::string generateButton(const UiThemeConfig& config, float w, float h, const std::string& label)
[[nodiscard]] static std::string generateSlider(const UiThemeConfig& config, float w, float h, float value)
[[nodiscard]] static std::string generateCheckbox(const UiThemeConfig& config, float size, bool checked)
[[nodiscard]] static std::string generatePanel(const UiThemeConfig& config, float w, float h)
[[nodiscard]] static std::string generateProgressBar(const UiThemeConfig& config, float w, float h, float progress)
[[nodiscard]] static std::string generateToggle(const UiThemeConfig& config, float w, float h, bool on)
[[nodiscard]] static std::string generateTextInput(const UiThemeConfig& config, float w, float h, const std::string& placeholder)
[[nodiscard]] static std::string generateAtlas(const UiThemeConfig& config, int atlasSize = 1024)

Sourced from docs/API_CATALOG.md, auto-generated by tools/generate_api_catalog.py.