-
Notifications
You must be signed in to change notification settings - Fork 2
feat(ci): Add cross-platform workflow and refactor for MSVC compatibility #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ng it thread safe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a cross-platform GitHub Actions workflow and refactors several modules for MSVC compatibility and improved portability.
- Add CMake-based CI matrix for Linux and Windows.
- Implement cross-platform time handling and use
std::movein key places. - Replace templated
Trianglewith concrete classes and update numeric types todouble.
Reviewed Changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/build-and-test.yml | New CI workflow targeting Ubuntu and Windows with CMake presets |
| tests/src/TransformationsTest.cpp | Include <cmath>, define M_PI, update Triangle instantiation |
| tests/src/MatrixTest.cpp | Include <math.h>, define M_PI |
| src/main.cpp | Replaced move() with std::move() for unique pointers |
| libs/Prism/src/triangle.cpp | Added new non-template Triangle and MeshTriangle implementations |
| libs/Prism/src/sphere.cpp | Removed commented code around rec.p and face‐normal setters |
| libs/Prism/src/scene.cpp | Cross-platform localtime_s/localtime_r, improved generate_filename() |
| libs/Prism/src/plane.cpp | Changed world-space hit point computation in Plane::hit |
| libs/Prism/src/mesh.cpp | Switched from Triangle<std::shared_ptr<Point3>> to MeshTriangle |
| libs/Prism/src/matrix.cpp | Cast dimension to size_t in translation/scaling loops |
| libs/Prism/src/color.cpp | Changed Color constructors to use double |
| libs/Prism/include/Prism/triangle.hpp | Removed templated Triangle definition, added forward declarations |
| libs/Prism/include/Prism/scene.hpp | Moved convert_color/operator<< to source, added move semantics |
| libs/Prism/include/Prism/mesh.hpp | Updated mesh storage to use MeshTriangle |
| libs/Prism/include/Prism/matrix.hpp | Marked nested MatrixRow and ConstMatrixRow with PRISM_EXPORT |
| libs/Prism/include/Prism/color.hpp | Updated member types to double, added integer constructor |
| libs/Prism/include/Prism/ObjReader.hpp | Fixed constructor initializer list for ObjReader |
Comments suppressed due to low confidence (3)
libs/Prism/src/plane.cpp:32
- This change bypasses the object's transform when computing the world-space intersection point. Consider restoring
transform * transformed_ray.at(t)(or equivalent) to correctly account for any object transformation.
rec.p = ray.at(t); // Ponto de volta para o espaço global
libs/Prism/src/scene.cpp:4
- The implementation uses
std::put_time, which requires<iomanip>. Please add#include <iomanip>to avoid compilation errors on some toolchains.
#include <sstream>
libs/Prism/include/Prism/ObjReader.hpp:27
- The constructor no longer initializes any members in an initializer list; ensure that all class members (e.g.,
cmap) are properly initialized or given default values to avoid uninitialized-member bugs.
ObjReader(const std::string& filename) {
No description provided.