Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
BroadPhaseQuery.h
Go to the documentation of this file.
1// Jolt Physics Library (https://github.com/jrouwe/JoltPhysics)
2// SPDX-FileCopyrightText: 2021 Jorrit Rouwe
3// SPDX-License-Identifier: MIT
4
5#pragma once
6
12
14
15struct RayCast;
17class AABox;
18class OrientedBox;
19struct AABoxCast;
20
21// Various collector configurations
25
29{
30public:
32 virtual ~BroadPhaseQuery() = default;
33
35 virtual void CastRay(const RayCast &inRay, RayCastBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter = { }, const ObjectLayerFilter &inObjectLayerFilter = { }) const = 0;
36
38 virtual void CollideAABox(const AABox &inBox, CollideShapeBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter = { }, const ObjectLayerFilter &inObjectLayerFilter = { }) const = 0;
39
41 virtual void CollideSphere(Vec3Arg inCenter, float inRadius, CollideShapeBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter = { }, const ObjectLayerFilter &inObjectLayerFilter = { }) const = 0;
42
44 virtual void CollidePoint(Vec3Arg inPoint, CollideShapeBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter = { }, const ObjectLayerFilter &inObjectLayerFilter = { }) const = 0;
45
47 virtual void CollideOrientedBox(const OrientedBox &inBox, CollideShapeBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter = { }, const ObjectLayerFilter &inObjectLayerFilter = { }) const = 0;
48
50 virtual void CastAABox(const AABoxCast &inBox, CastShapeBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter = { }, const ObjectLayerFilter &inObjectLayerFilter = { }) const = 0;
51};
52
#define JPH_EXPORT
Definition Core.h:236
#define JPH_NAMESPACE_END
Definition Core.h:379
#define JPH_NAMESPACE_BEGIN
Definition Core.h:373
Axis aligned box.
Definition AABox.h:16
Structure that holds a ray cast or other object cast hit.
Definition CastResult.h:14
Filter class for broadphase layers.
Definition BroadPhaseLayer.h:94
Definition BroadPhaseQuery.h:29
virtual void CollidePoint(Vec3Arg inPoint, CollideShapeBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter={ }, const ObjectLayerFilter &inObjectLayerFilter={ }) const =0
Get bodies intersecting with a point and any hits to ioCollector.
virtual void CastRay(const RayCast &inRay, RayCastBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter={ }, const ObjectLayerFilter &inObjectLayerFilter={ }) const =0
Cast a ray and add any hits to ioCollector.
virtual ~BroadPhaseQuery()=default
Virtual destructor.
virtual void CollideAABox(const AABox &inBox, CollideShapeBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter={ }, const ObjectLayerFilter &inObjectLayerFilter={ }) const =0
Get bodies intersecting with inBox and any hits to ioCollector.
virtual void CastAABox(const AABoxCast &inBox, CastShapeBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter={ }, const ObjectLayerFilter &inObjectLayerFilter={ }) const =0
Cast a box and add any hits to ioCollector.
virtual void CollideOrientedBox(const OrientedBox &inBox, CollideShapeBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter={ }, const ObjectLayerFilter &inObjectLayerFilter={ }) const =0
Get bodies intersecting with an oriented box and any hits to ioCollector.
virtual void CollideSphere(Vec3Arg inCenter, float inRadius, CollideShapeBodyCollector &ioCollector, const BroadPhaseLayerFilter &inBroadPhaseLayerFilter={ }, const ObjectLayerFilter &inObjectLayerFilter={ }) const =0
Get bodies intersecting with a sphere and any hits to ioCollector.
Virtual interface that allows collecting multiple collision results.
Definition CollisionCollector.h:45
Class that makes another class non-copyable. Usage: Inherit from NonCopyable.
Definition NonCopyable.h:11
Filter class for object layers.
Definition ObjectLayer.h:28
Oriented box.
Definition OrientedBox.h:18
Definition Vec3.h:17
Structure that holds AABox moving linearly through 3d space.
Definition AABoxCast.h:13
Definition RayCast.h:47