Showing the changes to libraries/render-utils/src/AnimDebugDraw.cpp (1 of 14 files). Show all
Unified · Split
| @@ -168,7 +168,7 @@ static void addBone(const AnimPose& rootPose, const AnimPose& pose, float radius · 167 unmodified lines | ||
| 168 | 168 | const uint32_t color = toRGBA(vecColor); |
| 169 | 169 | |
| 170 | 170 | AnimPose finalPose = rootPose * pose; |
| 171 | − glm::vec3 base = rootPose * pose.trans; | |
| 171 | + glm::vec3 base = rootPose * pose.trans(); | |
| 172 | 172 | |
| 173 | 173 | glm::vec3 xRing[NUM_CIRCLE_SLICES + 1]; // one extra for last index. |
| 174 | 174 | glm::vec3 yRing[NUM_CIRCLE_SLICES + 1]; |
| @@ -245,7 +245,7 @@ static void addLink(const AnimPose& rootPose, const AnimPose& pose, const AnimPo · 70 unmodified lines | ||
| 245 | 245 | AnimPose pose0 = rootPose * parentPose; |
| 246 | 246 | AnimPose pose1 = rootPose * pose; |
| 247 | 247 | |
| 248 | − glm::vec3 boneAxisWorld = glm::normalize(pose1.trans - pose0.trans); | |
| 248 | + glm::vec3 boneAxisWorld = glm::normalize(pose1.trans() - pose0.trans()); | |
| 249 | 249 | glm::vec3 boneAxis0 = glm::normalize(pose0.inverse().xformVector(boneAxisWorld)); |
| 250 | 250 | glm::vec3 boneAxis1 = glm::normalize(pose1.inverse().xformVector(boneAxisWorld)); |
| 251 | 251 | |
| @@ -255,7 +255,7 @@ static void addLink(const AnimPose& rootPose, const AnimPose& pose, const AnimPo · 3 unmodified lines | ||
| 255 | 255 | const int NUM_BASE_CORNERS = 4; |
| 256 | 256 | |
| 257 | 257 | // make sure there's room between the two bones to draw a nice bone link. |
| 258 | − if (glm::dot(boneTip - pose0.trans, boneAxisWorld) > glm::dot(boneBase - pose0.trans, boneAxisWorld)) { | |
| 258 | + if (glm::dot(boneTip - pose0.trans(), boneAxisWorld) > glm::dot(boneBase - pose0.trans(), boneAxisWorld)) { | |
| 259 | 259 | |
| 260 | 260 | // there is room, so lets draw a nice bone |
| 261 | 261 | |
| @@ -290,10 +290,10 @@ static void addLink(const AnimPose& rootPose, const AnimPose& pose, const AnimPo · 28 unmodified lines | ||
| 290 | 290 | // just draw a line between the two bone centers. |
| 291 | 291 | // We add the same line multiple times, so the vertex count is correct. |
| 292 | 292 | for (int i = 0; i < NUM_BASE_CORNERS * 2; i++) { |
| 293 | − v->pos = pose0.trans; | |
| 293 | + v->pos = pose0.trans(); | |
| 294 | 294 | v->rgba = color; |
| 295 | 295 | v++; |
| 296 | − v->pos = pose1.trans; | |
| 296 | + v->pos = pose1.trans(); | |
| 297 | 297 | v->rgba = color; |
| 298 | 298 | v++; |
| 299 | 299 | } |
| @@ -365,7 +365,7 @@ void AnimDebugDraw::update() { · 65 unmodified lines | ||
| 365 | 365 | glm::vec4 color = std::get<3>(iter.second); |
| 366 | 366 | |
| 367 | 367 | for (int i = 0; i < skeleton->getNumJoints(); i++) { |
| 368 | − const float radius = BONE_RADIUS / (absPoses[i].scale.x * rootPose.scale.x); | |
| 368 | + const float radius = BONE_RADIUS / (absPoses[i].scale().x * rootPose.scale().x); | |
| 369 | 369 | |
| 370 | 370 | // draw bone |
| 371 | 371 | addBone(rootPose, absPoses[i], radius, color, v); |