#pragma once #include #include #include class RayCaster { public: RayCaster(Map *map, sf::Vector3 map_dimensions, sf::Vector2 viewport_resolution); ~RayCaster(); sf::Color* CastRays(sf::Vector3 camera_direction, sf::Vector3 camera_position); private: sf::Vector3 map_dimensions; Map *map; // The XY resolution of the viewport sf::Vector2 resolution; // The pixel array, maybe do RBGA? Are there even 4 byte data types? sf::Color *image; // The direction of the camera in POLAR coordinates sf::Vector3 camera_direction; // Convert the polar coordinates to CARTESIAN sf::Vector3 camera_direction_cartesian; // The world-space position of the camera sf::Vector3 camera_position; };