载入中...
搜索中...
未找到
JoltQueryInternal.h
浏览该文件的文档.
1#pragma once
2// Jolt requires its platform header before any other native header.
3#include <Jolt/Jolt.h>
4
5// Provider implementation dependencies.
6#include <Jolt/Physics/Collision/CollisionCollectorImpl.h>
7#include <Jolt/Physics/Collision/ShapeCast.h>
9namespace eve::physics::jolt {
11 JPH::RefConst<JPH::Shape> shape;
12 JPH::RMat44 transform;
13};
15JPH::RVec3 closestConvexPoint(const ShapeState&, JPH::RVec3Arg);
17[[nodiscard]] eve::Result<QueryVolume> capsuleVolume(float, float, float, float, float, float, float);
19bool isAcceptedHit(const State&, JPH::BodyID, const JPH::SubShapeID&, QueryFilter3D);
21RayHit3D queryHit(const State&, JPH::BodyID, const JPH::SubShapeID&, JPH::RVec3Arg, JPH::Vec3Arg, float);
23JPH::AllHitCollisionCollector<JPH::CollideShapeCollector> overlapVolume(const State&, const QueryVolume&,
24 float separation = 0.f);
26JPH::AllHitCollisionCollector<JPH::CastShapeCollector> sweepVolume(const State&, const QueryVolume&, JPH::Vec3Arg);
27} // namespace eve::physics::jolt
float separation
Definition TreeMesh.cpp:161
Move-only operation result carrying either a value or Status.
Definition Result.h:176
JPH::AllHitCollisionCollector< JPH::CollideShapeCollector > overlapVolume(const State &state, const QueryVolume &volume, float separation)
Collects owning native records for this synchronous query; no pointers escape.
bool isAcceptedHit(const State &state, JPH::BodyID id, const JPH::SubShapeID &sub, QueryFilter3D filter)
Filters a synchronous native hit, borrowing state only for the call.
RayHit3D queryHit(const State &state, JPH::BodyID id, const JPH::SubShapeID &sub, JPH::RVec3Arg point, JPH::Vec3Arg normal, float fraction)
Projects a validated native hit into an owning result on the idle simulation thread.
eve::Result< QueryVolume > capsuleVolume(float ax, float ay, float az, float bx, float by, float bz, float radius)
Cooks an ephemeral query capsule; inputs are endpoints in world space.
JPH::RVec3 closestConvexPoint(const ShapeState &shape, JPH::RVec3Arg target)
Returns a convex leaf's world closest point; shape/body are borrowed only during this idle-thread cal...
JPH::AllHitCollisionCollector< JPH::CastShapeCollector > sweepVolume(const State &state, const QueryVolume &volume, JPH::Vec3Arg delta)
Sweeps one ephemeral convex volume; results are local to its starting position.
Query filter applied atomically for one owning query operation.
Owning snapshot of the closest ray intersection.
JPH::RefConst< JPH::Shape > shape