Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6126 in orxonox.OLD for branches


Ignore:
Timestamp:
Dec 15, 2005, 10:57:45 AM (19 years ago)
Author:
bensch
Message:

orxonox/OM: draw works with new interface

Location:
branches/objectmanager/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/objectmanager/src/lib/graphics/graphics_engine.cc

    r6011 r6126  
    1919#include "resource_manager.h"
    2020#include "event_handler.h"
     21
     22#include "world_entity.h"
    2123
    2224#include "render_2d.h"
     
    573575}
    574576
     577void GraphicsEngine::draw(const std::list<WorldEntity*>& drawList ) const
     578{
     579  std::list<WorldEntity*>::const_iterator entity;
     580  for (entity = drawList.begin(); entity != drawList.end(); entity++)
     581    if ((*entity)->isVisible())
     582      (*entity)->draw();
     583}
     584
     585
    575586/**
    576587 * displays the Frames per second
  • branches/objectmanager/src/lib/graphics/graphics_engine.h

    r5857 r6126  
    1515#include "glincl.h"
    1616
     17#include <list>
     18
    1719// Forward Declaration
    1820class Text;
    1921class IniParser;
    2022class SubString;
     23class WorldEntity;
    2124
    2225//! class to handle graphics
     
    6669    void tick(float dt);
    6770    void draw() const;
     71    void draw(const std::list<WorldEntity*>& drawList) const;
    6872    void displayFPS(bool display);
    6973
  • branches/objectmanager/src/story_entities/world.cc

    r6125 r6126  
    721721      this->gameTime += this->dtS;
    722722
     723
    723724      tIterator<WorldEntity>* iterator = this->entities->getIterator();
    724725      WorldEntity* entity = iterator->firstElement();
     
    805806void World::draw ()
    806807{
     808  GraphicsEngine* engine = GraphicsEngine::getInstance();
     809  engine->draw(State::getObjectManager()->getObjectList(OM_ENVIRON_NOTICK));
     810  engine->draw(State::getObjectManager()->getObjectList(OM_ENVIRON));
     811  engine->draw(State::getObjectManager()->getObjectList(OM_COMMON));
     812  engine->draw(State::getObjectManager()->getObjectList(OM_GROUP_00));
     813  engine->draw(State::getObjectManager()->getObjectList(OM_GROUP_01));
     814  engine->draw(State::getObjectManager()->getObjectList(OM_GROUP_01_PROJ));
     815 
     816 
    807817  /* draw entities */
    808818  WorldEntity* entity;
     
    825835    PNode::getNullParent()->debugDraw(0);
    826836
    827   GraphicsEngine::getInstance()->draw();
     837  engine->draw();
    828838  //TextEngine::getInstance()->draw();
    829839}
  • branches/objectmanager/src/util/object_manager.cc

    r6123 r6126  
    133133  if (omList != OM_INIT || omList == OM_SIZE)
    134134  {
    135     PRINT(0)(" +ObjectManager-LIST: '%s'-size='%d'-----\n", ObjectManager::OMListToString((OM_LIST)omList), this->objectLists[omList].size());
     135    PRINT(0)(" +ObjectManager-LIST: '%s'==size='%d'==---\n", ObjectManager::OMListToString((OM_LIST)omList), this->objectLists[omList].size());
    136136  //  if (level >= 1)
    137137    {
     
    144144  }
    145145  else
    146     PRINTF(2)("Invalid query. for OM_INIT-LIST\n");
     146    PRINTF(2)("Invalid query. for OM_INIT-LIST or OM_SIZE\n");
    147147}
    148148
  • branches/objectmanager/src/world_entities/weapons/guided_missile.cc

    r6123 r6126  
    153153  if (this->target != NULL && this->target->getParent() != PNode::getNullParent())
    154154   {
    155      printf("========%s::%s\n", target->getParent()->getClassName(), target->getParent()->getName() );
    156155     velocity += ((target->getAbsCoor() - this->getAbsCoor()).getNormalized())*agility;
    157156     float speed = velocity.len();
Note: See TracChangeset for help on using the changeset viewer.