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

Method processTick

Engine/source/environment/VolumetricFog.cpp:690–730  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

688}
689
690void VolumetricFog::processTick(const Move* move)
691{
692 Parent::processTick(move);
693 mCounter++;
694 if ( mGlowing==1 && mCurGlow < mGlowStrength )
695 {
696 mCurGlow += (mGlowStrength / 10.0);
697 char buf[20];
698 dSprintf(buf, sizeof(buf), "%3.7f", mCurGlow);
699 Con::setVariable("$VolFogGlowPostFx::glowStrength", buf);
700 }
701 else if ( mGlowing == 2 && mCurGlow > 0.0f )
702 {
703 mCurGlow -= (mGlowStrength / 5.0f);
704 if (mCurGlow <= 0.0f)
705 {
706 glowFX->disable();
707 mGlowing = 0;
708 setProcessTick(false);
709 return;
710 }
711 else
712 {
713 char buf[20];
714 dSprintf(buf, sizeof(buf), "%3.7f", mCurGlow);
715 Con::setVariable("$VolFogGlowPostFx::glowStrength", buf);
716 }
717 }
718 if (mCounter == 3)
719 {
720 ShapeBase* control = dynamic_cast<ShapeBase*>(conn->getControlObject());
721 if (!control)
722 return;
723 MatrixF xfm;
724 control->getRenderEyeTransform(&xfm);
725 Point3F pos = xfm.getPosition();
726 if (!ColBox.isContained(pos))
727 _leaveFog(control);
728 mCounter = 0;
729 }
730}
731
732void VolumetricFog::_enterFog(ShapeBase *control)
733{

Callers

nothing calls this directly

Calls 7

dSprintfFunction · 0.85
setVariableFunction · 0.85
disableMethod · 0.45
getControlObjectMethod · 0.45
getRenderEyeTransformMethod · 0.45
getPositionMethod · 0.45
isContainedMethod · 0.45

Tested by

no test coverage detected