Skip to content
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

Bounding volumes refactoring #7

Open
yanenkoa opened this issue Dec 23, 2017 · 0 comments
Open

Bounding volumes refactoring #7

yanenkoa opened this issue Dec 23, 2017 · 0 comments
Assignees
Labels
applied everything that is not directly related to the math or physics, if it's CI fix, CMake fix etc refactoring just rewriting old code

Comments

@yanenkoa
Copy link

Bounding volumes classes over at Arion/include/Arion/BoundingVolumes.hpp and Arion/sources/BoundingVolumes.cpp need some refactorings and optimizations:

  1. Rename indices to faces in Mesh struct -- this just makes more sense for that field;
  2. Introduce POD with with Mesh mesh and std::set<std::size_t> indices fields -- they are very often passed around in tandem, so that would be convenient;
  3. Make auxiliary structs, which store calculation data for bounding volume algorithms (see, for instance, OrientedBoundingBox::Box), private and rename them to something more sensible (like OBBData in the case of OrientedBoundingBox) -- they are only used inside those classes;
  4. Refactor bounding volumes classes in order to not store calculation data after the calculations are over (for instance, all fields in OrientedBoundingBox except m_boxShape are not used anywhere outside the constructor) -- right now this calculation data is still stored after constructor finishes execution.

Note: this issue was carried over from here in Pegasus repo.

@ilia-glushchenko ilia-glushchenko added applied everything that is not directly related to the math or physics, if it's CI fix, CMake fix etc refactoring just rewriting old code labels Jan 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
applied everything that is not directly related to the math or physics, if it's CI fix, CMake fix etc refactoring just rewriting old code
Projects
None yet
Development

No branches or pull requests

2 participants