OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
MeshGenerator.h
Go to the documentation of this file.
2 
3 class MeshData {
4 public:
5  std::vector<Vector_t> vertices_m;
6  std::vector<Vektor<unsigned int, 3> > triangles_m;
7  std::vector<std::pair<Vector_t, Vector_t> > decorations_m;
8  int type_m;
9 };
10 
11 
13 public:
14  MeshGenerator();
15 
16  void add(const ElementBase &element);
17 
18  void write(const std::string &fname);
19 private:
20  enum MeshType {OTHER = 0
27  };
28 
29  static MeshData getCylinder(double length,
30  double minor,
31  double major,
32  double formFactor,
33  const unsigned int numSegments = 36);
34 
35  static MeshData getBox(double length,
36  double width,
37  double height,
38  double formFactor);
39 
40 
41  std::vector<MeshData> elements_m;
42 };
43 
44 // vi: set et ts=4 sw=4 sts=4:
45 // Local Variables:
46 // mode:c
47 // c-basic-offset: 4
48 // indent-tabs-mode:nil
49 // End:
std::vector< MeshData > elements_m
Definition: MeshGenerator.h:41
Interface for basic beam line object.
Definition: ElementBase.h:128
void write(const std::string &fname)
static MeshData getCylinder(double length, double minor, double major, double formFactor, const unsigned int numSegments=36)
void add(const ElementBase &element)
std::vector< Vector_t > vertices_m
Definition: MeshGenerator.h:5
int type_m
Definition: MeshGenerator.h:8
std::vector< Vektor< unsigned int, 3 > > triangles_m
Definition: MeshGenerator.h:6
std::vector< std::pair< Vector_t, Vector_t > > decorations_m
Definition: MeshGenerator.h:7
static MeshData getBox(double length, double width, double height, double formFactor)