mirror of
https://github.com/overte-org/overte.git
synced 2025-04-16 10:28:57 +02:00
fix errors and remove debug draw
This commit is contained in:
parent
04e57d0dd1
commit
fa44687de6
2 changed files with 2 additions and 16 deletions
|
@ -659,8 +659,8 @@ void Flow::updateAbsolutePoses(const AnimPoseVec& relativePoses, AnimPoseVec& ab
|
|||
for (auto &joint : _flowJointData) {
|
||||
int index = joint.second.getIndex();
|
||||
int parentIndex = joint.second.getParentIndex();
|
||||
if (index >= 0 && index < relativePoses.size() &&
|
||||
parentIndex >= 0 && parentIndex < absolutePoses.size()) {
|
||||
if (index >= 0 && index < (int)relativePoses.size() &&
|
||||
parentIndex >= 0 && parentIndex < (int)absolutePoses.size()) {
|
||||
absolutePoses[index] = absolutePoses[parentIndex] * relativePoses[index];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -727,20 +727,6 @@ void Avatar::postUpdate(float deltaTime, const render::ScenePointer& scene) {
|
|||
DebugDraw::getInstance().drawRay(rightEyePosition, rightEyePosition + rightEyeRotation * Vectors::UNIT_Z * EYE_RAY_LENGTH, RED);
|
||||
}
|
||||
}
|
||||
const bool DEBUG_FLOW = true;
|
||||
if (_skeletonModel->isLoaded() && DEBUG_FLOW) {
|
||||
Flow* flow = _skeletonModel->getRig().getFlow();
|
||||
auto joints = flow->getJoints();
|
||||
auto threads = flow->getThreads();
|
||||
for (auto &thread : threads) {
|
||||
auto& jointIndexes = thread._joints;
|
||||
for (size_t i = 1; i < jointIndexes.size(); i++) {
|
||||
auto index1 = jointIndexes[i - 1];
|
||||
auto index2 = jointIndexes[i];
|
||||
DebugDraw::getInstance().drawRay(joints[index1].getCurrentPosition(), joints[index2].getCurrentPosition(), glm::vec4(1.0f, 1.0f, 1.0f, 1.0f));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fixupModelsInScene(scene);
|
||||
updateFitBoundingBox();
|
||||
|
|
Loading…
Reference in a new issue