Skip to content

Refactors camera and prediction using traits#53

Merged
orange-cpp merged 1 commit intomainfrom
u/camera_type_traits
Aug 10, 2025
Merged

Refactors camera and prediction using traits#53
orange-cpp merged 1 commit intomainfrom
u/camera_type_traits

Conversation

@orange-cpp
Copy link
Copy Markdown
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
orange-cpp added a commit that referenced this pull request Feb 15, 2026
Refactors camera and prediction using traits
orange-cpp added a commit that referenced this pull request Feb 16, 2026
Refactors camera and prediction using traits
orange-cpp added a commit that referenced this pull request Feb 16, 2026
Refactors camera and prediction using traits
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.

1 participant