载入中...
搜索中...
未找到
PointDelta.h
浏览该文件的文档.
1#pragma once
2
3#include "procgen/PointSet.h"
4
5#include <cstdint>
6#include <vector>
7
8namespace eve::procgen {
9
16struct PointDelta {
22 std::vector<std::uint64_t> removed;
24 std::vector<std::uint64_t> targetOrder;
26 std::uint64_t baseFingerprint = 0;
28 std::uint64_t targetFingerprint = 0;
29};
30
34[[nodiscard]] EVENGINE_API_DOMAINS Result<PointDelta> diffPointSets(const PointSet& before, const PointSet& after);
36[[nodiscard]] EVENGINE_API_DOMAINS Result<PointSet> applyPointDelta(const PointSet& base, const PointDelta& delta);
37
38} // namespace eve::procgen
#define EVENGINE_API_DOMAINS
Definition Export.h:110
std::shared_ptr< const std::vector< glm::vec2 > > points
Move-only operation result carrying either a value or Status.
Definition Result.h:155
Script-friendly collection of attributed 3D samples.
Definition PointSet.h:59
Result< PointSet > applyPointDelta(const PointSet &base, const PointDelta &delta)
Apply a delta atomically, rejecting stale or internally inconsistent input.
Result< std::uint64_t > fingerprintPointSet(const PointSet &points)
Compute an exact deterministic fingerprint, rejecting missing or duplicate ids.
Result< PointDelta > diffPointSets(const PointSet &before, const PointSet &after)
Compute an identity-based delta without mutating either snapshot.
Transactional identity-based change set between two point snapshots.
Definition PointDelta.h:16
std::uint64_t targetFingerprint
Fingerprint that the fully applied target snapshot must produce.
Definition PointDelta.h:28
PointSet added
Target-only points, including their complete attribute rows.
Definition PointDelta.h:18
PointSet updated
Base identities whose point or attribute content changed.
Definition PointDelta.h:20
std::vector< std::uint64_t > removed
Base identities absent from the target snapshot.
Definition PointDelta.h:22
std::vector< std::uint64_t > targetOrder
Exact identity order of the target snapshot.
Definition PointDelta.h:24
std::uint64_t baseFingerprint
Fingerprint that the input snapshot must match before application.
Definition PointDelta.h:26