Subversion Repositories gelsvn

Rev

Rev 62 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 62 Rev 67
1
#ifndef __FACE_H__
1
#ifndef __FACE_H__
2
#define __FACE_H__
2
#define __FACE_H__
3
 
3
 
4
#include "templates.h"
4
#include "templates.h"
5
 
5
 
6
namespace HMesh
6
namespace HMesh
7
{
7
{
8
	typedef Face_template<Iters> Face;
8
	typedef Face_template<Iters> Face;
9
	typedef Iters::FaceList FaceList;
9
	typedef Iters::FaceList FaceList;
10
	typedef Iters::FaceIter FaceIter;
10
	typedef Iters::FaceIter FaceIter;
11
	typedef Iters::HalfEdgeIter HalfEdgeIter;
11
	typedef Iters::HalfEdgeIter HalfEdgeIter;
12
 
12
 
13
	/** Null Element for face lists. This is used as the value of an iterator
13
	/** Null Element for face lists. This is used as the value of an iterator
14
			that points to nothing. */
14
			that points to nothing. */
15
	extern FaceIter NULL_FACE_ITER;
15
	extern FaceIter NULL_FACE_ITER;
16
 
16
 
17
	/// Compute the number of edges of a face
17
	/// Compute the number of edges of a face
18
	int no_edges(FaceIter v);
18
	int no_edges(FaceIter v);
19
 
19
 
20
	/** Compute the normal of a face. If the face is not a triangle,
20
	/** Compute the normal of a face. If the face is not a triangle,
21
			the normal is not defined, but computed using the first three
21
			the normal is not defined, but computed using the first three
22
			vertices of the face. */
22
			vertices of the face. */
23
	CGLA::Vec3f normal(FaceIter f);
23
	CGLA::Vec3f normal(FaceIter f);
24
 
24
 
25
	/** Compute the area of a face. */
25
	/** Compute the area of a face. */
26
	float area(FaceIter f);
26
	float area(FaceIter f);
27
		
27
		
28
	/** Compute the centre of a face */
28
	/** Compute the centre of a face */
29
	CGLA::Vec3f centre(FaceIter f);
29
	CGLA::Vec3f centre(FaceIter f);
30
 
30
 
31
}
31
}
32
#endif
32
#endif
33
 
33