载入中...
搜索中...
未找到
Box3DWorldMover.cpp
浏览该文件的文档.
18 if (lengthSquared <= 1e-12f) throw eve::Exception("World3D.setMoverUp: direction must be non-zero");
30bool WorldBackend::do_moveCapsule(float ax, float ay, float az, float bx, float by, float bz, float radius, float dx,
32 if (!std::isfinite(ax) || !std::isfinite(ay) || !std::isfinite(az) || !std::isfinite(bx) || !std::isfinite(by) ||
33 !std::isfinite(bz) || !(radius > 0.f) || !std::isfinite(radius) || !std::isfinite(dx) || !std::isfinite(dy) ||
58 static bool callback(b3ShapeId shapeId, const b3PlaneResult *results, int resultCount, void *context) {
67 if (upDot > 0.f && upDot < self->world->owner_->moverSlopeCos_ && self->steepCount < planeCapacity) {
117 b3World_CastMover(worldId_, current, &mover, delta, filter, &MoverFilter::callback, &moverFilter);
135 static bool callback(b3ShapeId shapeId, const b3PlaneResult *results, int count, void *context) {
149 if (b3LengthSquared(collector.bestNormal) <= toleranceSquared) collector.bestNormal = support.normal;
161eve::Result<bool> WorldBackend::moveCapsule(float ax, float ay, float az, float bx, float by, float bz, float radius,
168eve::Result<CapsuleMove3D> WorldBackend::do_moveCapsuleOwned(float ax, float ay, float az, float bx, float by, float bz,
172 return ownedQueryFailure<CapsuleMove3D>(eve::DiagnosticCode::StaleHandle, "physics world is no longer valid",
174 const float upLengthSquared = policy.upX * policy.upX + policy.upY * policy.upY + policy.upZ * policy.upZ;
176 upLengthSquared <= 1e-12f || !std::isfinite(policy.maxSlopeRadians) || policy.maxSlopeRadians < 0.f ||
178 return ownedQueryFailure<CapsuleMove3D>(eve::DiagnosticCode::InvalidArgument, "capsule mover policy is invalid",
185 moverUp_ = {policy.upX * inverseUpLength, policy.upY * inverseUpLength, policy.upZ * inverseUpLength};
205 return ownedQueryFailure<CapsuleMove3D>(eve::DiagnosticCode::InvalidArgument, error.what(), "capsuleMove");
209eve::Result<CapsuleMove3D> WorldBackend::moveCapsuleOwned(float ax, float ay, float az, float bx, float by, float bz,
215ClothProbeStatus WorldBackend::do_pointProbeFiltered(float x, float y, float z, float radius, ClothContact3D *out,
252eve::Result<ClothContact3D> WorldBackend::pointProbeFiltered(float x, float y, float z, float radius,
float getMoverNormalY() const
Representative blocking normal Y from the last move.
Definition World3D.h:789
float getMoverDeltaZ() const
Resolved translation Z from the last moveCapsule call.
Definition World3D.h:785
float getMoverDeltaY() const
Resolved translation Y from the last moveCapsule call.
Definition World3D.h:783
float getMoverNormalZ() const
Representative blocking normal Z from the last move.
Definition World3D.h:791
float getMoverDeltaX() const
Resolved translation X from the last moveCapsule call.
Definition World3D.h:781
float getMoverNormalX() const
Representative blocking normal X from the last move.
Definition World3D.h:787
int getMoverIterations() const
Number of outer solver passes used by the last move.
Definition World3D.h:795
int getMoverPlaneCount() const
Number of collision planes considered during the last move.
Definition World3D.h:793
bool isMoverGrounded() const
True when the last move touched a walkable plane.
Definition World3D.h:801
eve::Result< CapsuleMove3D > moveCapsuleOwned(float ax, float ay, float az, float bx, float by, float bz, float radius, float dx, float dy, float dz, QueryFilter3D filter, CapsuleMovePolicy3D policy) override
moveCapsuleOwned; uses the class ownership, thread and failure contract.
Definition Box3DWorldMover.cpp:209
eve::Result< void > setMoverUp(float x, float y, float z) override
setMoverUp; uses the class ownership, thread and failure contract.
Definition Box3DWorldMover.cpp:23
eve::Result< bool > moveCapsule(float ax, float ay, float az, float bx, float by, float bz, float radius, float dx, float dy, float dz) override
moveCapsule; uses the class ownership, thread and failure contract.
Definition Box3DWorldMover.cpp:161
eve::Result< ClothContact3D > pointProbeFiltered(float x, float y, float z, float radius, uint64_t categoryBits, uint64_t maskBits) const override
pointProbeFiltered; uses the class ownership, thread and failure contract.
Definition Box3DWorldMover.cpp:252
Definition Body3D.h:17
@ InvalidArgument
@ StaleHandle
Owning result of continuous capsule movement.
Definition OwnedQuery3D.h:101
Per-call capsule mover classification policy; never mutates persistent World3D settings.
Definition OwnedQuery3D.h:55
Result of a 3D point probe: deepest non-sensor shape within radius. Normal points from the shape towa...
Definition World3DTypes.h:20
Query filter applied atomically for one owning query operation.
Definition OwnedQuery3D.h:47
static b3ShapeId shapeId(const Shape3D &shape)
Borrows a Box3D shape identifier for a synchronous native operation.
Definition Box3DShape.cpp:328