载入中...
搜索中...
未找到
WorldSnapshotAccess.h
浏览该文件的文档.
35 [[nodiscard]] static Result<float> restoreShapeContact(Shape3D& shape, const Value::Object& source);
41 [[nodiscard]] static Result<void> restoreCouplings3D(World3D& world, const Value::Array& values);
117 static std::unique_ptr<World3D> makeDetachedWorld3D(float gx, float gy, float gz, eve::PersistentId instanceId,
119 return std::unique_ptr<World3D>(new World3D(gx, gy, gz, allowSleep, instanceId, false, RigidBackend3D::Box3D));
121 static eve::Result<void> finishPrepared(World& world, int nextId, const SimulationObservation& observation) {
128 static eve::Result<void> finishPrepared(World3D& world, int nextBodyId, int nextShapeId, int nextJointId,
std::vector< std::unique_ptr< ScriptClimbingEventSink > > live
Definition ClimbingServices.cpp:187
Backend-neutral, observable fixed-step contract for physics domains.
static Diagnostic error(DiagnosticCode code, std::string message, std::string path={})
Construct an error diagnostic with the standard error severity.
Definition Diagnostic.cpp:21
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:196
static Status success(StatusCode code=StatusCode::Ok)
Construct a successful status with an explicit non-error outcome.
Definition Status.cpp:19
Backend-neutral 3D rigid body in meter-space coordinates (+Y up by convention). Owned by a World3D; c...
Definition Body3D.h:31
2D rigid body (Box2D) in pixel-space coordinates. Owned by a World; create shapes with newRectangleFi...
Definition Body.h:21
Script-facing joint owned by a World3D. Legacy scalar/void methods adapt the checked backend contract...
Definition Joint3D.h:27
3D shape (box/sphere/capsule) attached to a Body3D with material settings. Created via Body3D::new*Sh...
Definition Shape3D.h:34
Box3D rigid-body world. Script coordinates are meters (Box3D native), unlike 2D World which uses pixe...
Definition World3D.h:47
Box2D world wrapper (2D physics) with pixel-space coordinates. Handles stepping, gravity,...
Definition World.h:44
@ Failed
@ Applied
Observable backend progress shared by CPU and accelerator providers.
Definition SimulationBackend.h:136
eve::SimulationTick lastTick
Tick of the most recently completed step.
Definition SimulationBackend.h:140
static void setJointId(Joint3D &joint, int id)
Definition WorldSnapshotAccess.h:116
static std::unique_ptr< World3D > makeDetachedWorld3D(float gx, float gy, float gz, eve::PersistentId instanceId, bool allowSleep)
Definition WorldSnapshotAccess.h:117
static void setShapeId(Shape3D &shape, int id)
Definition WorldSnapshotAccess.h:115
static Result< void > finishShapeMass(World3D &world)
Preflight candidate mass/inertia arithmetic before applying backend mass updates.
Definition Shape3DContactSnapshot.cpp:168
static void setBodyId(Body3D &body, int id)
Definition WorldSnapshotAccess.h:114
static Value shapeContact(const Shape3D &shape)
Capture native shape contact state and wrapper-owned collision settings.
Definition Shape3DContactSnapshot.cpp:41
static void ownPreparedFixture(World &world, std::unique_ptr< Fixture > fixture)
Candidate owns a fixture wrapper after registering it with its backend.
Definition WorldSnapshotAccess.h:53
static eve::Result< void > finishPrepared(World3D &world, int nextBodyId, int nextShapeId, int nextJointId, const SimulationObservation &observation)
Definition WorldSnapshotAccess.h:128
static Result< void > restoreJoints2D(World &candidate, const Value::Array &joints, std::uint32_t firstHandleIndex)
Rebuild validated joint definitions inside a detached candidate, allocating fresh runtime handles.
Definition JointSnapshotCodec.cpp:169
static Result< void > restoreCouplings3D(World3D &world, const Value::Array &values)
Rebuild transmissions after candidate handles and native joints are ready.
Definition Coupling3DSnapshot.cpp:81
static Result< void > prepareRuntimeLinks(const World3D &live, World3D &prepared)
Allocate fresh 3D links entirely in the detached candidate before publishing topology.
Definition WorldSnapshotAccess.h:140
static eve::Result< void > finishPrepared(World &world, int nextId, const SimulationObservation &observation)
Definition WorldSnapshotAccess.h:121
static eve::Value shapeSource(const Shape3D &shape)
Definition WorldSnapshotAccess.h:68
static Result< float > restoreShapeContact(Shape3D &shape, const Value::Object &source)
Restore validated candidate contact state; return density for deferred mass preparation.
Definition Shape3DContactSnapshot.cpp:67
static Result< Value > captureCouplings3D(const World3D &world)
Capture transmissions with stable source ids and current unwrapped phase.
Definition Coupling3DSnapshot.cpp:34
static void adopt(World3D &live, World3D &prepared)
Definition WorldSnapshotAccess.h:155
static Result< Value > captureJoints2D(const World &world)
Capture owning joint definitions; rejects unregistered backend joints.
Definition JointSnapshotCodec.cpp:67
static void ownPreparedShape(World3D &world, std::unique_ptr< Shape3D > shape)
Transfer one reconstructed shape wrapper to its candidate world.
Definition WorldSnapshotAccess.h:61
static void adopt(World &live, World &prepared)
Definition WorldSnapshotAccess.h:154
static void ownPreparedJoint(World3D &world, std::unique_ptr< Joint3D > joint)
Transfer one reconstructed joint wrapper to its candidate world.
Definition WorldSnapshotAccess.h:65
static void ownPreparedBody(World &world, std::unique_ptr< Body > body)
Candidate owns newly reconstructed wrappers so rollback releases all allocations.
Definition WorldSnapshotAccess.h:49
static void setBodyId(Body &body, int id)
Definition WorldSnapshotAccess.h:113
static void ownPreparedBody(World3D &world, std::unique_ptr< Body3D > body)
Detached 3D candidates own all reconstructed wrappers through commit or rollback.
Definition WorldSnapshotAccess.h:57