载入中...
搜索中...
未找到
ClimbingControl.h
浏览该文件的文档.
1#pragma once
2#include "common/Export.h"
3
4
10#include "climbing/Climbing.h"
13
14namespace eve::climbing {
15
24public:
33 ClimbingControl(SubjectRef instance, SubjectRef character, ClimbingRuntime& runtime,
36 ~ClimbingControl() override;
37
40
43 [[nodiscard]] std::string_view gameplayDomain() const noexcept override;
46 [[nodiscard]] std::vector<SubjectRef> gameplayInstances() const override;
49 [[nodiscard]] Result<GameplayObservation> observeGameplay(const GameplaySession& session,
50 SubjectRef instance) const override;
53 [[nodiscard]] Result<std::vector<GameplayActionDescriptor>> availableGameplayActions(
54 const GameplaySession& session, SubjectRef instance, SubjectRef subject) const override;
57 [[nodiscard]] Result<GameplayCommandReceipt> submitGameplay(const GameplaySession& session,
58 SubjectRef instance,
59 const GameplayCommand& command) override;
62 [[nodiscard]] Result<GameplayObservation> advanceGameplay(const GameplaySession& session,
63 SubjectRef instance,
64 const SimulationStep& step) override;
67 [[nodiscard]] Result<std::vector<GameplayEvent>> gameplayEvents(const GameplaySession& session,
68 SubjectRef instance,
69 std::uint64_t afterSequence) const override;
70
71private:
72 [[nodiscard]] bool controls(const GameplaySession& session) const;
73 [[nodiscard]] Result<std::uint64_t> refreshRevision() const;
74 [[nodiscard]] Result<void> captureEvents(std::string_view commandId);
75
76 SubjectRef instance_;
77 SubjectRef character_;
78 ClimbingRuntime* runtime_ = nullptr;
79 physics::World3D* world_ = nullptr;
80 const ClimbingPose* pose_ = nullptr;
81 SimulationTick tick_ = SimulationTick::zero();
82 mutable std::uint64_t revision_ = 0;
83 mutable std::string stateFingerprint_;
84 std::uint64_t nextEventSequence_ = 1;
85 std::vector<GameplayEvent> events_;
86};
87
88} // namespace eve::climbing
int subject
Definition AnimSmr.cpp:163
eve::EntitySpatialPose pose
Deterministic climbing/parkour planning and capsule-constrained execution.
#define EVENGINE_API_DOMAINS
Definition Export.h:110
Host-neutral player-equivalent command and observation protocol.
Optional companion surface for gameplay providers that can enumerate instances.
World3D * world
std::optional< InteractionSession > session
Definition Tactics.cpp:39
float step
Definition TreeMesh.cpp:314
Multi-provider gameplay boundary consumed by input, scripts and automation.
Optional read-only discovery surface implemented beside a gameplay provider.
Move-only operation result carrying either a value or Status.
Definition Result.h:155
Strong, domain-neutral reference to a runtime subject.
Definition SubjectRef.h:26
Exposes server-probed climbing actions without accepting authored world targets.
ClimbingControl & operator=(const ClimbingControl &)=delete
ClimbingControl(const ClimbingControl &)=delete
Owner-thread climbing planner and executor for one character.
Definition Climbing.h:653
Box3D rigid-body world. Script coordinates are meters (Box3D native), unlike 2D World which uses pixe...
Definition World3D.h:63
One discoverable domain action and its owning schema projection.
Owning evidence that a gameplay authority accepted one command.
One player-semantic command submitted to a domain authority.
Owning event projection safe across frames and process boundaries.
Immutable owning observation of one authoritative gameplay instance.
Owning authorization context shared by player, script and automation adapters.
One deterministic fixed-step emitted by SimulationClock.
Definition Time.h:158
Input pose used for one deterministic candidate probe.
Definition Climbing.h:275