gdk-graphics 0a0aef92e917cfbac53dffbc32c295e4de914093
Loading...
Searching...
No Matches
bvh.h
1// © Joseph Cameron - MIT License
2
3#ifndef GDK_GRAPHICS_EXT_ANIMATION_BVH_H
4#define GDK_GRAPHICS_EXT_ANIMATION_BVH_H
5
6#include <gdk/graphics/ext/animation/skeleton.h>
7
8#include <cstddef>
9#include <iosfwd>
10#include <string>
11#include <string_view>
12#include <vector>
13
14namespace gdk::graphics::animation {
16 struct bvh_content final {
17 skeleton rig;
18 clip animation;
19
21 float frame_time = 1.0f / 30.0f;
22 };
23
31 [[nodiscard]] bvh_content read_bvh(const std::string_view aText, const float aScale = 1.0f);
32
36 void write_bvh(std::ostream &aStream, const skeleton &aSkeleton, const clip &aClip,
37 const std::size_t aFrameCount, const float aFrameTime);
38}
39
40#endif
a skeleton and an animation read from a Biovision Hierarchy file.
Definition bvh.h:16
float frame_time
seconds per frame as declared by the file
Definition bvh.h:21
a looping sequence of keyframed poses
Definition skeleton.h:86
a chain of bones in bind pose.
Definition skeleton.h:16