Right now there is one AnimObject that encompasses several different types of objects, and one Animation structure which encompasses several different kinds of animations. Also, the data is stored in unordered_maps which means iterating through the data is extremely slow.
Switch to a flat data layout, like an ECS, and remove the hierarchical structure in favor of a component based structure. This should speed things up with larger scenes and it should also make the code much more manageable.
Right now there is one AnimObject that encompasses several different types of objects, and one Animation structure which encompasses several different kinds of animations. Also, the data is stored in unordered_maps which means iterating through the data is extremely slow.
Switch to a flat data layout, like an ECS, and remove the hierarchical structure in favor of a component based structure. This should speed things up with larger scenes and it should also make the code much more manageable.