summaryrefslogtreecommitdiff
path: root/src/KingSystem/Physics/System/physRayCastBodyQuery.cpp
blob: ce86f71f678c3658db2474a825ab0a937dd9d302 (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
#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