载入中...
搜索中...
未找到
DeformTopology.cpp
浏览该文件的文档.
16Result<DeformTopology> DeformTopology::prepare(DeformPrimitive primitive, std::size_t vertexCount,
20 Diagnostic::error(DiagnosticCode::InvalidArgument, "invalid deformation topology", "deformTopology"));
22 if (primitive != DeformPrimitive::Segments && primitive != DeformPrimitive::Triangles) return failure();
42 for (unsigned shift = 0; shift < 32; shift += 8) bytes.push_back(static_cast<char>((value >> shift) & 255));
59std::span<const std::uint32_t> DeformTopology::indices() const noexcept { return data_->indices; }
static Diagnostic error(DiagnosticCode code, std::string message, std::string path={})
Construct an error diagnostic with the standard error severity.
Definition Diagnostic.cpp:21
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:196
Immutable connectivity and UV ownership for fixed-topology deformation playback. @ownership Copies sh...
Definition DeformTopology.h:23
static Result< DeformTopology > prepare(DeformPrimitive primitive, std::size_t vertexCount, std::vector< std::uint32_t > indices, std::vector< DeformUV > uv)
Validate bounded connectivity and freeze it with a deterministic content identity.
Definition DeformTopology.cpp:16
std::string_view key() const noexcept
Borrow the precomputed noncryptographic content key; no per-frame hashing or allocation.
Definition DeformTopology.cpp:61
std::span< const DeformUV > uv() const noexcept
Borrow immutable UVs; empty means no UV channel.
Definition DeformTopology.cpp:60
DeformPrimitive primitive() const noexcept
Primitive interpretation of the index stream.
Definition DeformTopology.cpp:57
std::size_t vertexCount() const noexcept
Number of stable vertex slots.
Definition DeformTopology.cpp:58
std::span< const std::uint32_t > indices() const noexcept
Borrow immutable ordered connectivity, bounded by this shared storage lifetime.
Definition DeformTopology.cpp:59
DeformPrimitive
Explicit primitive arity; connectivity retains order and triangle winding.
Definition DeformTopology.h:12
@ Triangles
@ Segments
std::string bakedAssetContentKey(std::string_view source)
Stable noncryptographic 128-bit content digest, encoded as 32 lowercase hexadecimal bytes....
Definition BakedAssetFile.cpp:14
@ InvalidArgument
Definition Container.h:602
std::size_t vertexCount
Definition DeformTopology.cpp:10
DeformPrimitive primitive
Definition DeformTopology.cpp:9
std::vector< std::uint32_t > indices
Definition DeformTopology.cpp:11