00001 //--------------------------------------------------------------------------- 00002 // ShadedLinearGrowth 00003 //--------------------------------------------------------------------------- 00004 #if !defined(ShadedLinearGrowth_H) 00005 #define ShadedLinearGrowth_H 00006 00007 #include "GrowthBase.h" 00008 00048 class clShadedLinearGrowth : virtual public clGrowthBase { 00049 //note: need the virtual keyword to avoid base class ambiguity. 00050 00051 public: 00052 00056 clShadedLinearGrowth(clSimManager *p_oSimManager); 00057 00061 ~clShadedLinearGrowth(); 00062 00076 float CalcHeightGrowthValue(clTree *p_oTree, clTreePopulation *p_oPop, float fDiameterGrowth); 00077 00090 float CalcDiameterGrowthValue(clTree *p_oTree, clTreePopulation *p_oPop, float fHeightGrowth); 00091 00100 void DoShellSetup(xercesc::DOMDocument *p_oDoc); 00101 00110 void SetNameData(char *cNameString); 00111 00112 00113 protected: 00114 00116 float *mp_fSlope; 00117 00119 float *mp_fIntercept; 00120 00122 float *mp_fShader; 00123 00125 short int *mp_iIndexes; 00126 00129 float m_fConversionFactor; 00130 00132 float m_fNumberOfYearsPerTimestep; 00133 00144 inline float CalculateFunctionValue(int iSpecies, float fGLI, float fDiam); 00145 }; 00146 //--------------------------------------------------------------------------- 00147 #endif // ShadedLinearGrowth_H