PCG-FPS  v2 m0.22.4
Simple First Person Shooter with Procedurally Generated Level
RaycastCallback.h
Go to the documentation of this file.
1 #ifndef SKR_FPS2_RENDERER_OPENGL_RAYCAST_CALLBACK_H
2 #define SKR_FPS2_RENDERER_OPENGL_RAYCAST_CALLBACK_H
3 
4 #include "..\pch.h"
5 
6 #include <vector>
7 #include "reactphysics3d.h"
8 
9 namespace skr
10 {
11 namespace fps2
12 {
13 namespace Collision
14 {
18  class RaycastCallback : public rp3d::RaycastCallback
19  {
20  public:
21  std::vector<rp3d::Vector3> _hitInfos;
22 
23  public:
27  float notifyRaycastHit(const rp3d::RaycastInfo& info);
28 
30  void ClearHits();
31 
32  };
33 }
34 }
35 }
36 
37 #endif
skr::fps2::Collision::RaycastCallback
implements rp3d::RaycastCallback from ReactPhysics3D Library Used in hit detection
Definition: RaycastCallback.h:19
skr
Definition: AssetPath.h:10
skr::fps2::Collision::RaycastCallback::notifyRaycastHit
float notifyRaycastHit(const rp3d::RaycastInfo &info)
callback function called if a hit is registered
Definition: RaycastCallback.cpp:16
skr::fps2::Collision::RaycastCallback::ClearHits
void ClearHits()
clears list of registered hit infos
Definition: RaycastCallback.cpp:62
skr::fps2::Collision::RaycastCallback::_hitInfos
std::vector< rp3d::Vector3 > _hitInfos
list of hit info objects, containing information of each registered hit
Definition: RaycastCallback.h:21