Free Electron
TreeLevel.h
Go to the documentation of this file.
1 /* Copyright (C) 2003-2021 Free Electron Organization
2  Any use of this software requires a license. If a valid license
3  was not distributed with this file, visit freeelectron.org. */
4 
5 /** @file */
6 
7 #ifndef __vegetation_TreeLevel_h__
8 #define __vegetation_TreeLevel_h__
9 
10 FE_ATTRIBUTE("veg:form", "Part of tree, Stick or Leaf");
11 FE_ATTRIBUTE("veg:level", "Depth in hierarchy");
12 FE_ATTRIBUTE("veg:length", "Curve length over all segments");
13 FE_ATTRIBUTE("veg:bare", "Fraction of length stripped of forks");
14 FE_ATTRIBUTE("veg:valleybase", "Minimum fraction of length at base");
15 FE_ATTRIBUTE("veg:valleytip", "Minimum fraction of length at tip");
16 FE_ATTRIBUTE("veg:peakalong", "Point along parent for peak child length");
17 FE_ATTRIBUTE("veg:powerbase", "Exponent applied before peak");
18 FE_ATTRIBUTE("veg:powertip", "Exponent applied after peak");
19 
20 namespace fe
21 {
22 namespace ext
23 {
24 
25 /**************************************************************************//**
26  @brief TreeLevel RecordView
27 
28  @ingroup vegetation
29 *//***************************************************************************/
30 class FE_DL_EXPORT TreeLevel: virtual public RecordView
31 {
32  public:
33  Functor<String> form;
34  Functor<I32> level;
35  Functor<F32> length;
36  Functor<F32> bare;
37  Functor<F32> valleybase;
38  Functor<F32> valleytip;
39  Functor<F32> peakalong;
40  Functor<F32> powerbase;
41  Functor<F32> powertip;
42 
43  TreeLevel(void) { setName("TreeLevel"); }
44 virtual void addFunctors(void)
45  {
46  add(form, FE_USE("veg:form"));
47  add(level, FE_USE("veg:level"));
48  add(length, FE_USE("veg:length"));
49  add(bare, FE_USE("veg:bare"));
50  add(valleybase, FE_USE("veg:valleybase"));
51  add(valleytip, FE_USE("veg:valleytip"));
52  add(peakalong, FE_USE("veg:peakalong"));
53  add(powerbase, FE_USE("veg:powerbase"));
54  add(powertip, FE_USE("veg:powertip"));
55  }
56 virtual void initializeRecord(void)
57  {
58  level()=0;
59  length()=1.0f;
60  bare()=0.0f;
61  valleybase()=0.0f;
62  valleytip()=0.0f;
63  peakalong()=0.0f;
64  powerbase()=1.0f;
65  powertip()=1.0f;
66  }
67 };
68 
69 } /* namespace ext */
70 } /* namespace fe */
71 
72 #endif /* __vegetation_TreeLevel_h__ */
73 
74 
virtual void initializeRecord(void)
Called at instantiation to initialize attributes.
Definition: TreeLevel.h:56
kernel
Definition: namespace.dox:3
Bound accessor in a RecordView.
Definition: RecordView.h:147
virtual void addFunctors(void)
Called at instantiation to add functors.
Definition: TreeLevel.h:44
TreeLevel RecordView.
Definition: TreeLevel.h:30
Bindable collection of accessor Functors.
Definition: RecordView.h:106