Free Electron
Cylinder.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 __shape_Cylinder_h__
8 #define __shape_Cylinder_h__
9 
10 FE_ATTRIBUTE("bnd:span", "Vector centerline of cylinder");
11 FE_ATTRIBUTE("bnd:baseRadius", "Bottom cap of cylinder");
12 FE_ATTRIBUTE("bnd:endRadius", "Top cap of cylinder");
13 
14 namespace fe
15 {
16 namespace ext
17 {
18 
19 /**************************************************************************//**
20  @brief Cylinder RecordView
21 
22  @ingroup shape
23 
24  Since it can have a different base and end radius,
25  this is technically a conical frustrum.
26 *//***************************************************************************/
27 class FE_DL_EXPORT Cylinder: public Disk
28 {
29  public:
30  Functor<F32> baseRadius;
31  Functor<F32> endRadius;
32 
33  Cylinder(void) { setName("Cylinder"); }
34 virtual void addFunctors(void)
35  {
37 
38  add(baseRadius, FE_USE("bnd:baseRadius"));
39  add(endRadius, FE_USE("bnd:endRadius"));
40  }
41 virtual void initializeRecord(void)
42  {
44 
45  baseRadius()=1.0f;
46  endRadius()=1.0f;
47  }
48 };
49 
50 } /* namespace ext */
51 } /* namespace fe */
52 
53 #endif /* __shape_Cylinder_h__ */
kernel
Definition: namespace.dox:3
Bound accessor in a RecordView.
Definition: RecordView.h:147
Cylinder RecordView.
Definition: Cylinder.h:27
Disk RecordView.
Definition: Disk.h:22
virtual void addFunctors(void)
Called at instantiation to add functors.
Definition: Disk.h:28
virtual void addFunctors(void)
Called at instantiation to add functors.
Definition: Cylinder.h:34
virtual void initializeRecord(void)
Called at instantiation to initialize attributes.
Definition: Disk.h:34
virtual void initializeRecord(void)
Called at instantiation to initialize attributes.
Definition: Cylinder.h:41