Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 13, 2008, 3:45:19 PM (16 years ago)
Author:
rgrieder
Message:
  • merged ogre branch into merge branch
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/merge/src/orxonox/objects/WorldEntity.cc

    r1209 r1263  
    4545    unsigned int WorldEntity::worldEntityCounter_s = 0;
    4646
    47     WorldEntity::WorldEntity()
     47    WorldEntity::WorldEntity() :
     48      velocity_    (0, 0, 0),
     49      acceleration_(0, 0, 0),
     50      rotationAxis_(0, 1, 0),
     51      rotationRate_(0),
     52      momentum_    (0),
     53      node_        (0),
     54      bStatic_     (true)
    4855    {
    4956        RegisterObject(WorldEntity);
    50 
    51         //create();
    52 
    53         this->bStatic_ = true;
    54         this->velocity_ = Vector3(0, 0, 0);
    55         this->acceleration_ = Vector3(0, 0, 0);
    56         this->rotationAxis_ = Vector3(0, 1, 0);
    57         this->rotationRate_ = 0;
    58         this->momentum_ = 0;
    5957
    6058        if (GraphicsEngine::getSingleton().getSceneManager())
     
    6664
    6765          registerAllVariables();
    68         }
    69         else
    70         {
    71           this->node_ = 0;
    7266        }
    7367    }
     
    9488        BaseObject::loadParams(xmlElem);
    9589        create();
    96 /*
    97         if (xmlElem->Attribute("position"))
    98         {
    99             std::vector<std::string> pos = tokenize(xmlElem->Attribute("position"),",");
    100             float x, y, z;
    101             String2Number<float>(x, pos[0]);
    102             String2Number<float>(y, pos[1]);
    103             String2Number<float>(z, pos[2]);
    104             this->setPosition(x, y, z);
    105         }
    106 
    107         if (xmlElem->Attribute("direction"))
    108         {
    109             std::vector<std::string> pos = tokenize(xmlElem->Attribute("direction"),",");
    110             float x, y, z;
    111             String2Number<float>(x, pos[0]);
    112             String2Number<float>(y, pos[1]);
    113             String2Number<float>(z, pos[2]);
    114             this->setDirection(x, y, z);
    115         }
    116 
    117         if (xmlElem->Attribute("yaw") || xmlElem->Attribute("pitch") || xmlElem->Attribute("roll"))
    118         {
    119             float yaw = 0.0, pitch = 0.0, roll = 0.0;
    120             if (xmlElem->Attribute("yaw"))
    121                 String2Number<float>(yaw,xmlElem->Attribute("yaw"));
    122 
    123             if (xmlElem->Attribute("pitch"))
    124                 String2Number<float>(pitch,xmlElem->Attribute("pitch"));
    125 
    126             if (xmlElem->Attribute("roll"))
    127                 String2Number<float>(roll,xmlElem->Attribute("roll"));
    128 
    129             this->yaw(Degree(yaw));
    130             this->pitch(Degree(pitch));
    131             this->roll(Degree(roll));
    132         }
    133 
    134         if (xmlElem->Attribute("scale"))
    135         {
    136             std::string scaleStr = xmlElem->Attribute("scale");
    137             float scale;
    138             String2Number<float>(scale, scaleStr);
    139             this->setScale(scale);
    140         }
    141 
    142         if (xmlElem->Attribute("rotationAxis"))
    143         {
    144             std::vector<std::string> pos = tokenize(xmlElem->Attribute("rotationAxis"),",");
    145             float x, y, z;
    146             String2Number<float>(x, pos[0]);
    147             String2Number<float>(y, pos[1]);
    148             String2Number<float>(z, pos[2]);
    149             this->setRotationAxis(x, y, z);
    150         }
    151 
    152         if (xmlElem->Attribute("rotationRate"))
    153         {
    154             float rotationRate;
    155             String2Number<float>(rotationRate, xmlElem->Attribute("rotationRate"));
    156             this->setRotationRate(Degree(rotationRate));
    157             if (rotationRate != 0)
    158                 this->setStatic(false);
    159         }
    160 
    161         create();
    162 */
    16390    }
    16491
Note: See TracChangeset for help on using the changeset viewer.