| 353 | const ImU32 DotColor = IM_COL32(255, 210, 120, 255); |
| 354 | const ImVec2 Pad(5.0f, 2.0f); |
| 355 | |
| 356 | DrawList->PushClipRect(ViewportOrigin, ImVec2(ViewportOrigin.x + ViewportSize.x, ViewportOrigin.y + ViewportSize.y), true); |
| 357 | for (const SkeletonDebugDraw::FBoneLabel& Label : Labels) |
| 358 | { |
| 359 | const FVector4 Clip = ViewProj * FVector4(Label.WorldPosition, 1.0f); |
| 360 | if (Clip.w <= 1e-4f) |
| 361 | { |
| 362 | continue; |
| 363 | } |
| 364 | |
| 365 | const float NdcX = Clip.x / Clip.w; |
| 366 | const float NdcY = Clip.y / Clip.w; |
| 367 | const float ScreenX = (NdcX * 0.5f + 0.5f) * ViewportSize.x + ViewportOrigin.x; |
| 368 | const float ScreenY = (1.0f - (NdcY * 0.5f + 0.5f)) * ViewportSize.y + ViewportOrigin.y; |
| 369 | |
| 370 | const char* Text = *Label.Name; |
no test coverage detected