libsurf
Programmer's Documentation

capcomponent.h (r6227/r5385)
1 
2 /* Copyright (C) 2015 David Eller <david@larosterna.com>
3  *
4  * Commercial License Usage
5  * Licensees holding valid commercial licenses may use this file in accordance
6  * with the terms contained in their respective non-exclusive license agreement.
7  * For further information contact david@larosterna.com .
8  *
9  * GNU General Public License Usage
10  * Alternatively, this file may be used under the terms of the GNU General
11  * Public License version 3.0 as published by the Free Software Foundation and
12  * appearing in the file gpl.txt included in the packaging of this file.
13  */
14 
15 #ifndef SURF_CAPCOMPONENT_H
16 #define SURF_CAPCOMPONENT_H
17 
18 #include "meshcomponent.h"
19 
32 {
33 public:
34 
36  enum Shape {LongCap, RingCap};
37 
39  CapComponent(MeshComponentPtr parent, side_t side, Shape shape, Real hgt=0);
40 
42  virtual ~CapComponent() {}
43 
45  virtual void premesh(const PointGrid<2> & pgi = PointGrid<2>());
46 
48  virtual void premesh(const PointList<2> &, const Indices &);
49 
51  virtual void adapt();
52 
54  static SurfacePtr createCap(const MeshComponent *main,
55  side_t side, Shape shape, Real hgt);
56 
57 private:
58 
60  side_t m_mainside;
61 
64 
66  Real m_height;
67 };
68 
69 typedef boost::shared_ptr<CapComponent> CapComponentPtr;
70 
71 #endif // CAPCOMPONENT_H
virtual void adapt()
adapt to parent surface component
Definition: capcomponent.cpp:59
static SurfacePtr createCap(const MeshComponent *main, side_t side, Shape shape, Real hgt)
generate cap surface from parameter set
Definition: capcomponent.cpp:76
virtual ~CapComponent()
destroy
Definition: capcomponent.h:42
Mesh component.
Definition: meshcomponent.h:36
MeshComponent holding an end cap surface.
Definition: capcomponent.h:31
Shape
use long (grid) or ring-shaped (polar) cap
Definition: capcomponent.h:36
CapComponent(MeshComponentPtr parent, side_t side, Shape shape, Real hgt=0)
initialize cap surface
Definition: capcomponent.cpp:22
virtual void premesh(const PointGrid< 2 > &pgi=PointGrid< 2 >())
overloaded to call specialized mesh generation
Definition: capcomponent.cpp:41
Shape m_shape
cap shape
Definition: capcomponent.h:63
Real m_height
cap height parameter
Definition: capcomponent.h:66
side_t m_mainside
which side of parent is closed by this cap?
Definition: capcomponent.h:60
Generated on Wed Jan 19 2022 03:03:14 for libsurf by   doxygen 1.8.5