Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7843 in orxonox.OLD for trunk/src/lib/graphics/effects


Ignore:
Timestamp:
May 24, 2006, 11:17:59 PM (19 years ago)
Author:
bensch
Message:

compiles

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/effects/lense_flare.cc

    r7840 r7843  
    4141
    4242/**
    43  * default constructor
     43 * @brief default constructor
    4444 * @param root The XML-element to load the LenseFlare from
    4545 */
     
    128128
    129129/**
    130  * converts a gl mode char to a GLint
     130 * @brief converts a gl mode char to a GLint
    131131 * @param mode the mode character
    132132 */
     
    136136
    137137/**
    138  * adds a texture flare
     138 * @brief adds a texture flare
    139139 * @param textureName the name of the flare texture
    140140 *
     
    169169    bb->setVisibility(true);
    170170  }
     171
    171172  PRINTF(4)("Finished adding\n");
    172173}
     
    175176void LenseFlare::setSourceVisibility(bool visibility)
    176177{
    177   if (this->isVisible == visibility)
    178     return;
     178//   if (this->isVisible == visibility)
     179//     return;
    179180
    180181  float dist = this->frustumPlane.distancePoint(this->lightSource->getAbsCoor());
     
    205206    //set the frustum plane
    206207
    207   this->frustumPlane = State::getCamera()->getViewFrustum();
    208 
    209   if (State::getCamera()->distance(lightSource) < 0)
    210     this->setSourceVisibility(false);
    211   else
    212     this->setSourceVisibility(true);
     208//   this->frustumPlane = State::getCamera()->getViewFrustum();
     209//
     210//   if (State::getCamera()->distance(lightSource) < 0)
     211//     this->setSourceVisibility(false);
     212//   else
     213//     this->setSourceVisibility(true);
    213214
    214215
     
    233234    (*it)->setSize2D(50.0f * this->flareMatrix[i * 2 + 1], 50.0f * this->flareMatrix[i * 2 + 1]);
    234235    PRINTF(5)("Tick flare %i @ (%f, %f)\n", i, (*it)->getAbsCoor2D().x, (*it)->getAbsCoor2D().y);
    235     // tick them
    236     (*it)->tick(dt);
    237236  }
    238237}
Note: See TracChangeset for help on using the changeset viewer.