载入中...
搜索中...
未找到
ActionSpatialBlock.cpp
浏览该文件的文档.
32 DiagnosticCode::InvalidArgument, "spatial vector must contain exactly three numbers", std::string(key)));
43Result<std::string> text(const Value::Object& payload, std::string_view key, std::string fallback) {
49 Diagnostic::error(DiagnosticCode::InvalidArgument, "spatial field must be text", std::string(key)));
76 Diagnostic::error(DiagnosticCode::InvalidArgument, "unknown spatial attachment mode", "attachment"));
90 if (!index || *index < 0 || static_cast<std::uint64_t>(*index) > std::numeric_limits<std::size_t>::max())
110 Diagnostic::error(DiagnosticCode::InvalidArgument, "spatial scale components must be positive", "scale"));
Typed spatial payload shared by presentation action blocks.
static Diagnostic error(DiagnosticCode code, std::string message, std::string path={}, DiagnosticDetails details={}, std::string source={})
Construct an error diagnostic with the standard error severity.
Definition Diagnostic.h:125
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:175
Definition AbilityAsset.cpp:9
std::string_view actionSpatialAttachmentModeName(ActionSpatialAttachmentMode mode) noexcept
Return the stable payload spelling for an attachment mode.
Definition ActionSpatialBlock.cpp:55
ActionSpatialAttachmentMode
How a spawned presentation object follows its resolved anchor.
Definition ActionSpatialBlock.h:18
@ FollowTarget
Re-evaluate position and rotation from the anchor every update.
@ WorldTransformAtStart
Capture the complete world transform once on Enter.
@ FollowPositionOnly
Re-evaluate position only and retain the spawn rotation.
@ InvalidArgument
Validated spatial settings decoded from a notify payload.
Definition ActionSpatialBlock.h:47
std::size_t targetIndex
Definition ActionSpatialBlock.h:50
ActionSpatialVector3 scale
Definition ActionSpatialBlock.h:54
ActionSpatialVector3 positionOffset
Definition ActionSpatialBlock.h:52
ActionSpatialAttachmentMode mode
Definition ActionSpatialBlock.h:48
static Result< ActionSpatialBinding > fromPayload(const Value::Object &payload)
Decode and validate the common spatial fields in an owning payload.
Definition ActionSpatialBlock.cpp:64
ActionSpatialTarget target
Definition ActionSpatialBlock.h:49
ActionSpatialVector3 rotationOffsetDegrees
Definition ActionSpatialBlock.h:53