Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 11025


Ignore:
Timestamp:
Jan 3, 2016, 2:39:10 PM (8 years ago)
Author:
landauf
Message:

tabs → spaces

Location:
code/branches/presentationHS15/src
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentationHS15/src/modules/hover/CMakeLists.txt

    r10960 r11025  
    1313  FIND_HEADER_FILES
    1414  LINK_LIBRARIES
    15         objects
     15    objects
    1616    orxonox
    1717    overlays
  • code/branches/presentationHS15/src/modules/hover/FlagHUD.h

    r10960 r11025  
    4949        virtual ~FlagHUD();
    5050
    51         virtual void tick(float dt);
     51        virtual void tick(float dt);
    5252        virtual void changedOwner();
    5353
  • code/branches/presentationHS15/src/modules/hover/HoverShip.h

    r10960 r11025  
    4747    {
    4848    private:
    49         float jumpBoost_;
    50         bool isFloor_;
     49        float jumpBoost_;
     50        bool isFloor_;
    5151
    5252        public:
     
    5959            virtual void setJumpBoost(float jumpBoost);
    6060
    61                 virtual float getJumpBoost();
     61            virtual float getJumpBoost();
    6262
    63                     virtual void moveFrontBack(const Vector2& value);
     63            virtual void moveFrontBack(const Vector2& value);
    6464
    65                     virtual void moveRightLeft(const Vector2& value);
     65            virtual void moveRightLeft(const Vector2& value);
    6666
    67                     virtual void moveUpDown(const Vector2& value);
     67            virtual void moveUpDown(const Vector2& value);
    6868
    69                     virtual void rotateYaw(const Vector2& value);
     69            virtual void rotateYaw(const Vector2& value);
    7070
    71                     virtual void rotatePitch(const Vector2& value);
    72                    
    73                     virtual void rotateRoll(const Vector2& value);
     71            virtual void rotatePitch(const Vector2& value);
    7472
    75                     virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint);
     73            virtual void rotateRoll(const Vector2& value);
    7674
    77                     virtual void boost(bool bBoost);
     75            virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint);
    7876
    79         };
     77            virtual void boost(bool bBoost);
     78
     79    };
    8080}
    8181
  • code/branches/presentationHS15/src/modules/objects/Turret.h

    r10622 r11025  
    103103
    104104            inline void setRotationThrust(float rotationthrust)
    105                 { this->rotationThrust_ = rotationthrust; }
     105                { this->rotationThrust_ = rotationthrust; }
    106106
    107107            inline float getRotationThrust()
    108                 { return this->rotationThrust_; }
     108                { return this->rotationThrust_; }
    109109
    110110        protected:
  • code/branches/presentationHS15/src/modules/towerdefense/TowerDefenseSelecter.cc

    r10629 r11025  
    8888            {
    8989                moveDownPressed_ = false;
    90                 selectedPos_->Set(selecterPosX, selecterPosY - 1);
     90                selectedPos_->Set(selecterPosX, selecterPosY - 1);
    9191                updatePosition();
    9292            }
     
    100100            {
    101101                moveRightPressed_ = false;
    102                 selectedPos_->Set(selecterPosX + 1, selecterPosY);
     102                selectedPos_->Set(selecterPosX + 1, selecterPosY);
    103103                updatePosition();
    104104            }
  • code/branches/presentationHS15/src/orxonox/controllers/DivisionController.h

    r10974 r11025  
    4545        public:
    4646            //----[language demanded functions]----           
    47                 DivisionController(Context* context);
     47                DivisionController(Context* context);
    4848
    49                 virtual ~DivisionController();
     49                virtual ~DivisionController();
    5050            //----[/language demanded functions]----           
    5151
  • code/branches/presentationHS15/src/orxonox/controllers/FightingController.cc

    r10974 r11025  
    4747    FightingController::FightingController( Context* context ): FlyingController( context )
    4848    {
    49         this->attackRange_ = 2500;
     49        this->attackRange_ = 2500;
    5050        this->stopLookingAtTarget();
    5151        this->bSetupWorked = false;
  • code/branches/presentationHS15/src/orxonox/worldentities/ExplosionPart.cc

    r10962 r11025  
    3636{
    3737
    38         RegisterClass(ExplosionPart);
    39 
    40         ExplosionPart::ExplosionPart(Context* context) : MovableEntity(context)
    41         {
    42                 RegisterObject(ExplosionPart);
    43                 this->bStop_ = false;
     38    RegisterClass(ExplosionPart);
     39
     40    ExplosionPart::ExplosionPart(Context* context) : MovableEntity(context)
     41    {
     42        RegisterObject(ExplosionPart);
     43        this->bStop_ = false;
    4444        this->LOD_ = LODParticle::Normal;
    45                 this->mesh_ = "";
    46                 this->effect1_ = "";
    47                 this->effect2_ = "";
    48                 this->model_= new Model(this->getContext());
    49                 this->effect1Particle_= NULL;
    50                 this->effect2Particle_= NULL;
    51                 this->explosionEntity_ = new MovableEntity(this->getContext());
    52                 this->posOffset_ = Vector3::ZERO;
    53 
    54 
    55 
    56         }
    57 
    58 
    59         ExplosionPart::~ExplosionPart()
     45        this->mesh_ = "";
     46        this->effect1_ = "";
     47        this->effect2_ = "";
     48        this->model_= new Model(this->getContext());
     49        this->effect1Particle_= NULL;
     50        this->effect2Particle_= NULL;
     51        this->explosionEntity_ = new MovableEntity(this->getContext());
     52        this->posOffset_ = Vector3::ZERO;
     53
     54
     55
     56    }
     57
     58
     59    ExplosionPart::~ExplosionPart()
    6060    {
    6161        if (this->isInitialized())
     
    7575
    7676
    77         void ExplosionPart::XMLPort(Element& xmlelement, XMLPort::Mode mode)
    78         {
    79                 SUPER(ExplosionPart, XMLPort, xmlelement, mode);
    80 
    81                 XMLPortParam(ExplosionPart, "mesh", setMesh, getMesh, xmlelement, mode).defaultValues(""); //Define mesh file, that is going to fly out
    82                 XMLPortParam(ExplosionPart, "minspeed", setMinSpeed, getMinSpeed, xmlelement, mode).defaultValues(50); //Minimum velocity at which parts fly out
    83                 XMLPortParam(ExplosionPart, "maxspeed", setMaxSpeed, getMaxSpeed, xmlelement, mode).defaultValues(100); //Maximum velocity at which parts fly out, set both minspeed and maxspeed to 0 to have stationary effects
    84                 XMLPortParam(ExplosionPart, "effect1", setEffect1, getEffect1, xmlelement, mode).defaultValues(""); //particle effect 1
    85                 XMLPortParam(ExplosionPart, "effect2", setEffect2, getEffect2, xmlelement, mode).defaultValues(""); //particle effect 2
    86                 XMLPortParam(ExplosionPart, "offset", setOffset, getOffset, xmlelement, mode).defaultValues(Vector3::ZERO); //Offset of the position if you need to have an explosion off-center
    87                 XMLPortParam(ExplosionPart, "direction", setDirection, getDirection, xmlelement, mode).defaultValues(Vector3(1,1,1)); //general direction the parts fly in
    88                 XMLPortParam(ExplosionPart, "angle", setAngle, getAngle, xmlelement, mode).defaultValues(180); //defines a cone shape with direction "direction" and angle "angle" inside which the parts fly out of
    89                 XMLPortParam(ExplosionPart, "delay", setDelay, getDelay, xmlelement, mode).defaultValues(0); //delay to the explosion in seconds
    90         }
    91 
    92 
    93         void ExplosionPart::Explode()
    94         {
    95                 this->destroyTimer_.setTimer(delay_, false, createExecutor(createFunctor(&ExplosionPart::ActuallyExplode, this)));
    96         }
    97 
    98         void ExplosionPart::stop()
    99         {
    100                 if (this->effect1Particle_)
     77    void ExplosionPart::XMLPort(Element& xmlelement, XMLPort::Mode mode)
     78    {
     79        SUPER(ExplosionPart, XMLPort, xmlelement, mode);
     80
     81        XMLPortParam(ExplosionPart, "mesh", setMesh, getMesh, xmlelement, mode).defaultValues(""); //Define mesh file, that is going to fly out
     82        XMLPortParam(ExplosionPart, "minspeed", setMinSpeed, getMinSpeed, xmlelement, mode).defaultValues(50); //Minimum velocity at which parts fly out
     83        XMLPortParam(ExplosionPart, "maxspeed", setMaxSpeed, getMaxSpeed, xmlelement, mode).defaultValues(100); //Maximum velocity at which parts fly out, set both minspeed and maxspeed to 0 to have stationary effects
     84        XMLPortParam(ExplosionPart, "effect1", setEffect1, getEffect1, xmlelement, mode).defaultValues(""); //particle effect 1
     85        XMLPortParam(ExplosionPart, "effect2", setEffect2, getEffect2, xmlelement, mode).defaultValues(""); //particle effect 2
     86        XMLPortParam(ExplosionPart, "offset", setOffset, getOffset, xmlelement, mode).defaultValues(Vector3::ZERO); //Offset of the position if you need to have an explosion off-center
     87        XMLPortParam(ExplosionPart, "direction", setDirection, getDirection, xmlelement, mode).defaultValues(Vector3(1,1,1)); //general direction the parts fly in
     88        XMLPortParam(ExplosionPart, "angle", setAngle, getAngle, xmlelement, mode).defaultValues(180); //defines a cone shape with direction "direction" and angle "angle" inside which the parts fly out of
     89        XMLPortParam(ExplosionPart, "delay", setDelay, getDelay, xmlelement, mode).defaultValues(0); //delay to the explosion in seconds
     90    }
     91
     92
     93    void ExplosionPart::Explode()
     94    {
     95        this->destroyTimer_.setTimer(delay_, false, createExecutor(createFunctor(&ExplosionPart::ActuallyExplode, this)));
     96    }
     97
     98    void ExplosionPart::stop()
     99    {
     100        if (this->effect1Particle_)
    101101            this->effect1Particle_->setEnabled(false);
    102102        if (this->effect2Particle_)
     
    110110            this->destroyTimer_.setTimer(1.0f, false, createExecutor(createFunctor(&ExplosionPart::destroy, this)));
    111111        }
    112         }
    113 
    114         void ExplosionPart::ActuallyExplode()
    115         {
    116                 this->model_->setVisible(true);
    117 
    118                 //this->explosionEntity_->setSyncMode(0);
    119 
    120                 //this->model_->setSyncMode(0);
    121 
    122 
    123                 if(effect1_ != "")
    124                 {
    125                         this->effect1Particle_ = new ParticleInterface(this->getScene()->getSceneManager(), effect1_, this->LOD_);
    126                         this->effect1Particle_->setDimensions(this->getScale());
    127                         this->model_->attachOgreObject(this->effect1Particle_->getParticleSystem());
    128                 }
    129 
    130                 if(effect2_ != "")
    131                 {
    132                         this->effect2Particle_ = new ParticleInterface(this->getScene()->getSceneManager(), effect2_, this->LOD_);
    133                         this->effect2Particle_->setDimensions(this->getScale());
    134                         this->model_->attachOgreObject(this->effect2Particle_->getParticleSystem());
    135                 }
    136 
    137 
    138 
    139                
     112    }
     113
     114    void ExplosionPart::ActuallyExplode()
     115    {
     116        this->model_->setVisible(true);
     117
     118        //this->explosionEntity_->setSyncMode(0);
     119
     120        //this->model_->setSyncMode(0);
     121
     122
     123        if(effect1_ != "")
     124        {
     125            this->effect1Particle_ = new ParticleInterface(this->getScene()->getSceneManager(), effect1_, this->LOD_);
     126            this->effect1Particle_->setDimensions(this->getScale());
     127            this->model_->attachOgreObject(this->effect1Particle_->getParticleSystem());
     128        }
     129
     130        if(effect2_ != "")
     131        {
     132            this->effect2Particle_ = new ParticleInterface(this->getScene()->getSceneManager(), effect2_, this->LOD_);
     133            this->effect2Particle_->setDimensions(this->getScale());
     134            this->model_->attachOgreObject(this->effect2Particle_->getParticleSystem());
     135        }
     136
     137
     138
     139
    140140        Vector3 velocityOffset = direction_.perpendicular();
    141141        velocityOffset.normalise();
     
    147147        Vector3 finalDirection = direction_ + sin((rnd(0, angle_))*M_PI/180)*velocityOffset;
    148148
    149                 this->explosionEntity_->setVelocity(finalDirection*rnd(minSpeed_,maxSpeed_));
     149        this->explosionEntity_->setVelocity(finalDirection*rnd(minSpeed_,maxSpeed_));
    150150        this->explosionEntity_->setAngularVelocity(Vector3(rnd(-1, 1), rnd(-1, 1), rnd(-1, 1)).normalisedCopy() * Degree(400).valueRadians());
    151151        this->explosionEntity_->setScale(this->getScale() * 4);
     
    161161            this->destroyTimer_.setTimer(rnd(2, 4), false, createExecutor(createFunctor(&ExplosionPart::stop, this)));
    162162        }
    163         }
    164 
    165 
    166 
    167 
    168         void ExplosionPart::setMesh(const std::string& newString)
    169         {
    170                 if(newString != "")
    171                 {
    172                         this->mesh_ = newString;
    173                         this->model_->setMeshSource(mesh_);
    174                         this->model_->setVisible(false);
    175                 }
    176         }
    177 
    178         void ExplosionPart::setEffect1(const std::string& newString)
    179         {
    180                 this->effect1_ = newString;
    181         }
    182 
    183         void ExplosionPart::setEffect2(const std::string& newString)
    184         {
    185                 this->effect2_ = newString;
    186         }
    187 
    188         void ExplosionPart::setMinSpeed(float speed)
    189         {
    190                 this->minSpeed_ = speed;
    191         }
    192 
    193         void ExplosionPart::setMaxSpeed(float speed)
    194         {
    195                 this->maxSpeed_ = speed;
    196         }
    197 
    198         void ExplosionPart::setOffset(Vector3 newVector)
    199         {
    200                 this->posOffset_ = newVector;
    201                 this->explosionEntity_->setPosition(this->getPosition() + this->posOffset_ / this->getScale());
    202         }
    203 
    204         void ExplosionPart::setDirection(Vector3 newDirection)
    205         {
    206                 this->direction_ = newDirection;
    207         }
    208 
    209         void ExplosionPart::setAngle(float newAngle)
    210         {
    211                 this->angle_ = newAngle;
    212         }
    213 
    214         void ExplosionPart::setDelay(float newDelay)
    215         {
    216                 this->delay_ = newDelay;
    217         }
    218 
    219         std::string& ExplosionPart::getMesh()
    220         { return this->mesh_; }
    221 
    222         std::string& ExplosionPart::getEffect1()
    223         { return this->effect1_; }
    224 
    225         std::string& ExplosionPart::getEffect2()
    226         { return this->effect2_; }
    227 
    228         float ExplosionPart::getMinSpeed()
    229         {
    230                 return this->minSpeed_;
    231         }
    232 
    233         float ExplosionPart::getMaxSpeed()
    234         {
    235                 return this->maxSpeed_;
    236         }
    237 
    238         Vector3 ExplosionPart::getOffset()
    239         {
    240                 return this->posOffset_;
    241         }
    242 
    243         Vector3 ExplosionPart::getDirection()
    244         {
    245                 return direction_;
    246         }
    247 
    248         float ExplosionPart::getAngle()
    249         {
    250                 return angle_;
    251         }
    252 
    253         float ExplosionPart::getDelay()
    254         {
    255                 return delay_;
    256         }
     163    }
     164
     165
     166
     167
     168    void ExplosionPart::setMesh(const std::string& newString)
     169    {
     170        if(newString != "")
     171        {
     172            this->mesh_ = newString;
     173            this->model_->setMeshSource(mesh_);
     174            this->model_->setVisible(false);
     175        }
     176    }
     177
     178    void ExplosionPart::setEffect1(const std::string& newString)
     179    {
     180        this->effect1_ = newString;
     181    }
     182
     183    void ExplosionPart::setEffect2(const std::string& newString)
     184    {
     185        this->effect2_ = newString;
     186    }
     187
     188    void ExplosionPart::setMinSpeed(float speed)
     189    {
     190        this->minSpeed_ = speed;
     191    }
     192
     193    void ExplosionPart::setMaxSpeed(float speed)
     194    {
     195        this->maxSpeed_ = speed;
     196    }
     197
     198    void ExplosionPart::setOffset(Vector3 newVector)
     199    {
     200        this->posOffset_ = newVector;
     201        this->explosionEntity_->setPosition(this->getPosition() + this->posOffset_ / this->getScale());
     202    }
     203
     204    void ExplosionPart::setDirection(Vector3 newDirection)
     205    {
     206        this->direction_ = newDirection;
     207    }
     208
     209    void ExplosionPart::setAngle(float newAngle)
     210    {
     211        this->angle_ = newAngle;
     212    }
     213
     214    void ExplosionPart::setDelay(float newDelay)
     215    {
     216        this->delay_ = newDelay;
     217    }
     218
     219    std::string& ExplosionPart::getMesh()
     220    { return this->mesh_; }
     221
     222    std::string& ExplosionPart::getEffect1()
     223    { return this->effect1_; }
     224
     225    std::string& ExplosionPart::getEffect2()
     226    { return this->effect2_; }
     227
     228    float ExplosionPart::getMinSpeed()
     229    {
     230        return this->minSpeed_;
     231    }
     232
     233    float ExplosionPart::getMaxSpeed()
     234    {
     235        return this->maxSpeed_;
     236    }
     237
     238    Vector3 ExplosionPart::getOffset()
     239    {
     240        return this->posOffset_;
     241    }
     242
     243    Vector3 ExplosionPart::getDirection()
     244    {
     245        return direction_;
     246    }
     247
     248    float ExplosionPart::getAngle()
     249    {
     250        return angle_;
     251    }
     252
     253    float ExplosionPart::getDelay()
     254    {
     255        return delay_;
     256    }
    257257
    258258
  • code/branches/presentationHS15/src/orxonox/worldentities/ExplosionPart.h

    r10962 r11025  
    8282
    8383
    84                 Model* model_;
    85                 ParticleInterface* effect1Particle_;
     84            Model* model_;
     85            ParticleInterface* effect1Particle_;
    8686            ParticleInterface* effect2Particle_;
    8787
     
    8989            float minSpeed_;
    9090            float maxSpeed_;
    91                 std::string mesh_;
    92                 std::string effect1_;
     91            std::string mesh_;
     92            std::string effect1_;
    9393            std::string effect2_;
    9494            Vector3 posOffset_;
     
    101101            Timer destroyTimer_;
    102102
    103                
     103
    104104
    105105    };
Note: See TracChangeset for help on using the changeset viewer.