00001 //--------------------------------------------------------------------------- 00002 // SimpleLinearGrowth 00003 //--------------------------------------------------------------------------- 00004 #if !defined(SimpleLinearGrowth_H) 00005 #define SimpleLinearGrowth_H 00006 00007 #include "GrowthBase.h" 00008 00037 class clSimpleLinearGrowth : virtual public clGrowthBase { 00038 //note: need the virtual keyword to avoid base class ambiguity. 00039 00040 public: 00041 00045 clSimpleLinearGrowth(clSimManager *p_oSimManager); 00046 00050 ~clSimpleLinearGrowth(); 00051 00061 float CalcHeightGrowthValue(clTree *p_oTree, clTreePopulation *p_oPop, float fDiameterGrowth) 00062 {return CalculateFunctionValue(p_oTree) * m_fConversionFactor;}; 00063 00073 float CalcDiameterGrowthValue(clTree *p_oTree, clTreePopulation *p_oPop, float fHeightGrowth) 00074 {return CalculateFunctionValue(p_oTree) * m_fConversionFactor;}; 00075 00084 void DoShellSetup(xercesc::DOMDocument *p_oDoc); 00085 00094 void SetNameData(char *cNameString); 00095 00096 00097 protected: 00098 00100 float *mp_fSlope; 00101 00103 float *mp_fIntercept; 00104 00108 float m_fConversionFactor; 00109 00118 inline float CalculateFunctionValue(clTree *p_oTree); 00119 }; 00120 //--------------------------------------------------------------------------- 00121 #endif // SimpleLinearGrowth_H