Real Box3D-backed, non-destructive simulation backend for scene placement. 更多...
#include <ScenePhysicsPlacement.h>
类 | |
| struct | Impl |
Public 成员函数 | |
| ~ScenePhysicsPlacementBackend () override | |
| Scene physics placement backend. | |
| ScenePhysicsPlacementBackend (const ScenePhysicsPlacementBackend &)=delete | |
| ScenePhysicsPlacementBackend & | operator= (const ScenePhysicsPlacementBackend &)=delete |
| std::unique_ptr< editor::IEditorSimulationBackend > | cloneForPreview () const override |
| Rebuild an independent preview with the same admitted scene and handle. | |
| editing::Result< void > | step (std::uint64_t tick, double fixedDelta) override |
| Advance exactly one increasing fixed tick. | |
| editing::Result< std::vector< editor::SimulationObjectSample > > | capture () const override |
| Capture stable selected-object transforms for generic preview tooling. | |
| editing::Result< void > | setHandlePosition (double x, double y, double z) |
| Move the shared world-space placement handle without advancing simulation. | |
| editing::Result< void > | setHandleRotation (double x, double y, double z) |
| Rotate the shared placement handle using XYZ Euler radians without advancing simulation. | |
| editing::Result< void > | setHandleScale (double x, double y, double z) |
| Scale the shared placement handle, resizing selected colliders without advancing simulation. | |
| editing::Result< void > | alignHandleToSurface (double fromX, double fromY, double fromZ, double toX, double toY, double toZ, double offset=0.0) |
| Align selection up to the nearest non-selected ray hit and place it outside the surface. | |
| editing::Result< PhysicsPlacementFrame > | placementFrame () const |
| Capture all admitted objects, retaining bounds and selection metadata. | |
| editing::Revision | sourceRevision () const noexcept |
| Revision copied from the scene when this candidate was admitted. | |
Public 成员函数 继承自 eve::editor::IEditorSimulationBackend | |
| virtual | ~IEditorSimulationBackend ()=default |
| Releases IEditorSimulationBackend resources. | |
静态 Public 成员函数 | |
| static editing::Result< std::unique_ptr< ScenePhysicsPlacementBackend > > | create (PhysicsPlacementRequest request) |
| Validate and build an isolated placement world. | |
详细描述
Real Box3D-backed, non-destructive simulation backend for scene placement.
The backend owns a private physics world and wrapper objects. Scene state is copied at admission and is never mutated by stepping. Selected objects are driven toward a shared handle while collision resolution remains authoritative inside the preview. The class is owner-thread-only and invokes no callbacks.
在文件 ScenePhysicsPlacement.h 第 138 行定义.
构造及析构函数说明
◆ ~ScenePhysicsPlacementBackend()
|
overridedefault |
Scene physics placement backend.
◆ ScenePhysicsPlacementBackend()
|
delete |
成员函数说明
◆ alignHandleToSurface()
| editing::Result< void > eve::scene_editor::ScenePhysicsPlacementBackend::alignHandleToSurface | ( | double | fromX, |
| double | fromY, | ||
| double | fromZ, | ||
| double | toX, | ||
| double | toY, | ||
| double | toZ, | ||
| double | offset = 0.0 |
||
| ) |
◆ capture()
|
overridevirtual |
Capture stable selected-object transforms for generic preview tooling.
实现了 eve::editor::IEditorSimulationBackend.
在文件 ScenePhysicsPlacement.cpp 第 538 行定义.
◆ cloneForPreview()
|
overridevirtual |
Rebuild an independent preview with the same admitted scene and handle.
实现了 eve::editor::IEditorSimulationBackend.
在文件 ScenePhysicsPlacement.cpp 第 316 行定义.
引用了 create().
◆ create()
|
static |
Validate and build an isolated placement world.
在文件 ScenePhysicsPlacement.cpp 第 211 行定义.
引用了 eve::scene_editor::Auto, eve::scene_editor::ConvexHull, eve::editing::failed(), finite, ids, object, request, required, eve::scene_editor::ScenePhysicsPlacementBackend::Impl::selectedColliders(), shape , 以及 value.
被这些函数引用 eve::scene_editor::SceneEditorSession::beginPhysicsPlacement() , 以及 cloneForPreview().
◆ operator=()
|
delete |
◆ placementFrame()
| editing::Result< PhysicsPlacementFrame > eve::scene_editor::ScenePhysicsPlacementBackend::placementFrame | ( | ) | const |
Capture all admitted objects, retaining bounds and selection metadata.
在文件 ScenePhysicsPlacement.cpp 第 557 行定义.
引用了 body, eve::scene_editor::PhysicsPlacementFrame::colliding, eve::scene_editor::PhysicsPlacementFrame::objects, rotation, eve::scene_editing::SceneTransformValue::rotationX, eve::scene_editing::SceneTransformValue::rotationY, eve::scene_editing::SceneTransformValue::rotationZ, eve::scene_editing::SceneTransformValue::scaleX, eve::scene_editing::SceneTransformValue::scaleY, eve::scene_editing::SceneTransformValue::scaleZ, eve::scene_editor::PhysicsPlacementObject::selected, eve::scene_editor::PhysicsPlacementFrame::settled, eve::scene_editor::PhysicsPlacementFrame::surfaceAligned, eve::scene_editor::PhysicsPlacementFrame::surfaceNormalX, eve::scene_editor::PhysicsPlacementFrame::surfaceNormalY, eve::scene_editor::PhysicsPlacementFrame::surfaceNormalZ, eve::scene_editor::PhysicsPlacementFrame::tick, eve::scene_editor::PhysicsPlacementObject::transform, eve::scene_editing::SceneTransformValue::x, eve::scene_editing::SceneTransformValue::y , 以及 eve::scene_editing::SceneTransformValue::z.
◆ setHandlePosition()
| editing::Result< void > eve::scene_editor::ScenePhysicsPlacementBackend::setHandlePosition | ( | double | x, |
| double | y, | ||
| double | z | ||
| ) |
◆ setHandleRotation()
| editing::Result< void > eve::scene_editor::ScenePhysicsPlacementBackend::setHandleRotation | ( | double | x, |
| double | y, | ||
| double | z | ||
| ) |
◆ setHandleScale()
| editing::Result< void > eve::scene_editor::ScenePhysicsPlacementBackend::setHandleScale | ( | double | x, |
| double | y, | ||
| double | z | ||
| ) |
◆ sourceRevision()
|
noexcept |
Revision copied from the scene when this candidate was admitted.
在文件 ScenePhysicsPlacement.cpp 第 593 行定义.
◆ step()
|
overridevirtual |
Advance exactly one increasing fixed tick.
实现了 eve::editor::IEditorSimulationBackend.
在文件 ScenePhysicsPlacement.cpp 第 421 行定义.
引用了 body, eve::scene_editor::Capsule, eve::scene_editor::ConvexHull, current, depth, direction, duration, error, eve::Result< T >::failure(), eve::scene_editor::Fall, finite, eve::Duration::fromSeconds(), height, index, length, offset, eve::scene_editor::Point, eve::scene_editor::Rotate, rotation, eve::scene_editor::ScenePhysicsPlacementBackend::Impl::selectedColliders(), settings, eve::scene_editor::Sphere, eve::physics::SimulationSettings::subStepCount, target, tick, up, eve::detail::StrongUint64< Tag >::value(), vertices , 以及 width.
该类的文档由以下文件生成:
- src/modules/scene/editor/ScenePhysicsPlacement.h
- src/modules/scene/editor/ScenePhysicsPlacement.cpp
Public 成员函数 继承自