22 lines
449 B
C++
22 lines
449 B
C++
#include "Base.h"
|
|
|
|
#ifdef _WIN32
|
|
#include <irrlicht.h>
|
|
#else
|
|
#include <irrlicht/irrlicht.h>
|
|
#endif
|
|
|
|
|
|
|
|
class RayCastHandler
|
|
{
|
|
public:
|
|
bool isPlayerLookingAtAABB(irr::core::aabbox3d<irr::f32> aabb)
|
|
{
|
|
irr::core::line3d<irr::f32> ray;
|
|
ray.start = pb.player -> getPosition();
|
|
ray.end = ray.start + (pb.camera -> getTarget() - ray.start).normalize() * 1000.0F;
|
|
return true;
|
|
}
|
|
};
|