MySchoolEngine / GLEngine

The goal of this repository is to build rendering focused game engine. Feel free to join me and extend this project.
https://myschoolengine.github.io/GLEngine-Documentation/
Other
21 stars 1 forks source link

Efficient anim skeleton implementation #195

Open RohacekD opened 1 year ago

RohacekD commented 1 year ago

Is your feature request related to a problem? Please describe. In order to implement animations it would be nice to abandon all the std::unique_ptr<S_Joint> usage and use the linear storage method. Also, extend C_Skeleton with get by name and get by id methods.

Describe the solution you'd like First of we need a faster way to handle bones by name. I suggest some struct with the hash of the name inside. Each bone should have such id stored and the system will use a simple integer comparison to find the bone. Next, I suggest using std::vector to store bones in the skeleton and build a tree using parent and child indices in joints.