Chombo + EB  3.2
STLMesh.H
Go to the documentation of this file.
1 #ifdef CH_LANG_CC
2 /*
3  * _______ __
4  * / ___/ / ___ __ _ / / ___
5  * / /__/ _ \/ _ \/ V \/ _ \/ _ \
6  * \___/_//_/\___/_/_/_/_.__/\___/
7  * Please refer to Copyright.txt, in Chombo's root directory.
8  */
9 #endif
10 
11 #ifndef _STLMESH_H_
12 #define _STLMESH_H_
13 
14 #include "RealVect.H"
15 
16 #include "NamespaceHeader.H"
17 
18 /*
19  * This data structure class holds all of the data
20  * pertaining to the STL surface mesh, including the
21  * connectivity data generated while reading. It also
22  * has functions to print and perform affine transformations
23  * on the mesh.
24  * The data here is all public and filled in by an STLReader
25  */
26 
27 /// The whole mesh
28 class STLMesh
29 {
30 public:
31 
32  /// Vertices
33  struct vertlist {
34 
35  // master list of vertices
37 
38  };
39 
40  /// Edges
41  struct edgelist {
42 
43  // list of edges (indices into list of vertices)
44  // each edge has 2 vertices
46 
47  };
48 
49  /// Triangles
50  struct trilist {
51 
52  // list of triangles
53  // each triangle has 3 vertices
55  // and a normal vector
57 
58  };
59 
60  /// Connectivity
61  struct conninfo {
62 
63  // triangles connected to each vertex (indices)
64  // vertexToTriangle.length()==vertex.length() (first index into vertices, then triangles)
66  // each edge has a left and right triangle
67  // (left as you go from vertex[0] to vertex[1]
68  // edgeToTriangle.length()==edge.length() (first index into edges, then triangles)
70 
71  };
72 
73  // vertices
75  // edges
77  // triangles
79  // connectivity
81 
82  // tolerance for collapsing nodes and such
84 
85  void PrintMesh(); // print info about the mesh
86 
87  // transform stuff
88  void Transform(const Real scale,
89  const RealVect translate,
90  const Real theta,
91  RealVect axis);
92 
93 };
94 
95 #include "NamespaceFooter.H"
96 #endif
97 
Vector< Vector< int > > vertexToTriangle
Definition: STLMesh.H:65
Vector< RealVect > vertex
Definition: STLMesh.H:36
Edges.
Definition: STLMesh.H:41
edgelist edges
Definition: STLMesh.H:76
trilist triangles
Definition: STLMesh.H:78
IndexTM< T, N > scale(const IndexTM< T, N > &a_p, T a_s)
Definition: IndexTMI.H:382
Vector< RealVect > normal
Definition: STLMesh.H:56
Vector< Vector< int > > edge
Definition: STLMesh.H:45
double Real
Definition: REAL.H:33
Vector< Vector< int > > edgeToTriangle
Definition: STLMesh.H:69
void PrintMesh()
Connectivity.
Definition: STLMesh.H:61
A Real vector in SpaceDim-dimensional space.
Definition: RealVect.H:41
conninfo connect
Definition: STLMesh.H:80
vertlist vertices
Definition: STLMesh.H:74
void Transform(const Real scale, const RealVect translate, const Real theta, RealVect axis)
Vertices.
Definition: STLMesh.H:33
Real tol
Definition: STLMesh.H:83
Triangles.
Definition: STLMesh.H:50
Vector< Vector< int > > corners
Definition: STLMesh.H:54
The whole mesh.
Definition: STLMesh.H:28