载入中...
搜索中...
未找到
WorldSphereSweep.h
浏览该文件的文档.
1#pragma once
2
3#include <cstdint>
4#include <memory>
5#include <string_view>
6#include <vector>
7#include "common/Result.h"
8
9namespace eve {
12 std::uint64_t world = 0;
13 std::uint64_t body = 0;
15 friend bool operator==(const WorldSweepIdentity&, const WorldSweepIdentity&) = default;
16};
20 int bodyId = -1;
21 int shapeId = -1;
22 double fraction = 0;
23 double x = 0, y = 0, z = 0;
24 double nx = 0, ny = 0, nz = 0;
26 std::uint64_t worldEpoch = 0;
27};
30 float radius = 0.1f;
31 std::uint32_t categoryBits = 0xffffffffu;
32 std::uint32_t maskBits = 0xffffffffu;
33 int ignoredBodyId = -1;
34};
40public:
42 virtual ~IWorldSphereSweep() = default;
48 [[nodiscard]] virtual Result<std::vector<WorldSphereContact>> query(double x, double y, double z, double endX,
49 double endY, double endZ) const = 0;
50};
53public:
54 static constexpr const char* capabilityName = "eve.physics.IWorldSphereSweepFactory";
56 virtual ~IWorldSphereSweepFactory() = default;
63 [[nodiscard]] virtual Result<std::unique_ptr<IWorldSphereSweep>> bind(std::string_view worldToken,
65};
66} // namespace eve
double z
double y
double x
OceanWakeSettings settings
Move-only, checked operation results for the common layer.
Optional binding capability; physics owns the factory for process lifetime.
virtual Result< std::unique_ptr< IWorldSphereSweep > > bind(std::string_view worldToken, WorldSphereSweepSettings settings) const =0
Bind an opaque World3D query token and snapshot the ignored body's generation. @ownership Returns an ...
virtual ~IWorldSphereSweepFactory()=default
Release factory resources.
static constexpr const char * capabilityName
Optional physics-owned query session; retains only generation-qualified world/body handles....
virtual Result< std::vector< WorldSphereContact > > query(double x, double y, double z, double endX, double endY, double endZ) const =0
Sweep new sphere crossings from start to end; zero-time initial overlaps are excluded....
virtual ~IWorldSphereSweep()=default
Destroy a session without destroying its world.
Move-only operation result carrying either a value or Status.
Definition Result.h:176
Build metadata (engine git commit, build time, third-party version).
Definition Build.cpp:16
Owning sphere sweep contact; position is the moving sphere center, not the obstacle surface.
WorldSweepIdentity identity
std::uint64_t worldEpoch
Process-local world restore revision; zero means no revision-qualified provenance.
Immutable per-binding sphere and filter policy.
Process-local physics identity projected losslessly from owner handles; never a save identity.
friend bool operator==(const WorldSweepIdentity &, const WorldSweepIdentity &)=default
Compare both generation-qualified handles.