summaryrefslogtreecommitdiffstats
path: root/src/vehicles/Floater.h
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2019-07-23 22:55:23 +0200
committeraap <aap@papnet.eu>2019-07-23 22:55:23 +0200
commitae69aaf5ce8eca137bd5da85e26c63a5027e049d (patch)
tree905ce82e7b5e0817856370a702a8540ac46400e6 /src/vehicles/Floater.h
parentbit more CAutomobile (diff)
downloadre3-ae69aaf5ce8eca137bd5da85e26c63a5027e049d.tar
re3-ae69aaf5ce8eca137bd5da85e26c63a5027e049d.tar.gz
re3-ae69aaf5ce8eca137bd5da85e26c63a5027e049d.tar.bz2
re3-ae69aaf5ce8eca137bd5da85e26c63a5027e049d.tar.lz
re3-ae69aaf5ce8eca137bd5da85e26c63a5027e049d.tar.xz
re3-ae69aaf5ce8eca137bd5da85e26c63a5027e049d.tar.zst
re3-ae69aaf5ce8eca137bd5da85e26c63a5027e049d.zip
Diffstat (limited to '')
-rw-r--r--src/vehicles/Floater.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/vehicles/Floater.h b/src/vehicles/Floater.h
new file mode 100644
index 00000000..ede2b9d0
--- /dev/null
+++ b/src/vehicles/Floater.h
@@ -0,0 +1,45 @@
+#pragma once
+
+class Physical;
+
+enum tWaterLevel
+{
+ FLOATER_ABOVE_WATER,
+ FLOATER_IN_WATER,
+ FLOATER_UNDER_WATER,
+};
+
+class cBuoyancy
+{
+public:
+ CVector m_position;
+ CMatrix m_matrix;
+ int m_field_54;
+ CVector m_positionZ;
+ float m_waterlevel;
+ float m_waterLevelInc;
+ float m_buoyancy;
+ CVector m_dimMax;
+ CVector m_dimMin;
+ float m_numPartialVolumes;
+ int m_field_8C;
+ int m_field_90;
+ int m_field_94;
+ bool m_haveVolume;
+ CVector m_step;
+ CVector m_stepRatio;
+ float m_numSteps;
+ bool m_flipAverage;
+ char m_field_B9;
+ bool m_isBoat;
+ float m_volumeUnderWater;
+ CVector m_impulse;
+
+ bool ProcessBuoyancy(CPhysical *phys, float buoyancy, CVector *impulse, CVector *point);
+ void PreCalcSetup(CPhysical *phys, float buoyancy);
+ void SimpleCalcBuoyancy(void);
+ float SimpleSumBuoyancyData(CVector &waterLevel, tWaterLevel waterPosition);
+ void FindWaterLevel(const CVector &zpos, CVector *waterLevel, tWaterLevel *waterPosition);
+ bool CalcBuoyancyForce(CPhysical *phys, CVector *impulse, CVector *point);
+};
+extern cBuoyancy &mod_Buoyancy;