#pragma once #include #include #include "map/Map.h" class Ray { private: // The Tail of the vector sf::Vector3 origin; // Direction / Length of the vector sf::Vector3 direction; // The incrementing points at which T intersects int(X, Y, Z) points sf::Vector3 intersection_t; // The speed at which the ray climbs. // Take the slope of the line (1 / cartesian.x/y/z) = delta_t.x/y/z sf::Vector3 delta_t; // The 3d voxel position the ray is currently at sf::Vector3 voxel; // The 2d pixel coordinate sf::Vector2 pixel; // Reference to the voxel map Map *map; // The dimensions of the voxel map sf::Vector3 dimensions; public: Ray( Map *m, sf::Vector2 resolution, sf::Vector2 pixel, sf::Vector3 camera_position, sf::Vector3 ray_direction ); sf::Color Cast(); };