Subversion Repositories gelsvn

Rev

Rev 89 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 89 Rev 115
Line 29... Line 29...
29
 
29
 
30
		This is the best solution I could come up with - since I really wanted 
30
		This is the best solution I could come up with - since I really wanted 
31
		to use STL to store the elements. The solution is similar to what is 
31
		to use STL to store the elements. The solution is similar to what is 
32
		used in CGAL and OpenMesh both of which provided inspiration. */
32
		used in CGAL and OpenMesh both of which provided inspiration. */
33
 
33
 
-
 
34
 
-
 
35
		/** Type used for the touch variables of halfedges, vertices, and faces.
-
 
36
				The touch variables are used to contain various data such as counters,
-
 
37
				indices, flags. In some cases it is useful to touch with the value
-
 
38
				of a pointer cast to an integer. However, this means that the 
-
 
39
				integer size must be the same as the pointer size. Using "intptr_t"
-
 
40
				ensures this. */
-
 
41
		typedef intptr_t TouchType;
-
 
42
 
34
		/** \struct Vertex
43
		/** \struct Vertex
35
		 */
44
		 */
36
		template<class R>
45
		template<class R>
37
		struct Vertex_template
46
		struct Vertex_template
38
		{
47
		{
Line 48... Line 57...
48
 
57
 
49
				/// Geometric vertex position
58
				/// Geometric vertex position
50
				CGLA::Vec3f pos;
59
				CGLA::Vec3f pos;
51
 
60
 
52
				/// General purpose integer. Normally used as index or flag.
61
				/// General purpose integer. Normally used as index or flag.
53
				int touched;
62
				TouchType touched;
54
		};
63
		};
55
 
64
 
56
		template<class R>
65
		template<class R>
57
		struct HalfEdge_template
66
		struct HalfEdge_template
58
		{
67
		{
Line 77... Line 86...
77
 
86
 
78
				/// Opposite halfedge
87
				/// Opposite halfedge
79
				HalfEdgeIter opp;
88
				HalfEdgeIter opp;
80
 
89
 
81
				/// General purpose integer. Normally used as index or flag.
90
				/// General purpose integer. Normally used as index or flag.
82
				int touched;
91
				TouchType touched;
83
 
92
 
84
		};
93
		};
85
 
94
 
86
		template<class R>
95
		template<class R>
87
		struct Face_template
96
		struct Face_template
Line 95... Line 104...
95
 
104
 
96
				/// Last is just some halfedge in the face loop.
105
				/// Last is just some halfedge in the face loop.
97
				HalfEdgeIter last;
106
				HalfEdgeIter last;
98
 
107
 
99
				/// General purpose integer. Normally used as index or flag.
108
				/// General purpose integer. Normally used as index or flag.
100
				int touched;
109
				TouchType touched;
101
		};
110
		};
102
 
111
 
103
		struct Iters
112
		struct Iters
104
		{
113
		{
105
				typedef Vertex_template<Iters> V;
114
				typedef Vertex_template<Iters> V;