add implementation for setMorphWeights

This commit is contained in:
Nick Fisher
2023-06-22 13:38:17 +08:00
parent 6ec9fc2988
commit 555d1199a2
9 changed files with 196 additions and 164 deletions

View File

@@ -55,6 +55,8 @@ namespace polyvox {
int numMorphWeights,
int numFrames,
float frameLengthInMs);
void setMorphTargetWeights(EntityId entityId, const char* const entityName, const float* const weights, int count);
void playAnimation(EntityId e, int index, bool loop, bool reverse);
void stopAnimation(EntityId e, int index);
void setMorphTargetWeights(const char* const entityName, float *weights, int count);

View File

@@ -100,9 +100,11 @@ namespace polyvox {
private:
void createImageRenderable();
void loadResources(std::string relativeResourcePath);
void cleanup();
Manipulator<float>* _manipulator = nullptr;
void cleanup();
bool _panning = false;
float _startX;
float _startY;
math::mat4f _cameraPosition;
math::mat4f _cameraRotation;

View File

@@ -48,6 +48,14 @@ void apply_weights(
int count
);
void set_morph_target_weights(
void* assetManager,
EntityId asset,
const char *const entityName,
const float *const morphData,
int numWeights
);
bool set_morph_animation(
void* assetManager,
EntityId asset,

View File

@@ -44,7 +44,7 @@ public:
std::unique_lock<std::mutex> lock(access);
auto ret = pt.get_future();
tasks.push_back([pt=std::make_shared<packaged_task<Rt()>>(std::move(pt))]{ (*pt)();});
tasks.push_back([pt=std::make_shared<std::packaged_task<Rt()>>(std::move(pt))]{ (*pt)();});
cond.notify_one();