X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FFDM%2FJSBSim%2Fmodels%2FFGExternalReactions.h;h=7945abf88565830145d2a8e79f158d4357e00b0f;hb=1575fad886a0b18825363d41d53a287e8d36b9c8;hp=36666697f8a7c208381851da6cdc79e6c1c6b9f3;hpb=f8a8805e2dde01e0c0a962c283880fa60fa23f0f;p=flightgear.git diff --git a/src/FDM/JSBSim/models/FGExternalReactions.h b/src/FDM/JSBSim/models/FGExternalReactions.h old mode 100755 new mode 100644 index 36666697f..7945abf88 --- a/src/FDM/JSBSim/models/FGExternalReactions.h +++ b/src/FDM/JSBSim/models/FGExternalReactions.h @@ -41,12 +41,14 @@ INCLUDES #include #include "FGModel.h" #include "FGExternalForce.h" +#include "input_output/FGXMLFileRead.h" + /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DEFINITIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ -#define ID_EXTERNALREACTIONS "$Id: FGExternalReactions.h,v 1.11 2011/05/20 03:18:36 jberndt Exp $" +#define ID_EXTERNALREACTIONS "$Id: FGExternalReactions.h,v 1.14 2011/10/31 14:54:41 bcoconni Exp $" /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% FORWARD DECLARATIONS @@ -115,7 +117,7 @@ CLASS DOCUMENTATION CLASS DECLARATION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/ -class FGExternalReactions : public FGModel +class FGExternalReactions : public FGModel, public FGXMLFileRead { public: /** Constructor. @@ -151,12 +153,14 @@ public: /** Retrieves the total forces defined in the external reactions. @return the total force in pounds. */ - FGColumnVector3 GetForces(void) const {return vTotalForces;} + const FGColumnVector3& GetForces(void) const {return vTotalForces;} + double GetForces(int idx) const {return vTotalForces(idx);} /** Retrieves the total moment resulting from the forces defined in the external reactions. @return the total moment in foot-pounds. */ - FGColumnVector3 GetMoments(void) const {return vTotalMoments;} + const FGColumnVector3& GetMoments(void) const {return vTotalMoments;} + double GetMoments(int idx) const {return vTotalMoments(idx);} private: @@ -167,6 +171,7 @@ private: bool NoneDefined; + void bind(void); void Debug(int from); }; }