Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 27, 2009, 4:11:31 PM (16 years ago)
Author:
landauf
Message:

merged map branch back to trunk

Location:
code/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/orxonox/objects/worldentities/CameraPosition.cc

    r2826 r3089  
    3030#include "CameraPosition.h"
    3131
     32#include <OgreCamera.h>
     33
    3234#include "core/CoreIncludes.h"
    3335#include "core/XMLPort.h"
     
    4547        this->bAllowMouseLook_ = false;
    4648        this->bAbsolute_ = false;
     49        this->bRenderCamera_ = false;
    4750
    4851        this->setObjectMode(0x0);
     
    6063        XMLPortParam(CameraPosition, "mouselook", setAllowMouseLook, getAllowMouseLook, xmlelement, mode).defaultValues(false);
    6164        XMLPortParam(CameraPosition, "absolute", setIsAbsolute, getIsAbsolute, xmlelement, mode).defaultValues(false);
     65        XMLPortParam(CameraPosition, "rendercamera", setRenderCamera, getRenderCamera, xmlelement, mode).defaultValues(false);
    6266    }
    6367
     
    7276            camera->setDrag(true);
    7377    }
     78
     79    void CameraPosition::attachCamera(Ogre::Camera* camera)
     80    {
     81        this->attachOgreObject(camera);
     82    }
    7483}
  • code/trunk/src/orxonox/objects/worldentities/CameraPosition.h

    r2826 r3089  
    5959                { return this->bAbsolute_; }
    6060
     61            inline void setRenderCamera(bool bRenderCamera)
     62                { this->bRenderCamera_ = bRenderCamera; }
     63            inline bool getRenderCamera() const
     64                { return this->bRenderCamera_; }
     65
    6166            void attachCamera(Camera* camera);
     67            void attachCamera(Ogre::Camera* camera);
    6268
    6369        private:
     
    6571            bool bAllowMouseLook_;
    6672            bool bAbsolute_;
     73            bool bRenderCamera_;
    6774    };
    6875}
  • code/trunk/src/orxonox/objects/worldentities/ControllableEntity.cc

    r3084 r3089  
    6363        this->camera_ = 0;
    6464        this->xmlcontroller_ = 0;
     65        this->reverseCamera_ = 0;
    6566        this->bDestroyWhenPlayerLeft_ = false;
    6667        this->cameraPositionRootNode_ = this->node_->createChildSceneNode();
     
    143144                parent->attach(position);
    144145        }
    145         this->cameraPositions_.push_back(position);
     146
     147        if (!position->getRenderCamera())
     148            this->cameraPositions_.push_back(position);
     149        else
     150            this->setReverseCamera(position);
    146151    }
    147152
  • code/trunk/src/orxonox/objects/worldentities/ControllableEntity.h

    r3073 r3089  
    107107            inline const std::string& getCameraPositionTemkplate() const
    108108                { return this->cameraPositionTemplate_; }
     109
     110            inline void setReverseCamera(CameraPosition* camera)
     111                { this->reverseCamera_ = camera; }
     112            inline CameraPosition* getReverseCamera() const
     113                { return this->reverseCamera_; }
    109114
    110115            using WorldEntity::setPosition;
     
    192197            std::string cameraPositionTemplate_;
    193198            Controller* xmlcontroller_;
     199            CameraPosition* reverseCamera_;
    194200    };
    195201}
  • code/trunk/src/orxonox/objects/worldentities/pawns/Pawn.cc

    r3087 r3089  
    8686
    8787        this->registerVariables();
     88
     89        this->isHumanShip_ = this->hasLocalController();
    8890    }
    8991
     
    365367    }
    366368
     369    //Tell the Map (RadarViewable), if this is a playership
     370    void Pawn::startLocalHumanControl()
     371    {
     372//        SUPER(ControllableEntity, changedPlayer());
     373        ControllableEntity::startLocalHumanControl();
     374        this->isHumanShip_ = true;
     375    }
     376
    367377
    368378    ///////////////////
  • code/trunk/src/orxonox/objects/worldentities/pawns/Pawn.h

    r3087 r3089  
    112112            virtual void useItem()
    113113                { this->pickups_.useItem(); }
     114           
     115            virtual void startLocalHumanControl();
    114116
    115117        protected:
Note: See TracChangeset for help on using the changeset viewer.