Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 24, 2008, 1:49:54 PM (17 years ago)
Author:
rgrieder
Message:
  • reverted the HUD changes to ease up back merge from network branch

@everyone: please commit to the network branch from now on if it concerns the presentation.
Oli has also created a folder for the presentation files.
@fabian: you are excluded

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

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/objects/Camera.h

    r1399 r1407  
    5050        void setTargetNode(Ogre::SceneNode* obj);
    5151
    52         Ogre::Camera* cam_;
    53 
    5452        void tick(float dt);
    5553        void update();
     
    6563        Ogre::SceneNode* cameraNode_;
    6664        Ogre::Vector3 oldPos;
     65        Ogre::Camera* cam_;
    6766        bool bHasFocus_;
    6867    };
  • code/trunk/src/orxonox/objects/SpaceShip.cc

    r1401 r1407  
    6969      return NULL;
    7070    }
    71 
     71   
    7272    SpaceShip::SpaceShip() :
    7373      //testvector_(0,0,0),
     
    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_;
    118114
    119115        this->setRotationAxis(1, 0, 0);
     
    241237        CameraHandler::getInstance()->requestFocus(cam_);
    242238
    243     }
    244 
    245     Camera* SpaceShip::getCamera(){
    246         return cam_;
    247239    }
    248240
     
    399391    }
    400392
    401     Vector3 SpaceShip::getDir() {
    402         return currentDir_;
    403     }
    404 
    405     Vector3 SpaceShip::getOrth(){
    406         return currentOrth_;
     393    Vector3 SpaceShip::getSPosition() {
     394        return SpaceShip::getLocalShip()->getPosition();
     395    }
     396
     397    Quaternion SpaceShip::getSOrientation() {
     398        return SpaceShip::getLocalShip()->getOrientation();
    407399    }
    408400
     
    411403    void SpaceShip::tick(float dt)
    412404    {
    413         currentDir_ = getOrientation()*initialDir_;
    414                 currentOrth_ = getOrientation()*initialOrth_;
    415 
    416405        if (this->cam_)
    417406            this->cam_->tick(dt);
     
    433422        if (this->bLMousePressed_ && this->timeToReload_ <= 0)
    434423        {
    435 
     424         
    436425            Projectile *p = new Projectile(this);
    437 
     426           
    438427            p->setBacksync(true);
    439428            this->timeToReload_ = this->reloadTime_;
  • code/trunk/src/orxonox/objects/SpaceShip.h

    r1400 r1407  
    4444    {
    4545        public:
    46 
     46         
    4747            static SpaceShip *getLocalShip();
    48 
     48           
    4949            SpaceShip();
    5050            ~SpaceShip();
     
    6464            void setTransDamp(float value);
    6565            void setRotDamp(float value);
     66
    6667            void getFocus();
    67 
    6868            static SpaceShip* instance_s;
     69            static Vector3 getSPosition();
     70            static Quaternion getSOrientation();
    6971            static std::string whereAmI();
    7072            static void setMaxSpeedTest(float value)
     
    7880
    7981            float getMaxSpeed();
    80             Vector3 getDir();
    81             Vector3 getOrth();
    82             Camera* getCamera();
    8382
    8483        private:
     
    8685
    8786            Vector3 testvector_;
    88             Vector3 initialDir_;
    89             Vector3 currentDir_;
    90             Vector3 initialOrth_;
    91             Vector3 currentOrth_;
    9287            bool bInvertYAxis_;
    9388            bool setMouseEventCallback_;
Note: See TracChangeset for help on using the changeset viewer.