X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FAIModel%2FAIThermal.hxx;h=731ac81ce61c168c03d03eaeffbe56d23d8db59c;hb=301054204e0412eb31f06477e32cfe6f1fcb0792;hp=c4eb171d12c1c2fcfa8583ca91279e572faa615e;hpb=ed4509d8b5ad725a19b91bcfb841c56c2aa9de61;p=flightgear.git diff --git a/src/AIModel/AIThermal.hxx b/src/AIModel/AIThermal.hxx index c4eb171d1..731ac81ce 100644 --- a/src/AIModel/AIThermal.hxx +++ b/src/AIModel/AIThermal.hxx @@ -16,7 +16,7 @@ // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #ifndef _FG_AIThermal_HXX #define _FG_AIThermal_HXX @@ -25,35 +25,39 @@ #include "AIBase.hxx" #include -SG_USING_STD(string); +using std::string; class FGAIThermal : public FGAIBase { public: - FGAIThermal(FGAIManager* mgr); + FGAIThermal(); ~FGAIThermal(); - bool init(); + void readFromScenario(SGPropertyNode* scFileNode); + + virtual bool init(bool search_in_AI_path=false); virtual void bind(); virtual void unbind(); - void update(double dt); + virtual void update(double dt); - inline void setStrength( double s ) { strength = s; }; + inline void setMaxStrength( double s ) { max_strength = s; }; inline void setDiameter( double d ) { diameter = d; }; + inline void setHeight( double h ) { height = h; }; + inline double getStrength() const { return strength; }; + inline double getDiameter() const { return diameter; }; + inline double getHeight() const { return height; }; -protected: - static FGAIThermal *_self; - + virtual const char* getTypeString(void) const { return "thermal"; } private: - double dt; void Run(double dt); - SGPropertyNode* wind_from_down; + double max_strength; double strength; double diameter; - double scaler; + double height; + double factor; };