Subversion Repositories gelsvn

Rev

Rev 62 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 62 Rev 119
1
#ifndef __VERTEX_H__
1
#ifndef __VERTEX_H__
2
#define __VERTEX_H__
2
#define __VERTEX_H__
3
 
3
 
4
#include "templates.h"
4
#include "templates.h"
5
 
5
 
6
 
6
 
7
namespace HMesh
7
namespace HMesh
8
{
8
{
9
	typedef Vertex_template<Iters> Vertex;
9
	typedef Vertex_template<Iters> Vertex;
10
	typedef Iters::VertexList VertexList;
10
	typedef Iters::VertexList VertexList;
11
	typedef Iters::VertexIter VertexIter;
11
	typedef Iters::VertexIter VertexIter;
12
 
12
 
13
	/** Null Element for vertex lists. This is used as the value of an iterator
13
	/** Null Element for vertex lists. This is used as the value of an iterator
14
			that points to nothing. */
14
			that points to nothing. */
15
	extern VertexIter NULL_VERTEX_ITER;
15
	extern VertexIter NULL_VERTEX_ITER;
16
 
16
 
17
	/// Compute valency, i.e. number of incident edges.
17
	/// Compute valency, i.e. number of incident edges.
18
	int valency(VertexIter v);
18
	int valency(VertexIter v);
19
 
19
 
20
	/** Compute the vertex normal. This function computes the angle
20
	/** Compute the vertex normal. This function computes the angle
21
			weighted sum of incident face normals. */
21
			weighted sum of incident face normals. */
22
	const CGLA::Vec3f normal(VertexIter v);
22
	const CGLA::Vec3f normal(VertexIter v);
23
 
23
 
24
	/** Returns true if the two argument vertices are in each other's 
24
	/** Returns true if the two argument vertices are in each other's 
25
			one-rings. */
25
			one-rings. */
26
	bool is_connected(VertexIter v1, VertexIter v2);
26
	bool is_connected(VertexIter v1, VertexIter v2);
27
 
27
 
28
	/** Returns true if the vertex is a boundary vertex. */
28
	/** Returns true if the vertex is a boundary vertex. */
29
	bool is_boundary(VertexIter v);
29
	bool is_boundary(VertexIter v);
30
 
30
 
31
	/** Check and enforce boundary consistency. */
31
	/** Check and enforce boundary consistency. */
32
	void check_boundary_consistency(VertexIter v);
32
	void check_boundary_consistency(VertexIter v);
33
 
33
 
34
 
34
 
35
 
35
 
36
}
36
}
37
#endif
37
#endif
38
 
38