24 |
#include <TinyVector.hpp> |
#include <TinyVector.hpp> |
25 |
#include <Cell.hpp> |
#include <Cell.hpp> |
26 |
|
|
27 |
|
#include <Edge.hpp> |
28 |
|
|
29 |
/** |
/** |
30 |
* @file Triangle.hpp |
* @file Triangle.hpp |
31 |
* @author Stéphane Del Pino |
* @author Stéphane Del Pino |
48 |
|
|
49 |
public: |
public: |
50 |
enum { |
enum { |
51 |
NumberOfVertices = 3, /**< number of vertices */ |
NumberOfVertices = 3, /**< number of vertices */ |
52 |
NumberOfEdges = 3 /**< number of edges */ |
NumberOfNeighbours = 3, /**< number of neighbours */ |
53 |
|
NumberOfEdges = 3 /**< number of edges */ |
54 |
}; |
}; |
55 |
|
|
56 |
|
typedef Edge BorderType; |
57 |
|
|
58 |
/** |
/** |
59 |
* Access to the mother cell |
* Access to the mother cell |
60 |
* |
* |
77 |
/** |
/** |
78 |
* The number of vertices of a triangle |
* The number of vertices of a triangle |
79 |
* |
* |
80 |
* |
* @return the number of vertices |
|
* @return 3 |
|
81 |
*/ |
*/ |
82 |
const size_t numberOfVertices() const |
const size_t numberOfVertices() const |
83 |
{ |
{ |
84 |
return 3; |
return NumberOfVertices; |
85 |
} |
} |
86 |
|
|
87 |
/** |
/** |
135 |
* |
* |
136 |
*/ |
*/ |
137 |
Triangle() |
Triangle() |
138 |
: Cell(3), |
: Cell(NumberOfVertices), |
139 |
__3Dcell(0) |
__3Dcell(0) |
140 |
{ |
{ |
141 |
; |
; |
153 |
const Vertex& v1, |
const Vertex& v1, |
154 |
const Vertex& v2, |
const Vertex& v2, |
155 |
const size_t ref=0) |
const size_t ref=0) |
156 |
: Cell(3, ref) |
: Cell(NumberOfVertices, ref) |
157 |
{ |
{ |
158 |
__vertices[0] = (Vertex*)&v0; |
__vertices[0] = (Vertex*)&v0; |
159 |
__vertices[1] = (Vertex*)&v1; |
__vertices[1] = (Vertex*)&v1; |