fix iOS implementation for set_animation

This commit is contained in:
Nick Fisher
2022-12-19 16:34:29 +08:00
parent 2647e5afdf
commit db25fb4bf3
9 changed files with 114 additions and 591 deletions

View File

@@ -14,7 +14,7 @@ typedef struct ResourceBuffer ResourceBuffer;
struct BoneAnimation {
const char* const* const boneNames;
const char* const* const meshNames;
float* const data;
const float* const data;
size_t numBones;
size_t numMeshTargets;
};
@@ -56,9 +56,9 @@ void grab_end(void* viewer);
void set_animation(
void* asset,
float* const morphData,
const float* const morphData,
int numMorphWeights,
BoneAnimation* const boneAnimations,
const BoneAnimation* const boneAnimations,
int numBoneAnimations,
int numFrames,
float frameLengthInMs

View File

@@ -74,9 +74,9 @@ namespace polyvox {
/// [morphData] and [boneData] will both be copied, so remember to free these after calling this function.
///
void setAnimation(
float* morphData,
const float* const morphData,
int numMorphWeights,
BoneAnimation* targets,
const BoneAnimation* const targets,
int numBoneAnimations,
int numFrames,
float frameLengthInMs

View File

@@ -83,7 +83,7 @@ namespace polyvox {
unique_ptr<vector<BoneTransformTarget>> mTargets;
RuntimeAnimation(float* morphData,
RuntimeAnimation(const float* const morphData,
int numMorphWeights,
unique_ptr<vector<BoneTransformTarget>>& targets,
int numFrames,
@@ -107,4 +107,4 @@ namespace polyvox {
}
#endif
#endif