Covellite++
Version: 2.3.2 Revision: 2584 Platform: x64 Build: 19:03 05.09.2026
Кроссплатформенный фреймворк для разработки приложений на С++
Toggle main menu visibility
Загрузка...
Поиск...
Не найдено
Animation.hpp
1
2
#pragma once
3
#include <string>
4
#include <vector>
5
#include <glm/glm.force.hpp>
6
#include <alicorn/std.fast/unordered-map.hpp>
7
#include <Covellite/Covellite.hpp>
8
9
namespace
basement
10
{
11
12
namespace
model
13
{
14
15
namespace
animation
16
{
17
33
class
Bone
final
34
{
35
public
:
36
using
Index_t = ::std::size_t;
37
static
const
Index_t iNonexistent =
static_cast<
Bone::Index_t
>
(-1);
38
39
public
:
40
::std::string Name;
41
Index_t iParent;
42
::glm::mat4 Global;
43
::glm::mat4 Local;
44
};
45
64
using
Skeleton_t
= ::std::vector<Bone>;
65
81
class
SkinVertex
final
82
{
83
using
iVertex_t = ::std::size_t;
84
85
public
:
86
::glm::vec4 Position;
87
::glm::vec4 Normal;
88
::std::vector<iVertex_t> iCompleteVertexes;
89
::std::vector<::std::pair<Bone::Index_t, float>> WeightBones;
90
};
91
110
using
Skin_t
= ::std::vector<SkinVertex>;
111
112
class
Mat4 final
113
{
114
public
:
115
// Это нужно для того, чтобы для несуществующих компонентов анимации
116
// возвращались единичные матрицы.
117
::glm::mat4 Value = ::glm::mat4{ 1.0f };
118
};
119
138
using
Frames_t
= ::std::vector<::std::pair<float,
139
::alicorn::extension::std::fast::unordered_map<::std::string, Mat4>>>;
140
141
}
// namespace animation
142
158
class
Animation final
159
{
160
using
Frame_t = ::std::vector<::glm::mat4>;
161
using
ComponentPtr_t = ::std::shared_ptr<::covellite::api::Component>;
162
163
public
:
164
::std::size_t GetFrameIndex(
const
float
)
const
;
165
Frame_t GetFrame(const ::std::size_t,
const
animation::Skeleton_t
&)
const
;
166
167
private
:
168
::glm::mat4 Get(::std::size_t, const ::std::string &)
const
;
169
170
private
:
171
const
float
m_TicksPerSecond;
172
const
animation::Frames_t
m_RawFrames;
173
mutable ::std::vector<Frame_t> m_Frames;
174
175
public
:
176
Animation(
const
float
,
const
animation::Frames_t
&);
177
};
178
179
}
// namespace model
180
181
}
// namespace basement
basement::model::animation::Skeleton_t
::std::vector< Bone > Skeleton_t
Класс входит в проект Example Тип данных скелета.
Определения
Animation.hpp:64
basement::model::animation::Frames_t
::std::vector<::std::pair< float, ::alicorn::extension::std::fast::unordered_map<::std::string, Mat4 > > > Frames_t
Класс входит в проект Example Тип данных набора кадров одной анимации.
Определения
Animation.hpp:138
basement::model::animation::Skin_t
::std::vector< SkinVertex > Skin_t
Класс входит в проект Example Тип данных набора вершин анимированной модели.
Определения
Animation.hpp:110
basement
Определения
Common.hpp:10
basement::model::animation::Bone
Класс входит в проект Example Класс информации об одной кости скелета анимированной модели.
Определения
Animation.hpp:34
basement::model::animation::SkinVertex
Класс входит в проект Example Класс исходных данных об одной вершине анимированной модели.
Определения
Animation.hpp:82
Solution
Solution
Example
Example
Basements
Demo
Animation.hpp
Документация по Covellite++. Последние изменения:
. Создано системой
1.18.0