6#include "resource/asset_type.h"
52uint64_t
cacheKey(uint64_t recipeHash, AssetType type);
85[[nodiscard]]
bool writeTexture (
const std::filesystem::path& path,
const TextureAsset& texture);
86[[nodiscard]]
bool writeSkeleton (
const std::filesystem::path& path,
const SkeletonAsset& skeleton);
87[[nodiscard]]
bool writeAnimationClip(
const std::filesystem::path& path,
const AnimationClipAsset& clip);
88[[nodiscard]]
bool writeAudioClip (
const std::filesystem::path& path,
const AudioClipAsset& audio);
123[[nodiscard]]
bool readTexture (
const std::filesystem::path& path,
TextureAsset& out);
124[[nodiscard]]
bool readSkeleton (
const std::filesystem::path& path,
SkeletonAsset& out);
125[[nodiscard]]
bool readAnimationClip(
const std::filesystem::path& path,
AnimationClipAsset& out);
126[[nodiscard]]
bool readAudioClip (
const std::filesystem::path& path,
AudioClipAsset& out);
137 const std::filesystem::path& path,
Cooked binary asset format (derived cache).
Definition asset_cook.h:29
bool readMesh(const std::filesystem::path &path, MeshAsset &out)
Read one cooked file of each kind.
constexpr uint32_t MAX_SKELETON_BONES
Bone count past which a rig is refused as corrupt rather than read.
Definition asset_cook.h:59
bool writeTerrain(const std::filesystem::path &path, const TerrainAsset &terrain)
Cook terrain from its .terrain file (TerrainFile), the body copied once it reads soundly.
uint64_t cacheKey(uint64_t recipeHash, AssetType type)
The complete cache key for one cooked artifact.
constexpr uint32_t MAX_AUDIO_CHANNELS
Channel count past which a sound is refused as corrupt rather than read.
Definition asset_cook.h:66
bool writeMesh(const std::filesystem::path &path, const MeshAsset &mesh)
Write one cooked file of each kind.
constexpr uint32_t MAX_AUDIO_SAMPLE_RATE
Sample rate past which a clip is refused as corrupt rather than read.
Definition asset_cook.h:74
bool readTerrain(const std::filesystem::path &path, TerrainAsset &out, TerrainFile::Names &names)
Read a cooked terrain: its handles empty, what they name in names (TerrainFile::resolve).
bool isCookedCurrent(AssetType type, const std::filesystem::path &path)
Whether the cooked file at path can still serve type.
constexpr uint16_t COOKER_VERSION
Bump when anything the cooker writes changes: a kind's byte layout, an importer flag,...
Definition asset_cook.h:39
A terrain as bytes: the .terrain file the editor writes into a project, and the body of its cooked fi...
Definition asset_cook.h:17
A baked animation: every bone's keys, in six flat arrays.
Definition animation_clip_asset.h:50
A sound: fully decoded interleaved PCM, plus the rate and layout it was written at.
Definition audio_clip_asset.h:58
CPU-side geometry: indexed triangle mesh plus a cached local-space AABB.
Definition mesh_asset.h:51
A rig: a flat, parent-before-child bone array plus its bind pose.
Definition skeleton_asset.h:33
A terrain: a square grid of heights, the share of each of four materials painted at each grid vertex,...
Definition terrain_asset.h:54
What a body names, in the order resolve() reads it back.
Definition terrain_file.h:37
Texture asset combining Resource tracking with engine-level texture parameters.
Definition texture_asset.h:15