OpenMEEG
vertex.h
Go to the documentation of this file.
1 // Project Name: OpenMEEG (http://openmeeg.github.io)
2 // © INRIA and ENPC under the French open source license CeCILL-B.
3 // See full copyright notice in the file LICENSE.txt
4 // If you make a copy of this file, you must either:
5 // - provide also LICENSE.txt and modify this header to refer to it.
6 // - replace this header by the LICENSE.txt content.
7 
8 #pragma once
9 
10 #include <vector>
11 #include <vect3.h>
12 
13 namespace OpenMEEG {
14 
19 
20  class OPENMEEG_EXPORT Vertex: public Vect3 {
21  public:
22 
23  Vertex() { }
24 
25  Vertex(const Vect3& V,const unsigned id=-1): Vect3(V),ind(id) { }
26  Vertex(const double V[3],const unsigned id=-1): Vect3(V[0],V[1],V[2]),ind(id) { }
27  Vertex(const double& x,const double& y,const double& z,const unsigned id=-1): Vect3(x,y,z),ind(id) { }
28 
29  unsigned& index() { return ind; }
30  const unsigned& index() const { return ind; }
31 
32  private:
33 
34  unsigned ind;
35  };
36 
37  typedef std::vector<Vertex> Vertices;
38  typedef std::vector<Vertex*> VerticesRefs;
39 }
Vect3.
Definition: vect3.h:28
Vertex.
Definition: vertex.h:20
Vertex(const double V[3], const unsigned id=-1)
Definition: vertex.h:26
Vertex(const double &x, const double &y, const double &z, const unsigned id=-1)
Definition: vertex.h:27
const unsigned & index() const
Definition: vertex.h:30
Vertex(const Vect3 &V, const unsigned id=-1)
Definition: vertex.h:25
unsigned & index()
Definition: vertex.h:29
std::vector< Vertex > Vertices
Definition: vertex.h:37
std::vector< Vertex * > VerticesRefs
Definition: vertex.h:38