Free Electron
TreeSeed.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_TreeSeed_h__
8 #define __vegetation_TreeSeed_h__
9 
10 FE_ATTRIBUTE("veg:levelgroup", "RecordGroup of TreeLevel specifications");
11 FE_ATTRIBUTE("veg:stiffness", "Stem springiness");
12 FE_ATTRIBUTE("veg:stillness", "Stem structural drag");
13 FE_ATTRIBUTE("veg:density", "Mass per volume (kg/m^3)");
14 FE_ATTRIBUTE("veg:levels", "Depth of levels generated");
15 
16 namespace fe
17 {
18 namespace ext
19 {
20 
21 /**************************************************************************//**
22  @brief TreeSeed RecordView
23 
24  @ingroup vegetation
25 *//***************************************************************************/
26 class FE_DL_EXPORT TreeSeed: public PlantSeed
27 {
28  public:
29  Functor< sp<RecordGroup> > levelgroup;
30  Functor<F32> stiffness;
31  Functor<F32> stillness;
32  Functor<F32> density;
33  Functor<I32> levels;
34 
35  TreeSeed(void) { setName("TreeSeed"); }
36 virtual void addFunctors(void)
37  {
39 
40  add(levelgroup, FE_USE("veg:levelgroup"));
41  add(stiffness, FE_USE("veg:stiffness"));
42  add(stillness, FE_USE("veg:stillness"));
43  add(density, FE_USE("veg:density"));
44  add(levels, FE_USE("veg:levels"));
45  }
46 virtual void initializeRecord(void)
47  {
49 
50  stiffness()=1.0f;
51  stillness()=1.0f;
52  density()=1e3f;
53  levels()=1;
54  }
55 };
56 
57 } /* namespace ext */
58 } /* namespace fe */
59 
60 #endif /* __vegetation_TreeSeed_h__ */
61 
virtual void addFunctors(void)
Called at instantiation to add functors.
Definition: PlantSeed.h:28
kernel
Definition: namespace.dox:3
Bound accessor in a RecordView.
Definition: RecordView.h:147
TreeSeed RecordView.
Definition: TreeSeed.h:26
PlantSeed RecordView.
Definition: PlantSeed.h:22
virtual void initializeRecord(void)
Called at instantiation to initialize attributes.
Definition: PlantSeed.h:32
virtual void addFunctors(void)
Called at instantiation to add functors.
Definition: TreeSeed.h:36
virtual void initializeRecord(void)
Called at instantiation to initialize attributes.
Definition: TreeSeed.h:46