Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 14, 2008, 10:55:04 PM (16 years ago)
Author:
rgrieder
Message:

SpaceShip is now harmonising with Bullet as well. The attributes of the steering can be configured in the XML file. I recommend a very high angularDamping or otherwise it will get very tricky to steer the ship (however more realistic).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/physics_merge/src/orxonox/objects/worldentities/pawns/SpaceShip.h

    r2087 r2453  
    3232#include "OrxonoxPrereqs.h"
    3333
     34#include "LinearMath/btVector3.h"
     35
    3436#include "Pawn.h"
    3537
     
    5759            virtual void fire();
    5860
    59             void setMaxSpeed(float value)
    60                 { this->maxSpeed_ = value; }
    61             void setMaxSecondarySpeed(float value)
    62                 { this->maxSecondarySpeed_ = value; }
    63             void setMaxRotation(const Degree& value)
    64                 { this->maxRotation_ = value; }
    65             void setTransAcc(float value)
    66                 { this->translationAcceleration_ = value; }
    67             void setRotAcc(const Degree& value)
    68                 { this->rotationAcceleration_ = value; }
    69             void setTransDamp(float value)
    70                 { this->translationDamping_ = value; }
    71 
    72             inline float getMaxSpeed() const
    73                 { return this->maxSpeed_; }
    74             inline float getMaxSecondarySpeed() const
    75                 { return this->maxSecondarySpeed_; }
    76             inline float getMaxRotation() const
    77                 { return this->maxRotation_.valueDegrees(); }
    78             inline float getTransAcc() const
    79                 { return this->translationAcceleration_; }
    80             inline float getRotAcc() const
    81                 { return this->rotationAcceleration_.valueDegrees(); }
    82             inline float getTransDamp() const
    83                 { return this->translationDamping_; }
    84 
    8561        protected:
    8662            bool bInvertYAxis_;
    8763
    88             float maxSpeed_;
    89             float maxSecondarySpeed_;
    90             float translationAcceleration_;
    91             float translationDamping_;
     64            float primaryThrust_;
     65            float auxilaryThrust_;
     66            float rotationThrust_;
    9267
    93             Degree maxRotation_;
    94             Degree rotationAcceleration_;
     68            btVector3 localLinearAcceleration_;
     69            btVector3 localAngularAcceleration_;
    9570
    96             Degree zeroDegree_;
    97             Degree pitchRotation_;
    98             Degree yawRotation_;
    99             Degree rollRotation_;
     71        private:
     72            virtual bool isCollisionTypeLegal(WorldEntity::CollisionType type) const;
    10073    };
    10174}
Note: See TracChangeset for help on using the changeset viewer.