Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 586 for code


Ignore:
Timestamp:
Dec 17, 2007, 6:16:28 PM (17 years ago)
Author:
landauf
Message:

bump

Location:
code/branches/FICN/src/orxonox/objects
Files:
4 edited

Legend:

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

    r576 r586  
    1515    Mesh::Mesh(const std::string& file)
    1616    {
    17         std::cout << "blu_1\n";
     17        std::cout << "Mesh: 1\n";
    1818        std::ostringstream name;
    19         std::cout << "blu_2\n";
     19        std::cout << "Mesh: 2\n";
    2020        name << (Mesh::meshCounter_s++);
    21         std::cout << "blu_3\n";
    22         std::cout << ("Mesh" + name.str()) << std::endl;
    23         this->entity_ = Orxonox::getSingleton()->getSceneManager()->createEntity("Mesh" + name.str(), file);
    24         std::cout << "blu_4\n";
     21        std::cout << "Mesh: 3, entity before creation: " << this->entity_ << "\n";
     22        std::cout << ("Mesh: name: Mesh" + name.str()) << std::endl;
     23        std::cout << "Mesh: file: " << file << std::endl;
     24        this->entity_ = Orxonox::getSingleton()->getSceneManager()->createEntity("Mesh" + name.str() + "gugus", file);
     25        std::cout << "Mesh: 4, entity after creation: " << this->entity_ << "\n";
    2526    }
    2627
  • code/branches/FICN/src/orxonox/objects/Model.cc

    r583 r586  
    2323    void Model::loadParams(TiXmlElement* xmlElem)
    2424    {
     25std::cout << "### START PARSING MODEL" << std::endl;
    2526        WorldEntity::loadParams(xmlElem);
    2627
    27         std::cout << "10\n";
     28
     29std::cout << "Model: 1\n";
    2830        if (xmlElem->Attribute("mesh"))
    2931        {
    30         std::cout << "11_1\n";
     32std::cout << "Model: 2_1\n";
    3133                std::string src = xmlElem->Attribute("mesh");
    32         std::cout << "11_2\n";
    33         std::cout << this->mesh_.getEntity() << std::endl;
     34std::cout << "Model: 2_2\n";
     35std::cout << "Model: mesh before creation: " << &this->mesh_ << std::endl;
     36std::cout << "Model: entity before creation: " << this->mesh_.getEntity() << std::endl;
    3437                this->mesh_ = Mesh(src);
    35         std::cout << "11_3\n";
    36         std::cout << this->mesh_.getEntity() << std::endl;
    37                     this->attachObject(this->mesh_.getEntity());
    38         std::cout << "11_4\n";
    39         }
    40         std::cout << "12\n";
     38std::cout << "Model: 2_3\n";
     39std::cout << "Model: entity after creation: " << this->mesh_.getEntity() << std::endl;
     40std::cout << "Model: mesh after creation: " << &this->mesh_ << std::endl;
     41std::cout << "Model: node: " << this->getNode() << std::endl;
     42
     43//Entity *ent2 = Orxonox::getSingleton()->getSceneManager()->createEntity( "Robot2", "ogrehead.mesh" );
     44//SceneNode *node2 = mSceneMgr->getRootSceneNode()->createChildSceneNode( "RobotNode2", Vector3( 50, 0, 0 ) );
     45//node2->attachObject( ent2 );
     46//this->attachObject( ent2 );
     47//node2->attachObject( this->mesh_.getEntity() );
     48this->attachObject( this->mesh_.getEntity() );
     49
     50//                  this->attachObject(this->mesh_.getEntity());
     51std::cout << "Model: 2_4\n";
     52        }
     53std::cout << "Model: 3\n";
     54std::cout << "### FINISHED PARSING MODEL" << std::endl;
    4155
    4256        COUT(4) << "Loader: Created model" << std::endl;
  • code/branches/FICN/src/orxonox/objects/WorldEntity.cc

    r583 r586  
    4646        RegisterObject(WorldEntity);
    4747
    48         std::cout << "10_1\n";
     48        std::cout << "WE: const: 1_1\n";
    4949        if (Orxonox::getSingleton()->getSceneManager())
    5050        {
    51         std::cout << "10_2\n";
     51        std::cout << "WE: const: 1_2\n";
    5252            std::ostringstream name;
    5353            name << (WorldEntity::worldEntityCounter_s++);
    5454            this->setName("WorldEntity" + name.str());
    55             //node_ = Orxonox::getSingleton()->getSceneManager()->getRootSceneNode()->createChildSceneNode(this->getName());
    56             std::cout << "blubbbi: " << this->getName() << " .. " << this->node_ << std::endl;
     55            node_ = Orxonox::getSingleton()->getSceneManager()->getRootSceneNode()->createChildSceneNode(this->getName());
     56            std::cout << "WE: const: name: " << this->getName() << ", node: " << this->node_ << std::endl;
    5757        }
    58         std::cout << "10_3\n";
     58        std::cout << "WE: const: 1_3\n";
    5959
    6060        this->bStatic_ = true;
     
    8484    void WorldEntity::loadParams(TiXmlElement* xmlElem)
    8585    {
     86std::cout << "### START PARSING WE" << std::endl;
    8687        BaseObject::loadParams(xmlElem);
    8788
    88         std::cout << "1\n";
     89        std::cout << "WE: 1\n";
    8990        if (xmlElem->Attribute("name"))
    9091        {
    91         std::cout << "2\n";
     92        std::cout << "WE: 2\n";
    9293                this->setName(xmlElem->Attribute("mesh"));
    9394        }
    94         std::cout << "3\n";
     95        std::cout << "WE: 3\n";
    9596        if (xmlElem->Attribute("position"))
    9697        {
    97         std::cout << "4\n";
     98        std::cout << "WE: 4\n";
    9899                std::vector<std::string> pos = tokenize(xmlElem->Attribute("position"),",");
    99100                float x, y, z;
     
    103104                this->setPosition(x, y, z);
    104105        }
    105         std::cout << "5\n";
     106        std::cout << "WE: 5\n";
    106107        if (xmlElem->Attribute("direction"))
    107108        {
    108         std::cout << "6\n";
     109        std::cout << "WE: 6\n";
    109110                std::vector<std::string> pos = tokenize(xmlElem->Attribute("direction"),",");
    110111                float x, y, z;
     
    114115                this->setDirection(x, y, z);
    115116        }
    116         std::cout << "7\n";
     117        std::cout << "WE: 7\n";
    117118        if (xmlElem->Attribute("scale"))
    118119        {
    119         std::cout << "8\n";
     120        std::cout << "WE: 8\n";
    120121                    std::string scaleStr = xmlElem->Attribute("scale");
    121122                    float scale;
     
    123124                    this->setScale(scale);
    124125        }
    125         std::cout << "9\n";
     126        std::cout << "WE: 9\n";
     127std::cout << "### FINISHED PARSING WE" << std::endl;
    126128    }
    127129
  • code/branches/FICN/src/orxonox/objects/WorldEntity.h

    r583 r586  
    7878
    7979      inline void attachObject(Ogre::MovableObject *obj)
    80         { std::cout << "gux_1" << this->node_ << "\n"; this->node_->attachObject(obj); std::cout << "gux_2\n"; }
     80        { std::cout << "gux_1 " << this->node_ << " " << obj << "\n"; this->node_->attachObject(obj); std::cout << "gux_2\n"; }
    8181      inline void attachObject(Mesh &mesh)
    82         { std::cout << "gux_3" << this->node_ << "\n"; this->node_->attachObject((Ogre::MovableObject*)(mesh.getEntity())); std::cout << "gux_4\n"; }
     82        { std::cout << "gux_3 " << this->node_ << " " << &mesh << " " << mesh.getEntity() << "\n"; this->node_->attachObject(mesh.getEntity()); std::cout << "gux_4\n"; }
    8383      inline void detachObject(Ogre::MovableObject *obj)
    8484        { this->node_->detachObject(obj); }
Note: See TracChangeset for help on using the changeset viewer.