| 688 | } |
| 689 | |
| 690 | void 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 | |
| 732 | void VolumetricFog::_enterFog(ShapeBase *control) |
| 733 | { |
nothing calls this directly
no test coverage detected