Showing the changes to interface/src/avatar/SkeletonModel.cpp (1 of 12 files). Show all
Unified · Split
| @@ -375,13 +375,15 @@ void SkeletonModel::renderJointConstraints(gpu::Batch& batch, int jointIndex) { · 374 unmodified lines | |||
| 375 | 375 | ||
| 376 | } | 376 | } |
| 377 | 377 | ||
| 378 | renderOrientationDirections(jointIndex, position, _rotation * jointState.getRotation(), directionSize); | 378 | renderOrientationDirections(batch, jointIndex, position, _rotation * jointState.getRotation(), directionSize); |
| 379 | jointIndex = joint.parentIndex; | 379 | jointIndex = joint.parentIndex; |
| 380 | 380 | ||
| 381 | } while (jointIndex != -1 && geometry.joints.at(jointIndex).isFree); | 381 | } while (jointIndex != -1 && geometry.joints.at(jointIndex).isFree); |
| 382 | } | 382 | } |
| 383 | 383 | ||
| 384 | void SkeletonModel::renderOrientationDirections(int jointIndex, glm::vec3 position, const glm::quat& orientation, float size) { | 384 | void SkeletonModel::renderOrientationDirections(gpu::Batch& batch, int jointIndex, |
| 385 | glm::vec3 position, const glm::quat& orientation, float size) { | ||
| 386 | |||
| 385 | auto geometryCache = DependencyManager::get<GeometryCache>(); | 387 | auto geometryCache = DependencyManager::get<GeometryCache>(); |
| 386 | 388 | ||
| 387 | if (!_jointOrientationLines.contains(jointIndex)) { | 389 | if (!_jointOrientationLines.contains(jointIndex)) { |
| @@ -398,13 +400,13 @@ void SkeletonModel::renderOrientationDirections(int jointIndex, glm::vec3 positi · 10 unmodified lines | |||
| 398 | glm::vec3 pFront = position + orientation * IDENTITY_FRONT * size; | 400 | glm::vec3 pFront = position + orientation * IDENTITY_FRONT * size; |
| 399 | 401 | ||
| 400 | glm::vec3 red(1.0f, 0.0f, 0.0f); | 402 | glm::vec3 red(1.0f, 0.0f, 0.0f); |
| 401 | geometryCache->renderLine(position, pRight, red, jointLineIDs._right); | 403 | geometryCache->renderLine(batch, position, pRight, red, jointLineIDs._right); |
| 402 | 404 | ||
| 403 | glm::vec3 green(0.0f, 1.0f, 0.0f); | 405 | glm::vec3 green(0.0f, 1.0f, 0.0f); |
| 404 | geometryCache->renderLine(position, pUp, green, jointLineIDs._up); | 406 | geometryCache->renderLine(batch, position, pUp, green, jointLineIDs._up); |
| 405 | 407 | ||
| 406 | glm::vec3 blue(0.0f, 0.0f, 1.0f); | 408 | glm::vec3 blue(0.0f, 0.0f, 1.0f); |
| 407 | geometryCache->renderLine(position, pFront, blue, jointLineIDs._front); | 409 | geometryCache->renderLine(batch, position, pFront, blue, jointLineIDs._front); |
| 408 | } | 410 | } |
| 409 | 411 | ||
| 410 | 412 | ||