载入中...
搜索中...
未找到
ActionSpatialBlock.h
浏览该文件的文档.
1#pragma once
2#include "common/Export.h"
3
4
11#include "common/Result.h"
12#include "common/Value.h"
13
14#include <cstddef>
15#include <cstdint>
16#include <string>
17#include <string_view>
18
19namespace eve::action {
20
30
32enum class ActionSpatialTarget : std::uint8_t { Source, Target };
33
36 double x = 0.0;
37 double y = 0.0;
38 double z = 0.0;
39
41 auto operator<=>(const ActionSpatialVector3&) const = default;
42};
43
52 ActionSpatialAttachmentMode mode = ActionSpatialAttachmentMode::FollowTarget;
53 ActionSpatialTarget target = ActionSpatialTarget::Source;
54 std::size_t targetIndex = 0;
55 std::string bone;
59
61 auto operator<=>(const ActionSpatialBinding&) const = default;
62
70 [[nodiscard]] static Result<ActionSpatialBinding> fromPayload(const Value::Object& payload);
71};
72
74[[nodiscard]] std::string_view actionSpatialAttachmentModeName(ActionSpatialAttachmentMode mode) noexcept;
75
76} // 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:176
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 <=>.