Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 17, 2007, 3:20:46 AM (17 years ago)
Author:
landauf
Message:
  • changed output from std::cout to COUT(level)
  • added SoftDebugLevel config-variable (its a hack, but it works fine)
Location:
code/branches/FICN/src/orxonox/objects
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • code/branches/FICN/src/orxonox/objects/Ambient.cc

    r513 r560  
    3333#include "../../misc/Tokenizer.h"
    3434#include "../../misc/String2Number.h"
     35#include "../core/Debug.h"
    3536
    3637#include "Ambient.h"
     
    6465                mgr->setAmbientLight(ColourValue(r,g,b));
    6566
    66                 std::cout << "Loader: Set ambient light: "<<r<<" " << g << " " << b  << std::endl << std::endl;
     67                COUT(4) << "Loader: Set ambient light: "<<r<<" " << g << " " << b  << std::endl << std::endl;
    6768        }
    6869   }
  • code/branches/FICN/src/orxonox/objects/Camera.cc

    r515 r560  
    1111#include "../../misc/Tokenizer.h"
    1212#include "../../misc/String2Number.h"
     13#include "../core/Debug.h"
    1314
    1415#include "Camera.h"
     
    3031    {
    3132        Ogre::SceneManager* mgr = orxonox::Orxonox::getSingleton()->getSceneManager();
    32        
     33
    3334        if (xmlElem->Attribute("name") && xmlElem->Attribute("pos") && xmlElem->Attribute("lookat") && xmlElem->Attribute("node"))
    3435        {
    3536                //              <Camera name="Camera" pos="0,0,-250" lookat="0,0,0" />
    36                
     37
    3738                std::string name = xmlElem->Attribute("name");
    3839                std::string pos = xmlElem->Attribute("pos");
     
    5758
    5859                std::string node = xmlElem->Attribute("node");
    59                
     60
    6061                    Ogre::SceneNode* sceneNode = (Ogre::SceneNode*)mgr->getRootSceneNode()->getChild(node);
    6162                    sceneNode->attachObject((Ogre::MovableObject*)cam);
    62            
    63                
     63
     64
    6465                    Ogre::Viewport* vp = orxonox::Orxonox::getSingleton()->getOgrePointer()->getRoot()->getAutoCreatedWindow()->addViewport(cam);
    65                            
    6666
    67                 std::cout << "Loader: Created camera "<< name  << std::endl << std::endl;
    68         }       
     67
     68                COUT(4) << "Loader: Created camera "<< name  << std::endl << std::endl;
     69        }
    6970   }
    7071}
  • code/branches/FICN/src/orxonox/objects/Entity.cc

    r531 r560  
    66#include "../../misc/Tokenizer.h"
    77#include "../../misc/String2Number.h"
     8#include "../core/Debug.h"
    89
    910#include "Entity.h"
     
    2526    {
    2627        Ogre::SceneManager* mgr = orxonox::Orxonox::getSingleton()->getSceneManager();
    27        
     28
    2829        if (xmlElem->Attribute("name") && xmlElem->Attribute("src") && xmlElem->Attribute("node"))
    2930        {
     
    3132                std::string src = xmlElem->Attribute("src");
    3233                std::string node = xmlElem->Attribute("node");
    33                        
     34
    3435                        Ogre::Entity* entity = mgr->createEntity(name, src);
    3536
     
    3738                    sceneNode->attachObject((Ogre::MovableObject*)entity);
    3839
    39                 std::cout << "Loader: Created entity "<< name <<" with source " << src  << " at node " << node  << std::endl << std::endl;
    40         }       
     40                COUT(4) << "Loader: Created entity "<< name <<" with source " << src  << " at node " << node  << std::endl << std::endl;
     41        }
    4142   }
    42    
     43
    4344}
  • code/branches/FICN/src/orxonox/objects/SceneNode.cc

    r515 r560  
    66#include "../../misc/Tokenizer.h"
    77#include "../../misc/String2Number.h"
     8#include "../core/Debug.h"
    89
    910#include "SceneNode.h"
     
    2526    {
    2627        Ogre::SceneManager* mgr = orxonox::Orxonox::getSingleton()->getSceneManager();
    27        
     28
    2829        if (xmlElem->Attribute("name") && xmlElem->Attribute("pos"))
    2930        {
     
    3637                String2Number<float>(z, pos[2]);
    3738
    38                
     39
    3940                mgr->getRootSceneNode()->createChildSceneNode(name, Vector3(x,y,z));
    40                
    41                 std::cout << "Loader: Created node "<< name <<" : "<<x<<" " << y << " " << z  << std::endl << std::endl;
    42         }       
     41
     42                COUT(4) << "Loader: Created node "<< name <<" : "<<x<<" " << y << " " << z  << std::endl << std::endl;
     43        }
    4344   }
    4445}
  • code/branches/FICN/src/orxonox/objects/Skybox.cc

    r513 r560  
    3333#include "../../misc/Tokenizer.h"
    3434#include "../../misc/String2Number.h"
     35#include "../core/Debug.h"
    3536
    3637#include "Skybox.h"
     
    5859                mgr->setSkyBox(true, skyboxSrc);
    5960
    60                 std::cout << "Loader: Set skybox: "<< skyboxSrc << std::endl << std::endl;
     61                COUT(4) << "Loader: Set skybox: "<< skyboxSrc << std::endl << std::endl;
    6162        }
    6263   }
  • code/branches/FICN/src/orxonox/objects/SpaceshipSteeringObject.cc

    r519 r560  
    1111#include "../../misc/Tokenizer.h"
    1212#include "../../misc/String2Number.h"
     13#include "../core/Debug.h"
    1314
    1415#include "SpaceshipSteeringObject.h"
     
    3233    {
    3334        SpaceshipSteering* steering = orxonox::Orxonox::getSingleton()->getSteeringPointer();
    34        
     35
    3536        if (xmlElem->Attribute("node") && xmlElem->Attribute("forward") && xmlElem->Attribute("rotateupdown") && xmlElem->Attribute("rotaterightleft") && xmlElem->Attribute("looprightleft"))
    3637        {
     
    4647                String2Number<float>(rotaterightleft, rotaterightleftStr);
    4748                String2Number<float>(looprightleft, looprightleftStr);
    48            
     49
    4950                steering = new SpaceshipSteering(forward, rotateupdown, rotaterightleft, looprightleft);
    50                
     51
    5152                Ogre::SceneManager* mgr = orxonox::Orxonox::getSingleton()->getSceneManager();
    5253                    Ogre::SceneNode* sceneNode = (Ogre::SceneNode*)mgr->getRootSceneNode()->getChild(nodeStr);
    53                                        
     54
    5455                steering->addNode(sceneNode);
    55    
    56    
    57    
    58    
    59                 std::cout << "Loader: Initialized spaceship steering at node " << nodeStr << " values "<< forward << " " << rotateupdown << " "<< rotaterightleft << " "<< looprightleft << " "<< std::endl << std::endl;
    60         }       
     56
     57
     58
     59
     60                COUT(4) << "Loader: Initialized spaceship steering at node " << nodeStr << " values "<< forward << " " << rotateupdown << " "<< rotaterightleft << " "<< looprightleft << " "<< std::endl << std::endl;
     61        }
    6162   }
    6263}
Note: See TracChangeset for help on using the changeset viewer.