载入中...
搜索中...
未找到
AnimBatch.h
浏览该文件的文档.
1#pragma once
2#include "common/Export.h"
3
4#include <vector>
5
6namespace eve::animation {
7
8class AnimClip;
9class AnimPose;
10class AnimSkeleton;
11
14public:
16 AnimBatch() = default;
17
19 void add(AnimClip* clip, AnimSkeleton* skeleton, AnimPose* pose, float time, int lodLevel = 0);
21 void clear() { jobs_.clear(); }
23 int getCount() const { return static_cast<int>(jobs_.size()); }
25 void evaluate(int workerCount = 0);
27 int getLastWorkerCount() const { return lastWorkerCount_; }
28
29private:
30 struct Job {
31 AnimClip* clip = nullptr;
32 AnimSkeleton* skeleton = nullptr;
33 AnimPose* pose = nullptr;
34 float time = 0.f;
35 int lodLevel = 0;
36 };
37 std::vector<Job> jobs_;
38 int lastWorkerCount_ = 0;
39};
40
41} // namespace eve::animation
eve::EntitySpatialPose pose
#define EVENGINE_API_WORLD
Definition Export.h:109
glm::vec4 clip
Parallel batch evaluator for independent character clip poses. Script type: AnimBatch.
Definition AnimBatch.h:13
void clear()
Remove all queued jobs without deleting referenced objects.
Definition AnimBatch.h:21
AnimBatch()=default
Anim batch.
int getCount() const
Returns the count.
Definition AnimBatch.h:23
int getLastWorkerCount() const
Returns the last worker count.
Definition AnimBatch.h:27
Keyframed skeletal animation clip (local TRS tracks per bone). Script type: AnimClip.
Definition AnimClip.h:145
Evaluated local (and optional world) pose for an AnimSkeleton. Script type: AnimPose.
Definition AnimPose.h:17
3D bone hierarchy + bind-pose local TRS for skeletal animation. Independent of ik::Skeleton3D (FABRIK...