summaryrefslogtreecommitdiff
path: root/src/KingSystem/Physics/System/physRayCastForRequest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/KingSystem/Physics/System/physRayCastForRequest.cpp')
-rw-r--r--src/KingSystem/Physics/System/physRayCastForRequest.cpp34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/KingSystem/Physics/System/physRayCastForRequest.cpp b/src/KingSystem/Physics/System/physRayCastForRequest.cpp
new file mode 100644
index 00000000..44cbfdaa
--- /dev/null
+++ b/src/KingSystem/Physics/System/physRayCastForRequest.cpp
@@ -0,0 +1,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