载入中...
搜索中...
未找到
ActionSpatialBlock.h
浏览该文件的文档.
1#pragma once
2#include "common/Export.h"
3
4
7#include "common/Result.h"
8#include "common/Value.h"
9
10#include <cstddef>
11#include <cstdint>
12#include <string>
13#include <string_view>
14
15namespace eve::action {
16
26
28enum class ActionSpatialTarget : std::uint8_t { Source, Target };
29
32 double x = 0.0;
33 double y = 0.0;
34 double z = 0.0;
35
37 auto operator<=>(const ActionSpatialVector3&) const = default;
38};
39
48 ActionSpatialAttachmentMode mode = ActionSpatialAttachmentMode::FollowTarget;
49 ActionSpatialTarget target = ActionSpatialTarget::Source;
50 std::size_t targetIndex = 0;
51 std::string bone;
55
57 auto operator<=>(const ActionSpatialBinding&) const = default;
58
66 [[nodiscard]] static Result<ActionSpatialBinding> fromPayload(const Value::Object& payload);
67};
68
70[[nodiscard]] std::string_view actionSpatialAttachmentModeName(ActionSpatialAttachmentMode mode) noexcept;
71
72} // namespace eve::action
LogicalId target
Value::Object payload
#define EVENGINE_API_PLATFORM
Definition Export.h:107
std::array< float, 3 > scale
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
std::map< std::string, Value > Object
Definition Value.h:34
ActionSpatialTarget
Which handle in ActionNotifyContext supplies the spatial anchor.
std::string_view actionSpatialAttachmentModeName(ActionSpatialAttachmentMode mode) noexcept
Return the stable payload spelling for an attachment mode.
ActionSpatialAttachmentMode
How a spawned presentation object follows its resolved anchor.
@ 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.
Validated spatial settings decoded from a notify payload.
auto operator<=>(const ActionSpatialBinding &) const =default
Operator <=>.
ActionSpatialVector3 rotationOffsetDegrees
Owning three-component value used at the action/presentation boundary.
auto operator<=>(const ActionSpatialVector3 &) const =default
Operator <=>.