mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 03:21:49 +00:00
add hand skeleton
This commit is contained in:
parent
d06a208188
commit
5632c9ccfe
10 changed files with 226 additions and 67 deletions
23
src/graphics/render/NamedSkeletons.cpp
Normal file
23
src/graphics/render/NamedSkeletons.cpp
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
#include "NamedSkeletons.hpp"
|
||||
|
||||
#include "objects/rigging.hpp"
|
||||
|
||||
using namespace rigging;
|
||||
|
||||
NamedSkeletons::NamedSkeletons() = default;
|
||||
|
||||
std::shared_ptr<rigging::Skeleton> NamedSkeletons::createSkeleton(
|
||||
const std::string& name, const SkeletonConfig* config
|
||||
) {
|
||||
auto skeleton = std::make_shared<Skeleton>(config);
|
||||
skeletons[name] = skeleton;
|
||||
return skeleton;
|
||||
}
|
||||
|
||||
rigging::Skeleton* NamedSkeletons::getSkeleton(const std::string& name) {
|
||||
const auto& found = skeletons.find(name);
|
||||
if (found == skeletons.end()) {
|
||||
return nullptr;
|
||||
}
|
||||
return found->second.get();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue