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.
Bounding volumes classes over at
Arion/include/Arion/BoundingVolumes.hpp
andArion/sources/BoundingVolumes.cpp
need some refactorings and optimizations:1) Rename
indices
tofaces
inMesh
struct -- this just makes more sense for that field; 2) Introduce POD with withMesh mesh
andstd::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 (likeOBBData
in the case ofOrientedBoundingBox
) -- 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 inOrientedBoundingBox
exceptm_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.