summaryrefslogtreecommitdiff
path: root/src/KingSystem/Physics/System/physRayCastBodyQuery.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/KingSystem/Physics/System/physRayCastBodyQuery.cpp')
-rw-r--r--src/KingSystem/Physics/System/physRayCastBodyQuery.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/KingSystem/Physics/System/physRayCastBodyQuery.cpp b/src/KingSystem/Physics/System/physRayCastBodyQuery.cpp
new file mode 100644
index 00000000..ce86f71f
--- /dev/null
+++ b/src/KingSystem/Physics/System/physRayCastBodyQuery.cpp
@@ -0,0 +1,29 @@
+#include "KingSystem/Physics/System/physRayCastBodyQuery.h"
+
+namespace ksys::phys {
+
+RayCastBodyQuery::RayCastBodyQuery(SystemGroupHandler* group_handler, GroundHit ground_hit)
+ : RayCast(group_handler, ground_hit) {}
+
+RayCastBodyQuery::~RayCastBodyQuery() = default;
+
+bool RayCastBodyQuery::worldRayCast(ContactLayerType layer_type) {
+ mHitRigidBody = nullptr;
+ return RayCast::worldRayCast(layer_type);
+}
+
+bool RayCastBodyQuery::shapeRayCast(RigidBody* rigid_body) {
+ mHitRigidBody = nullptr;
+ return RayCast::shapeRayCast(rigid_body);
+}
+
+bool RayCastBodyQuery::phantomRayCast(Phantom* phantom) {
+ mHitRigidBody = nullptr;
+ return RayCast::phantomRayCast(phantom);
+}
+
+void RayCastBodyQuery::onRigidBodyHit(RigidBody* body) {
+ mHitRigidBody = body;
+}
+
+} // namespace ksys::phys