Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2010-10-20 14:44:12 +0000
committerStijn Buys <ingar@osirion.org>2010-10-20 14:44:12 +0000
commit21e6267e3f998a467ca3b5ec225e6d03653aed97 (patch)
treec52570e35ee8b91c271da9e6588a2d7b527ce3e0 /src/game/base/shipmodel.h
parenta76489275b7c66ab0264e8e29c4d4d08c22e3e16 (diff)
advanced ship physics specifications, specs game function
Diffstat (limited to 'src/game/base/shipmodel.h')
-rw-r--r--src/game/base/shipmodel.h85
1 files changed, 60 insertions, 25 deletions
diff --git a/src/game/base/shipmodel.h b/src/game/base/shipmodel.h
index a7c8500..e90c59e 100644
--- a/src/game/base/shipmodel.h
+++ b/src/game/base/shipmodel.h
@@ -37,21 +37,36 @@ public:
return shipmodel_dock;
}
- /// acceleration
- inline const float acceleration() const {
- return shipmodel_acceleration;
+ /// default mass
+ inline const float mass() const {
+ return shipmodel_mass;
+ }
+
+ /// default impulse drive force
+ inline const float impulse_force() const {
+ return shipmodel_impulse_force;
+ }
+
+ /// default thruster force
+ inline const float thrust_force() const {
+ return shipmodel_thrust_force;
+ }
+
+ /// default strafe force
+ inline const float strafe_force() const {
+ return shipmodel_strafe_force;
+ }
+
+ /// default torque force
+ inline const float torque_force() const {
+ return shipmodel_torque_force;
}
- /// maximum speed
+ /// maximum thrust speed
inline const float maxspeed() const {
return shipmodel_maxspeed;
}
-
- /// turn speed in rotations per second
- inline const float turnspeed() const {
- return shipmodel_turnspeed;
- }
-
+
/// size of the cargo hold, in cubic meters
inline const float maxcargo() const {
return shipmodel_maxcargo;
@@ -59,21 +74,37 @@ public:
/* ---- mutators -------------------------------------------------- */
- /// set acceleration
- inline void set_acceleration(const float acceleration) {
- shipmodel_acceleration = acceleration;
+ /// set mass
+ inline void set_mass(const float mass) {
+ shipmodel_mass = mass;
+ }
+
+ /// set impulse drive force
+ inline void set_impulse_force(const float impulse) {
+ shipmodel_impulse_force = impulse;
+
+ }
+
+ /// set thruster force
+ inline void set_thrust_force(const float thrust) {
+ shipmodel_thrust_force = thrust;
+ }
+
+ /// set strafe force
+ inline void set_strafe_force(const float strafe) {
+ shipmodel_strafe_force = strafe;
+ }
+
+ /// set torque force
+ inline void set_torque_force(const float torque) {
+ shipmodel_torque_force = torque;
}
/// set maximum speed
inline void set_maxspeed(const float maxspeed) {
shipmodel_maxspeed = maxspeed;
}
-
- /// set turn speed
- inline void set_turnspeed(const float turnspeed) {
- shipmodel_turnspeed = turnspeed;
- }
-
+
/// set size of the cargo hold
inline void set_maxcargo(const float maxcargo) {
shipmodel_maxcargo = maxcargo;
@@ -105,14 +136,18 @@ public:
static core::InfoType *shipmodel_infotype;
-private:
- bool shipmodel_jumpdrive;
- bool shipmodel_dock;
+private:
+ float shipmodel_mass;
+ float shipmodel_impulse_force;
+ float shipmodel_thrust_force;
+ float shipmodel_strafe_force;
+ float shipmodel_torque_force;
- float shipmodel_acceleration;
- float shipmodel_maxspeed;
- float shipmodel_turnspeed;
+ float shipmodel_maxspeed;
float shipmodel_maxcargo;
+
+ bool shipmodel_jumpdrive;
+ bool shipmodel_dock;
};
}