Update glTF2Exporter.cpp

pull/2191/head
haroonq 2018-10-29 15:23:26 -07:00 committed by GitHub
parent bc80652ae9
commit 04c6d8347b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -974,7 +974,7 @@ inline void ExtractTranslationSampler(Asset& asset, std::string& animId, Ref<Buf
} }
std::vector<float> times(numKeyframes); std::vector<float> times(numKeyframes);
std::vector<vec3> values(numKeyframes * 3); std::vector<float> values(numKeyframes * 3);
for (unsigned int i = 0; i < numKeyframes; ++i) { for (unsigned int i = 0; i < numKeyframes; ++i) {
const aiVectorKey& key = nodeChannel->mPositionKeys[i]; const aiVectorKey& key = nodeChannel->mPositionKeys[i];
// mTime is measured in ticks, but GLTF time is measured in seconds, so convert. // mTime is measured in ticks, but GLTF time is measured in seconds, so convert.
@ -997,7 +997,7 @@ inline void ExtractScaleSampler(Asset& asset, std::string& animId, Ref<Buffer>&
} }
std::vector<float> times(numKeyframes); std::vector<float> times(numKeyframes);
std::vector<vec3> values(numKeyframes * 3); std::vector<float> values(numKeyframes * 3);
for (unsigned int i = 0; i < numKeyframes; ++i) { for (unsigned int i = 0; i < numKeyframes; ++i) {
const aiVectorKey& key = nodeChannel->mScalingKeys[i]; const aiVectorKey& key = nodeChannel->mScalingKeys[i];
// mTime is measured in ticks, but GLTF time is measured in seconds, so convert. // mTime is measured in ticks, but GLTF time is measured in seconds, so convert.
@ -1020,7 +1020,7 @@ inline void ExtractRotationSampler(Asset& asset, std::string& animId, Ref<Buffer
} }
std::vector<float> times(numKeyframes); std::vector<float> times(numKeyframes);
std::vector<vec4> values(numKeyframes * 4); std::vector<float> values(numKeyframes * 4);
for (unsigned int i = 0; i < numKeyframes; ++i) { for (unsigned int i = 0; i < numKeyframes; ++i) {
const aiQuatKey& key = nodeChannel->mRotationKeys[i]; const aiQuatKey& key = nodeChannel->mRotationKeys[i];
// mTime is measured in ticks, but GLTF time is measured in seconds, so convert. // mTime is measured in ticks, but GLTF time is measured in seconds, so convert.