载入中...
搜索中...
未找到
SoftBodyModelDefinition.h
浏览该文件的文档.
1#pragma once
2#include "common/Export.h"
3
4
5#include "common/Result.h"
6#include "common/Value.h"
8
9#include <cstdint>
10#include <string>
11#include <string_view>
12
13namespace eve::physics {
14
19
22 static constexpr std::string_view SchemaId = "physics:softbody-model";
23 static constexpr std::uint32_t SchemaVersion = 1;
24
25 std::string sourceMesh;
26 SoftBodySurfaceSampling surfaceSampling = SoftBodySurfaceSampling::Vertices;
27 int surfaceResolution = 16;
28 SoftBodyVolumeSampling volumeSampling = SoftBodyVolumeSampling::None;
29 int volumeResolution = 16;
30 int shapeResolution = 48;
31 float maxAnisotropy = 3.f;
32 float smoothing = 0.25f;
33
35 [[nodiscard("check soft-body model definition")]] eve::Result<void> validate() const;
37 [[nodiscard("check soft-body model encoding")]] eve::Result<eve::Value> toValue() const;
39 [[nodiscard("check soft-body model decoding")]]
42 [[nodiscard]] static eve::schema::SchemaDefinition schemaDefinition();
44 [[nodiscard("check soft-body model schema registration")]] static eve::Result<void> ensureSchemaRegistered();
45};
46
47} // namespace eve::physics
double value
#define EVENGINE_API_BACKENDS
Definition Export.h:108
Move-only, checked operation results for the common layer.
Owning, renderer-independent dynamic values.
Move-only operation result carrying either a value or Status.
Definition Result.h:155
The canonical owning dynamic value used by data-facing protocols.
Definition Value.h:31
Optional physics backend for vehicle mobility and body attach.
Definition Climbing.h:36
SoftBodySurfaceSampling
SoftBodySurfaceSampling public API.
SoftBodyVolumeSampling
SoftBodyVolumeSampling public API.
Versioned authoring recipe used to cook a mesh-backed SoftBodyModel.
Versioned runtime schema for a JSON object.
Definition SchemaTypes.h:93