Commit Graph

8 Commits

Author SHA1 Message Date
Joseph Aquino 6f51630bcd minor code update
-removed "#include "Ray.h" ' from Utility.hpp
2025-05-21 11:31:11 -04:00
Joseph Aquino d50487f484 minor code update
-Ray.cpp and Ray.h have been removed from the project
-added constructVertexArray() which can take any object that inherits from sf::Shape and create a vertex array with the same shape with approriate transforms taken into account
2025-04-22 14:25:35 -04:00
Joseph Aquino 5d3df8e1b9 minor code update
-changed if statments in Light.cpp to avoid deep nesting
-move temporary local variables out of loops to avoid constant creation and deletion
-added some constexpr variables to the imgui variable to get rid of magic numbers
2025-04-17 03:41:14 -04:00
Joseph Aquino 3941a59b0d Major code rewrite
-class Light has been completely decoupled from class Ray
-class Ray is still in the project for reference, but is not used at all
-Light has been decoupled from the imgui variables, and instead has it's own member variables that are used to configure the object
-all of Light's bool variables are represented by a bit flag variable with appropriate functions to modify it
-the creation and sorting of end points for the Light object has been moved into the class itself
-extra functions and local variables have been created to help with readability of code
- Bounded light can now be greater than 180 degrees
-more imgui variables added to configure the light object
2025-04-15 02:02:17 -04:00
Joseph Aquino a3672012f6 Major code rewrite.
-class Light added to handle the construction of the triangle fan
-light can now be bounded between two bounderies
-differnt sections of main have been placed into different functions for readability
-imgui variables were made inline and moved to Utility.hpp for convenience
-the claculation of intersections for rays hav been moved to Ray::calculateIntersect
-variables containing std::vector<Ray>, class Light, and std::vector<sf::VertexArray> were moved outsid of main() for convenience
2025-04-11 13:58:45 -04:00
Joseph Aquino 637dc7e821 major code rewrite.
-rays are now handled inside class Ray
-constructRay function removed as the functionality is replaced by Ray's constructor
- added an unnamed enum to make indexing Ray::m_points more clear
- Ray::angle is used to keep track of the angle to +x, is updated when any point in Ray::m_points is updated
- Helper.hpp has been renamed to Utility.hpp
-all functions that were above main() are now in Utility.hpp
-rays now behave like a light source
-rays get sorted by angle and get placed into a TriangleFan which is drawn as the light source
-added additional options to the imgui menu
2025-04-10 12:53:51 -04:00
Joseph Aquino b9ea5bd951 small code cleanup
-Intersect struct replaced with std::optional<sf::Vector2f>
-names of LineSegmaent members changed to startPoint and endPoint
2025-04-09 01:11:46 -04:00
Joseph Aquino bc7ef93844 Add project files. 2025-04-08 14:03:35 -04:00