-
Notifications
You must be signed in to change notification settings - Fork 5
/
directed_edge.h
47 lines (37 loc) · 1.12 KB
/
directed_edge.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*!
* @file directed_edge.h
* @brief Contains class to describe a directed edge.
*/
#ifndef __DIRECTED_EDGE_H__
#define __DIRECTED_EDGE_H__
namespace psalm
{
class edge; // forward declaration to break up circular dependency with face class
/*!
* @class directed_edge
* @brief Contains an edge and the edge's direction.
*
* Used for performing a lookup in the edge table of the mesh. Directed
* edges are necessary because in an oriented 2-manifold mesh, each edge
* appears twice (at least implicitly). For _working_ with edge data,
* however, edge (a,b) and (b,a) are essentially the same and need _not_
* be stored twice. Hence, to avoid any duplicates, an edge attribute
* tells the caller the orientation of the edge.
*/
class directed_edge
{
public:
directed_edge();
edge* e; ///< Pointer to edge
bool inverted; ///< Flag signalling direction
/*!
* @brief Flag signalling a new edge.
*
* This flag overrides the "inverted" flag and is used for
* improperly oriented meshes. The flag is then used by the edge
* table to signal that the edge is new.
*/
bool new_edge;
};
} // end of namespace "psalm"
#endif