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