more Linux plugin work, separate out MorphAnimation and require entity name

This commit is contained in:
Nick Fisher
2023-02-14 16:11:21 +08:00
parent 20747f5cc8
commit 62ee3b2f89
12 changed files with 172 additions and 106 deletions

View File

@@ -61,10 +61,10 @@ namespace polyvox {
void playAnimation(int index, bool loop, bool reverse);
///
/// Manually set the weights for all morph targets in the assets to the provided values.
/// Set the weights for all [count] morph targets in this asset's entity named [inst] to [weights].
/// See [setAnimation] if you want to do the same across a number of frames (and extended to bone transforms).
///
void setMorphTargetWeights(float* weights, int count);
void setMorphTargetWeights(const char* const entityName, float* weights, int count);
///
/// Animates the asset's morph targets/bone transforms according to the frame weights/transforms specified in [morphData]/[boneData].
@@ -74,6 +74,7 @@ namespace polyvox {
/// [morphData] and [boneData] will both be copied, so remember to free these after calling this function.
///
void setAnimation(
const char* entityName,
const float* const morphData,
int numMorphWeights,
const BoneAnimation* const targets,
@@ -82,7 +83,6 @@ namespace polyvox {
float frameLengthInMs
);
void fillEntitiesByName(const char** name, int count, vector<Entity>& out);
size_t getBoneIndex(const char* name);
Entity getNode(const char* name);