Free Electron
StickLevel.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_StickLevel_h__
8 #define __vegetation_StickLevel_h__
9 
10 FE_ATTRIBUTE("veg:segments", "Divisions per stem");
11 FE_ATTRIBUTE("veg:forks", "Number of segments that fork");
12 FE_ATTRIBUTE("veg:sideshoots", "Number of shoots per fork");
13 FE_ATTRIBUTE("veg:forkrotate", "Spiral angle between forks");
14 FE_ATTRIBUTE("veg:forktrench", "Alternately add/subtract to spiral angle");
15 FE_ATTRIBUTE("veg:shootdown", "Down angle of shoot");
16 FE_ATTRIBUTE("veg:shootramp", "Added down angle towards end of shoot");
17 FE_ATTRIBUTE("veg:shootreact", "Effect of shoot angle on main");
18 FE_ATTRIBUTE("veg:shootdrain", "Effect of shoot area on main");
19 FE_ATTRIBUTE("veg:curvedown", "Gradual increase in down angle");
20 FE_ATTRIBUTE("veg:sidedeath", "Chance of side shoot termination");
21 FE_ATTRIBUTE("veg:centerdeath", "Chance of center shoot termination");
22 FE_ATTRIBUTE("veg:areaRatio", "Cross-section radius per length");
23 FE_ATTRIBUTE("veg:taper", "Cross-section reduction at tip");
24 
25 namespace fe
26 {
27 namespace ext
28 {
29 
30 /**************************************************************************//**
31  @brief StickLevel RecordView
32 
33  @ingroup vegetation
34 *//***************************************************************************/
35 class FE_DL_EXPORT StickLevel: virtual public TreeLevel
36 {
37  public:
38  Functor<I32> segments;
39  Functor<I32> forks;
40  Functor<I32> sideshoots;
41  Functor<F32> forkrotate;
42  Functor<F32> forktrench;
43  Functor<F32> shootdown;
44  Functor<F32> shootramp;
45  Functor<F32> shootreact;
46  Functor<F32> shootdrain;
47  Functor<F32> curvedown;
48  Functor<F32> sidedeath;
49  Functor<F32> centerdeath;
50  Functor<F32> areaRatio;
51  Functor<F32> taper;
52 
53  StickLevel(void) { setName("StickLevel"); }
54 virtual void addFunctors(void)
55  {
57 
58  add(segments, FE_USE("veg:segments"));
59  add(forks, FE_USE("veg:forks"));
60  add(sideshoots, FE_USE("veg:sideshoots"));
61  add(forkrotate, FE_USE("veg:forkrotate"));
62  add(forktrench, FE_USE("veg:forktrench"));
63  add(shootdown, FE_USE("veg:shootdown"));
64  add(shootramp, FE_USE("veg:shootramp"));
65  add(shootreact, FE_USE("veg:shootreact"));
66  add(shootdrain, FE_USE("veg:shootdrain"));
67  add(curvedown, FE_USE("veg:curvedown"));
68  add(sidedeath, FE_USE("veg:sidedeath"));
69  add(centerdeath, FE_USE("veg:centerdeath"));
70  add(areaRatio, FE_USE("veg:areaRatio"));
71  add(taper, FE_USE("veg:taper"));
72  }
73 virtual void initializeRecord(void)
74  {
76 
77  segments()=1;
78  forks()=0;
79  sideshoots()=0;
80  forkrotate()=0.0f;
81  forktrench()=0.0f;
82  shootdown()=90.0f;
83  shootramp()=0.0f;
84  shootreact()=1.0f;
85  shootdrain()=1.0f;
86  curvedown()=90.0f;
87  sidedeath()=0.0f;
88  centerdeath()=0.0f;
89  areaRatio()=1.0f;
90  taper()=1.0f;
91  }
92 };
93 
94 } /* namespace ext */
95 } /* namespace fe */
96 
97 #endif /* __vegetation_StickLevel_h__ */
98 
99 
100 
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
virtual void initializeRecord(void)
Called at instantiation to initialize attributes.
Definition: StickLevel.h:73
TreeLevel RecordView.
Definition: TreeLevel.h:30
virtual void addFunctors(void)
Called at instantiation to add functors.
Definition: StickLevel.h:54
StickLevel RecordView.
Definition: StickLevel.h:35