载入中...
搜索中...
未找到
PrototypeKit.h
浏览该文件的文档.
1#pragma once
2
3#include "common/Result.h"
4#include "procgen/MeshBuild.h"
5#include "procgen/Params.h"
6
7#include <span>
8#include <string_view>
9
10namespace eve::procgen {
11
12class MeshRecipeRegistry;
13
16 std::string_view id;
17 std::string_view displayName;
21};
22
30EVENGINE_API_DOMAINS std::span<const PrototypePieceDescriptor> prototypePieceDescriptors() noexcept;
31
48[[nodiscard]] EVENGINE_API_DOMAINS eve::Result<MeshBuild> generatePrototypePiece(std::string_view pieceId,
49 const Params& params);
50
58
59} // namespace eve::procgen
#define EVENGINE_API_DOMAINS
Definition Export.h:110
Move-only, checked operation results for the common layer.
Move-only operation result carrying either a value or Status.
Definition Result.h:155
CPU triangle mesh from procedural mesh recipes (e.g. marching cubes). Positions/normals are xyz-packe...
Definition MeshBuild.h:19
EVENGINE_API_DOMAINS public API.
Owning, typed generation parameters.
Definition Params.h:27
std::vector< ParamSpec > params
eve::Result< MeshBuild > generatePrototypePiece(std::string_view pieceId, const Params &params)
Build one prototype module as an owning CPU triangle mesh.
void registerPrototypePieceRecipes(MeshRecipeRegistry &registry)
Register all prototype modules as prototype.* mesh recipes.
std::span< const PrototypePieceDescriptor > prototypePieceDescriptors() noexcept
Return the stable catalogue of 75 procedural prototype modules.
Build metadata (engine git commit, build time, third-party version).
Definition Build.cpp:16
Metadata for one centered, Y-up module in the built-in prototype construction kit.
float defaultWidth
Default X extent in world units.
float defaultHeight
Default Y extent in world units.
std::string_view id
Stable recipe suffix without the prototype. prefix.
float defaultDepth
Default Z extent in world units.
std::string_view displayName
Human-readable name for tools and editors.