Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 17, 2007, 8:23:26 PM (16 years ago)
Author:
scheusso
Message:

enhanced memory handling

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

Legend:

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

    r580 r590  
    3030        name_ = xmlElem->Attribute("name");
    3131        mesh_ = xmlElem->Attribute("src");
    32         std::string node = xmlElem->Attribute("node");
     32        node_ = xmlElem->Attribute("node");
    3333
    34         // get the node
    35         this->setNode(Orxonox::getSingleton()->getSceneManager()->getSceneNode(node));
    36 
    37        
    3834        // register variables to be synchronised
    3935        registerAllVariables();
     
    4137        create();
    4238
    43                 std::cout << "Loader: Created entity "<< name_ <<" with source " << mesh_  << " at node " << node  << std::endl << std::endl;
     39                std::cout << "Loader: Created entity "<< name_ <<" with source " << mesh_  << " at node " << node_  << std::endl << std::endl;
    4440        }
    4541   }
     
    4945     registerVar(&name_, name_.length()+1, network::STRING);
    5046     registerVar(&mesh_, mesh_.length()+1, network::STRING);
     47     registerVar(&node_, node_.length()+1, network::STRING);
    5148   }
    5249   
     
    5451     if(!valid)
    5552       return false;
     53     // get the node
     54     this->setNode(Orxonox::getSingleton()->getSceneManager()->getSceneNode(node_));
    5655     Ogre::SceneManager* mgr = orxonox::Orxonox::getSingleton()->getSceneManager();
    5756     
  • code/branches/FICN/src/orxonox/objects/BaseEntity.h

    r568 r590  
    2222      std::string name_;
    2323      std::string mesh_;
     24      std::string node_;
    2425    // other membervariables
    25       Ogre::SceneNode *sceneNode_;
     26      //Ogre::SceneNode *sceneNode_;
    2627      bool valid;
    2728  };
  • code/branches/FICN/src/orxonox/objects/SceneNode.cc

    r580 r590  
    7777        }
    7878   }
     79   
     80   void SceneNode::registerAllVariables(){
     81     
     82   }
     83   
     84   bool SceneNode::create(){
     85     return true;
     86   }
     87   
    7988}
  • code/branches/FICN/src/orxonox/objects/SceneNode.h

    r515 r590  
    44#include "BaseObject.h"
    55#include "../../tinyxml/tinyxml.h"
     6#include "network/Synchronisable.h"
    67
    78namespace orxonox
    89{
    9     class SceneNode : public BaseObject
     10    class SceneNode : public BaseObject, public network::Synchronisable
    1011    {
    1112        public:
    12             SceneNode();
    13             virtual ~SceneNode();
     13          SceneNode();
     14          virtual ~SceneNode();
    1415
    1516           
    16             void loadParams(TiXmlElement* xmlElem);
    17 
     17          void loadParams(TiXmlElement* xmlElem);
     18          bool create();
     19        protected:
     20          void registerAllVariables();
    1821        private:
    19            
     22          float x_, y_, z_;
     23          float sx_, sy_, sz_;
     24          float yaw_, pitch_, roll_;
     25          std::string node_;
    2026
    2127    };
Note: See TracChangeset for help on using the changeset viewer.