载入中...
搜索中...
未找到
JoltQueryInternal.cpp
浏览该文件的文档.
9eve::Result<QueryVolume> capsuleVolume(float ax, float ay, float az, float bx, float by, float bz, float radius) {
14 if (!std::isfinite(length)) return rejected<QueryVolume>("Capsule overflow", eve::DiagnosticCode::InvalidArgument);
18 auto rotation = length < 1.e-6f ? JPH::Quat::sIdentity() : JPH::Quat::sFromTo(JPH::Vec3::sAxisY(), axis / length);
20 JPH::RMat44::sRotationTranslation(rotation, (JPH::RVec3(ax, ay, az) + JPH::RVec3(bx, by, bz)) * .5);
23bool isAcceptedHit(const State& state, JPH::BodyID id, const JPH::SubShapeID& sub, QueryFilter3D filter) {
33RayHit3D queryHit(const State& state, JPH::BodyID id, const JPH::SubShapeID& sub, JPH::RVec3Arg point,
45 result.materialId = static_cast<int>(contactMaterial(native, sub, shape).userMaterialId & 0xffffffffu);
56JPH::AllHitCollisionCollector<JPH::CollideShapeCollector> overlapVolume(const State& state, const QueryVolume& volume,
66JPH::AllHitCollisionCollector<JPH::CastShapeCollector> sweepVolume(const State& state, const QueryVolume& volume,
Definition JoltBody.cpp:7
int triangleIndex(const JPH::Body &, const JPH::SubShapeID &)
Definition JoltMesh.cpp:89
JPH::AllHitCollisionCollector< JPH::CollideShapeCollector > overlapVolume(const State &state, const QueryVolume &volume, float separation)
Collects owning native records for this synchronous query; no pointers escape.
Definition JoltQueryInternal.cpp:56
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.
Definition JoltQueryInternal.cpp:23
SurfaceMaterial3D contactMaterial(const JPH::Body &, const JPH::SubShapeID &, const ShapeState &)
Definition JoltMesh.cpp:96
ShapeState * child(const JPH::Body &body, const JPH::SubShapeID &id)
Resolves a native child record for a synchronous callback or query. @ownership Borrowed from the worl...
Definition JoltInternal.h:138
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.
Definition JoltQueryInternal.cpp:33
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.
Definition JoltQueryInternal.cpp:9
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.
Definition JoltQueryInternal.cpp:66
@ InvalidArgument
Query filter applied atomically for one owning query operation.
Definition OwnedQuery3D.h:47
uint64_t userMaterialId
Definition ShapeBackend3D.h:37
JPH::RefConst< JPH::Shape > shape
Definition JoltQueryInternal.h:11
Definition JoltInternal.h:58