Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 24, 2008, 12:24:30 AM (17 years ago)
Author:
FelixSchulthess
Message:

moved to spaceship what belonged there

Location:
code/trunk/src/orxonox/objects
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/objects/SpaceShip.cc

    r1399 r1400  
    112112        this->setConfigValues();
    113113
     114        initialDir_ = Vector3(1.0, 0.0, 0.0);
     115        currentDir_ = initialDir_;
     116        initialOrth_ = Vector3(0.0, 0.0, 1.0);
     117        currentOrth_ = initialOrth_;
    114118
    115119        this->setRotationAxis(1, 0, 0);
     
    247251      this->camNode_ = this->getNode()->createChildSceneNode(camName_);
    248252      COUT(4) << "position: (this)" << this->getNode()->getPosition() << std::endl;
    249       this->camNode_->setPosition(Vector3(-50,0,10));
     253      this->camNode_->setPosition(Vector3(0,0,0));//-50,0,10));
    250254//      Quaternion q1 = Quaternion(Radian(Degree(90)),Vector3(0,-1,0));
    251255//      Quaternion q2 = Quaternion(Radian(Degree(90)),Vector3(0,0,-1));
     
    395399    }
    396400
    397     Vector3 SpaceShip::getSPosition() {
    398         return SpaceShip::getLocalShip()->getPosition();
    399     }
    400 
    401     Quaternion SpaceShip::getSOrientation() {
    402         return SpaceShip::getLocalShip()->getOrientation();
     401    Vector3 SpaceShip::getDir() {
     402        return currentDir_;
     403    }
     404
     405    Vector3 SpaceShip::getOrth(){
     406        return currentOrth_;
    403407    }
    404408
     
    407411    void SpaceShip::tick(float dt)
    408412    {
     413        currentDir_ = getOrientation()*initialDir_;
     414                currentOrth_ = getOrientation()*initialOrth_;
     415
    409416        if (this->cam_)
    410417            this->cam_->tick(dt);
  • code/trunk/src/orxonox/objects/SpaceShip.h

    r1399 r1400  
    6464            void setTransDamp(float value);
    6565            void setRotDamp(float value);
     66            void getFocus();
    6667
    67             void getFocus();
    68             Camera* getCamera();
    6968            static SpaceShip* instance_s;
    70             static Vector3 getSPosition();
    71             static Quaternion getSOrientation();
    7269            static std::string whereAmI();
    7370            static void setMaxSpeedTest(float value)
     
    8178
    8279            float getMaxSpeed();
     80            Vector3 getDir();
     81            Vector3 getOrth();
     82            Camera* getCamera();
    8383
    8484        private:
     
    8686
    8787            Vector3 testvector_;
     88            Vector3 initialDir_;
     89            Vector3 currentDir_;
     90            Vector3 initialOrth_;
     91            Vector3 currentOrth_;
    8892            bool bInvertYAxis_;
    8993            bool setMouseEventCallback_;
Note: See TracChangeset for help on using the changeset viewer.