Skip to content

ludus::content::scene_cook::AssetOptions

Ludus Wiki · API overview · Browse API

Struct

Per-call options.

Declared in modules/content/scene_cook/include/ludus/content/scene_cook/scene_assets.h

#include <ludus/content/scene_cook/scene_assets.h>
struct ludus::content::scene_cook::AssetOptions final

Fields

CancelOrNull

const Cancellation* ludus::content::scene_cook::AssetOptions::CancelOrNull = nullptr
Optional cooperative cancellation; nullptr disables cancellation.

Related types: Cancellation

Declared in modules/content/scene_cook/include/ludus/content/scene_cook/scene_assets.h

UuidsOrNull

const UuidSource* ludus::content::scene_cook::AssetOptions::UuidsOrNull = nullptr
Optional replayed UUID sequence. When set, it supplies every new UUID and EntropyOrNull is ignored.

Related types: UuidSource

Declared in modules/content/scene_cook/include/ludus/content/scene_cook/scene_assets.h

EntropyOrNull

const foundation::identity::EntropySource* ludus::content::scene_cook::AssetOptions::EntropyOrNull = nullptr
Entropy for new UUIDv4 values (level IDs, import namespaces and object IDs), generated by foundation::identity::TryGenerateUuidV4(). SceneCook acquires no entropy itself: production callers pass ludus::platform::GetSystemEntropySource() from Ludus::PlatformEntropy. The source must stay valid for the call. When it is null or fails, the operation fails with AssetErrorCode::MissingTools before the level or catalog it would have produced is returned or published.

Related types: foundation::identity::EntropySource

Declared in modules/content/scene_cook/include/ludus/content/scene_cook/scene_assets.h

SourceOrigin

std::string_view ludus::content::scene_cook::AssetOptions::SourceOrigin
Provenance recorded as source_origin and used to reuse logical identities on reimport; empty selects realpath(source).

Declared in modules/content/scene_cook/include/ludus/content/scene_cook/scene_assets.h

SourceEntry

std::string_view ludus::content::scene_cook::AssetOptions::SourceEntry
Scene entry file name inside the source directory. Empty keeps the bounded reference cooker on scene-v4.pbrt (CookMaterials by default). scene-v4.pbrt tries the reference profile first and falls back to pbrt-best-effort-v1 when the profile rejects the scene; any other name uses the best-effort importer that ImportSceneBestEffort detects from the file's content (pbrt-v4, glTF 2.0/GLB or Wavefront OBJ). A plain file name: no directory separators.

Declared in modules/content/scene_cook/include/ludus/content/scene_cook/scene_assets.h

ExpectedSourceDigest

std::string_view ludus::content::scene_cook::AssetOptions::ExpectedSourceDigest
source_digest of an approved PreviewImport response. When nonempty, Import fails with Conflict unless the sources still produce that digest, so a confirmed import cannot differ from the preview the user approved.

Declared in modules/content/scene_cook/include/ludus/content/scene_cook/scene_assets.h

JobsOrNull

foundation::threading::JobSystem* ludus::content::scene_cook::AssetOptions::JobsOrNull = nullptr
Optional caller-owned job system for the best-effort importer's texture decoding; see BestEffortOptions::JobsOrNull for the budget, memory and thread contract. Imports and commits with workers also re-hash the source inputs on it, reading them on the calling thread in batches of at most 256 MiB; results and messages match the serial check. nullptr decodes and re-hashes serially. The pbrt-reference-v1 cooker does not decode on it. Not owned.

Related types: foundation::threading::JobSystem

Declared in modules/content/scene_cook/include/ludus/content/scene_cook/scene_assets.h

CookOrNull

bool(*) ludus::content::scene_cook::AssetOptions::CookOrNull(std::string_view source, CookResult &outResult, CookError &outError, const Cancellation *cancelOrNull) noexcept(std::string_view source, CookResult &outResult, CookError &outError, const Cancellation *cancelOrNull) noexcept = nullptr
Optional replacement cooker, for tests that need a synthetic source; nullptr selects CookMaterials (pbrt-reference-materials-v2).

Declared in modules/content/scene_cook/include/ludus/content/scene_cook/scene_assets.h

ShouldPreserveReferenceMaterials

bool ludus::content::scene_cook::AssetOptions::ShouldPreserveReferenceMaterials = true
Preserve typed source materials for the bounded PBRT reference route. True selects CookMaterials; false explicitly selects the frozen Cook profile. Other source formats and an explicit CookOrNull override are unaffected.

Declared in modules/content/scene_cook/include/ludus/content/scene_cook/scene_assets.h

EnvironmentFile

std::string_view ludus::content::scene_cook::AssetOptions::EnvironmentFile
Optional latitude/longitude lighting image relative to the scene source directory. Empty preserves source lighting. An existing authored environment rejects this addition; analytic lights and emission are retained. The image must resolve inside the source root, including symlinks, and participates in source digests. The caller keeps this borrowed view alive for the duration of the call. Linear HDR energy is retained with a bounded texture and radiance multiplier; +Y is north, longitude zero is +X, increasing longitude turns toward +Z.

Declared in modules/content/scene_cook/include/ludus/content/scene_cook/scene_assets.h