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

Method processTick

Engine/source/T3D/camera.cpp:454–802  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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