blob: 44cbfdaa6b3570a88e366041f6c87e33d8ba2196 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#include "KingSystem/Physics/System/physRayCastForRequest.h"
#include "KingSystem/Physics/System/physRayCastRequestMgr.h"
#include "KingSystem/Physics/System/physSystem.h"
namespace ksys::phys {
RayCastForRequest::RayCastForRequest(RayCastRequestMgr* mgr)
: RayCast(nullptr, GroundHit::HitAll), mMgr(mgr) {}
RayCastForRequest::~RayCastForRequest() = default;
RayCastForRequest* RayCastForRequest::allocRequest(SystemGroupHandler* group_handler,
GroundHit ground_hit) {
return System::instance()->allocRayCastRequest(group_handler, ground_hit);
}
bool RayCastForRequest::submitRequest(ContactLayerType layer_type) {
return mMgr->submitRequest(*this, layer_type);
}
bool RayCastForRequest::isRequestQueued() const {
return mMgr->isRequestQueued(*this);
}
void RayCastForRequest::release() {
mRigidBodyHitCallback = nullptr;
mMgr->releaseRequest(*this);
}
bool RayCastForRequest::isRequestFinished() const {
return mMgr->isRequestFinished(*this);
}
} // namespace ksys::phys
|