279abdd723
This commit significantly expands the patient simulation by adding models for the full digestive and urinary systems, as well as the spleen and spinal cord. This builds on the polymorphic organ framework by adding 9 new organ classes: - Kidneys - Bladder - Stomach - Intestines - Gallbladder - Pancreas - Esophagus - Spleen - SpinalCord Each new organ has its own header, a source file with simplified simulation logic for its unique physiological properties, and is integrated into the main patient model and simulation loop. The build system and example application have been updated to include and demonstrate this new, more comprehensive set of organs.
25 lines
545 B
C++
25 lines
545 B
C++
#pragma once
|
|
|
|
#include "Organ.h"
|
|
|
|
/**
|
|
* @brief Represents the Bladder.
|
|
*/
|
|
class MEDICAL_LIB_API Bladder : public Organ {
|
|
public:
|
|
Bladder(int id);
|
|
void update(double deltaTime_s) override;
|
|
std::string getSummary() const override;
|
|
|
|
// Note: A real model would get urine input from kidneys.
|
|
// For now, it will just fill at a constant rate.
|
|
void addUrine(double amount_ml);
|
|
|
|
double getCurrentVolume() const;
|
|
double getCapacity() const;
|
|
|
|
private:
|
|
double currentVolume; // in ml
|
|
double capacity; // in ml
|
|
};
|