Skip to content

Conversation

@orange-cpp
Copy link
Owner

This change refactors the camera and prediction engine implementations to utilize traits.

  • Removes inheritance from Camera classes and replaces it with a template-based trait system.
  • Introduces CameraTrait and PredEngineTrait for each engine (IW, OpenGL, Source, Unity).
  • Deletes the old engine traits from projectile prediction folder.
  • Replaces old inheritance with Camera = projection::Camera

This approach promotes code reuse, reduces redundancy, and improves maintainability.

Moves camera and prediction engine implementations into traits for each engine,
decoupling the engine-specific logic from the core classes, promoting code reuse
and maintainability. This change allows for easier addition of new engines and
customization of existing ones.
@orange-cpp orange-cpp self-assigned this Aug 10, 2025
@orange-cpp orange-cpp added the enhancement New feature or request label Aug 10, 2025
@orange-cpp orange-cpp merged commit d238bd1 into main Aug 10, 2025
3 checks passed
@orange-cpp orange-cpp deleted the u/camera_type_traits branch August 10, 2025 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants