Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008 #ifndef HALFEDGEFACE_H_
00009 #define HALFEDGEFACE_H_
00010
00011 #include <vector>
00012 #include <set>
00013
00014 using namespace std;
00015
00016 #include "HalfEdgeVertex.hpp"
00017 #include "Normal.hpp"
00018 #include "HalfEdge.hpp"
00019
00020 namespace lssr
00021 {
00022
00023 template<typename VertexT, typename NormalT>
00024 class HalfEdgeVertex;
00025
00033 template<typename VertexT, typename NormalT>
00034 class HalfEdgeFace
00035 {
00036 public:
00037
00041 HalfEdgeFace() {};
00042
00048 HalfEdgeFace(const HalfEdgeFace<VertexT, NormalT> &o);
00049
00053 void calc_normal();
00054
00058 void interpolate_normal();
00059
00064 void getVertexNormals(vector<NormalT> &n);
00065
00071 void getVertices(vector<VertexT> &v);
00072
00078 void getAdjacentFaces(vector<HalfEdgeFace<VertexT, NormalT>* > &adj);
00079
00083 NormalT getFaceNormal();
00084
00088 NormalT getInterpolatedNormal();
00089
00093 VertexT getCentroid();
00094
00098 float getArea();
00099
00101 HalfEdge<HalfEdgeVertex<VertexT, NormalT>, HalfEdgeFace<VertexT, NormalT> >* m_edge;
00102
00104 bool m_used;
00105
00107 vector<int> m_indices;
00108
00110 int m_index[3];
00111
00113 int m_texture_index;
00114
00116 size_t m_face_index;
00117
00119 NormalT m_normal;
00120 };
00121
00122 }
00123
00124 #include "HalfEdgeFace.tcc"
00125
00126 #endif