MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / processTick

Method processTick

Engine/source/T3D/camera.cpp:455–803  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

453//----------------------------------------------------------------------------
454
455void Camera::processTick(const Move* move)
456{
457 Parent::processTick(move);
458
459 if ( isMounted() )
460 {
461 // Update SceneContainer.
462 updateContainer();
463 return;
464 }
465
466 Point3F vec,pos;
467 if (move)
468 {
469 bool strafeMode = move->trigger[2];
470
471 // If using editor then force camera into fly mode, unless using EditOrbitMode
472 if(gEditingMission && mMode != FlyMode && mMode != EditOrbitMode)
473 setFlyMode();
474
475 // Massage the mode if we're in EditOrbitMode
476 CameraMotionMode virtualMode = mMode;
477 if(mMode == EditOrbitMode)
478 {
479 if(!mValidEditOrbitPoint)
480 {
481 virtualMode = FlyMode;
482 }
483 else
484 {
485 // Reset any Newton camera velocities for when we switch
486 // out of EditOrbitMode.
487 mNewtonRotation = false;
488 mVelocity.set(0.0f, 0.0f, 0.0f);
489 mAngularVelocity.set(0.0f, 0.0f, 0.0f);
490 }
491 }
492
493 // Update orientation
494 mDelta.rotVec = mRot;
495
496 VectorF rotVec(0, 0, 0);
497
498 bool doStandardMove = true;
499
500#ifdef TORQUE_EXTENDED_MOVE
501 GameConnection* con = getControllingClient();
502
503 // Work with an absolute rotation from the ExtendedMove class?
504 if(con && con->getControlSchemeAbsoluteRotation())
505 {
506 doStandardMove = false;
507 const ExtendedMove* emove = dynamic_cast<const ExtendedMove*>(move);
508 U32 emoveIndex = smExtendedMovePosRotIndex;
509 if(emoveIndex >= ExtendedMove::MaxPositionsRotations)
510 emoveIndex = 0;
511
512 if(emove->EulerBasedRotation[emoveIndex])

Callers

nothing calls this directly

Calls 15

getAnglesFromVectorFunction · 0.85
clampPitchAngleFunction · 0.85
getColumnMethod · 0.80
Point3FClass · 0.50
setMethod · 0.45
getRenderEyeTransformMethod · 0.45
getPositionMethod · 0.45
getCenterMethod · 0.45
getWorldBoxMethod · 0.45

Tested by

no test coverage detected