History

Avatar Debug Draw Default Pose now works

Anthony J. Thibault committed 10 years ago

Commit fe683ed1 parent 6cfd8314 files · +61 −73Browse files

Showing the changes to libraries/render-utils/src/AnimDebugDraw.cpp (1 of 4 files). Show all

Unified · Split

libraries/render-utils/src/AnimDebugDraw.cpp+0−42
@@ -349,17 +349,6 @@ void AnimDebugDraw::update() { · 348 unmodified lines
349 349
350 // AJT: FIX ME350 // AJT: FIX ME
351 /*351 /*
352 for (auto& iter : _skeletons) {
353 AnimSkeleton::ConstPointer& skeleton = std::get<0>(iter.second);
354 numVerts += skeleton->getNumJoints() * VERTICES_PER_BONE;
355 for (int i = 0; i < skeleton->getNumJoints(); i++) {
356 auto parentIndex = skeleton->getParentIndex(i);
357 if (parentIndex >= 0) {
358 numVerts += VERTICES_PER_LINK;
359 }
360 }
361 }
362
363 for (auto& iter : _animNodes) {352 for (auto& iter : _animNodes) {
364 AnimNode::ConstPointer& animNode = std::get<0>(iter.second);353 AnimNode::ConstPointer& animNode = std::get<0>(iter.second);
365 auto poses = animNode->getPosesInternal();354 auto poses = animNode->getPosesInternal();
@@ -407,37 +396,6 @@ void AnimDebugDraw::update() { · 41 unmodified lines
407 Vertex* verts = (Vertex*)data._vertexBuffer->editData();396 Vertex* verts = (Vertex*)data._vertexBuffer->editData();
408 Vertex* v = verts;397 Vertex* v = verts;
409 398
410 // AJT: fixme
411 // draw skeletons
412 /*
413 for (auto& iter : _skeletons) {
414 AnimSkeleton::ConstPointer& skeleton = std::get<0>(iter.second);
415 AnimPose rootPose = std::get<1>(iter.second);
416 int hipsIndex = skeleton->nameToJointIndex("Hips");
417 if (hipsIndex >= 0) {
418 rootPose.trans -= skeleton->getRelativeBindPose(hipsIndex).trans;
419 }
420 glm::vec4 color = std::get<2>(iter.second);
421
422 for (int i = 0; i < skeleton->getNumJoints(); i++) {
423 AnimPose pose = skeleton->getAbsoluteBindPose(i);
424
425 const float radius = BONE_RADIUS / (pose.scale.x * rootPose.scale.x);
426
427 // draw bone
428 addBone(rootPose, pose, radius, v);
429
430 // draw link to parent
431 auto parentIndex = skeleton->getParentIndex(i);
432 if (parentIndex >= 0) {
433 assert(parentIndex < skeleton->getNumJoints());
434 AnimPose parentPose = skeleton->getAbsoluteBindPose(parentIndex);
435 addLink(rootPose, pose, parentPose, radius, color, v);
436 }
437 }
438 }
439 */
440
441 // AJT: FIXME399 // AJT: FIXME
442 /*400 /*
443 // draw animNodes401 // draw animNodes

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t