RavEngine
Loading...
Searching...
No Matches
SkeletonAsset.hpp
1#pragma once
2#include <ozz/animation/runtime/skeleton.h>
3#include <ozz/animation/offline/skeleton_builder.h>
4#include <string>
5#include <optional>
6#include "Vector.hpp"
7#include "mathtypes.hpp"
8#if !RVE_SERVER
9#include <RGL/Types.hpp>
10#endif
11
12
13namespace RavEngine {
15 ozz::unique_ptr<ozz::animation::Skeleton> skeleton;
16#if !RVE_SERVER
17 RGLBufferPtr bindpose, boneHierarchy;
18#endif
19
21public:
22 SkeletonAsset(const std::string& path);
24
25
29 const auto& GetSkeleton() const{
30 return skeleton;
31 }
32#if !RVE_SERVER
36 inline const auto GetBindposeHandle() const{
37 return bindpose;
38 }
39#endif
40
44 inline const auto GetBindposes() const{
45 return bindposes;
46 }
47
48#if !RVE_SERVER
53 inline const auto GetBoneHierarchy() const{
54 return boneHierarchy;
55 }
56#endif
57
62 bool HasBone(const std::string_view boneName) const;
63
64 std::optional<uint16_t> IndexForBone(const std::string_view boneName) const;
65};
66}
Definition SkeletonAsset.hpp:14
const auto GetBindposes() const
Definition SkeletonAsset.hpp:44
bool HasBone(const std::string_view boneName) const
Definition SkeletonAsset.cpp:188
const auto GetBoneHierarchy() const
Definition SkeletonAsset.hpp:53
const auto GetBindposeHandle() const
Definition SkeletonAsset.hpp:36
const auto & GetSkeleton() const
Definition SkeletonAsset.hpp:29
Definition concurrentqueue.h:747
Definition Animation.hpp:6