MCPcopy Create free account
hub / github.com/URLab-Sim/UnrealRoboticsLab / Tick

Method Tick

Source/URLab/Private/MuJoCo/Core/AMjManager.cpp:494–522  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

492}
493
494void AAMjManager::Tick(float DeltaTime)
495{
496 Super::Tick(DeltaTime);
497
498 if (!PhysicsEngine || !PhysicsEngine->IsInitialized())
499 {
500 return;
501 }
502
503 const TArray<AMjArticulation*> Arts = PhysicsEngine->GetAllArticulations();
504 const TArray<UMjQuickConvertComponent*> Quicks = PhysicsEngine->GetAllQuickComponents();
505
506 PhysicsEngine->WithRenderState([&](const FMjRenderSnapshot& Snap) {
507 for (AMjArticulation* Art : Arts)
508 {
509 if (Art)
510 {
511 Art->ApplyRenderState(Snap);
512 }
513 }
514 for (UMjQuickConvertComponent* Quick : Quicks)
515 {
516 if (Quick)
517 {
518 Quick->ApplyRenderState(Snap);
519 }
520 }
521 });
522}
523
524AAMjManager* AAMjManager::GetManager()
525{

Callers

nothing calls this directly

Calls 5

WithRenderStateMethod · 0.80
IsInitializedMethod · 0.45
GetAllArticulationsMethod · 0.45
GetAllQuickComponentsMethod · 0.45
ApplyRenderStateMethod · 0.45

Tested by

no test coverage detected