Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 14, 2006, 9:46:00 AM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: more performant Element2D'drawer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/render2D/element_2d.cc

    r8316 r8360  
    3434
    3535#include "shell_command.h"
    36 SHELL_COMMAND(debug, Element2D, debug2DSC);
     36SHELL_COMMAND(debug, Element2D, debug2D);
    3737
    3838
     
    10721072/**
    10731073 * @brief draws all the Elements from this element2D downwards
    1074  * @param layer the maximal Layer to draw. @see E2D_LAYER
     1074 * @param from the minimal Layer to draw. @see E2D_LAYER
     1075 * @param to the maximal Layer to draw. @see E2D_LAYER
     1076 *
    10751077 */
    10761078void Element2D::draw2D(E2D_LAYER from, E2D_LAYER to) const
    10771079{
    10781080  if (this->isVisible())
     1081  {
    10791082    this->draw();
    1080   if (this->children.size() > 0)
     1083    this->drawChildren(from, to);
     1084  }
     1085  else if ((parentMode & E2D_HIDE_CHILDREN_IF_HIDDEN) == 0)
     1086    this->drawChildren(from, to);
     1087}
     1088
     1089/**
     1090 * @brief Draws the Children of the Element2D node.
     1091 * @param param the minimal Layer to draw. @see E2D_LAYER
     1092 * @param to the maximal Layer to draw. @see E2D_LAYER
     1093 */
     1094void Element2D::drawChildren(E2D_LAYER from, E2D_LAYER to) const
     1095{
     1096  if (likely(this->children.size() > 0))
    10811097  {
    10821098    std::list<Element2D*>::const_iterator child;
     
    10861102  }
    10871103}
     1104
    10881105
    10891106/**
Note: See TracChangeset for help on using the changeset viewer.