00001 #ifndef FACE_H
00002 #define FACE_H
00003
00004 #include <vector>
00005 #include "include/IvVector3.h"
00006 #include "Vertex.h"
00007
00008 using namespace std;
00009
00010
00011
00015 namespace model {
00016
00033 class Face {
00034 private:
00035 #ifdef DOXYGEN_SHOULD_SKIP_THIS
00036 Vertex* m_vertices;
00037 #else
00038 vector<Vertex*> m_vertices;
00039 #endif
00040 int m_iCount;
00041
00042 public:
00043 Face() {};
00044 Face(Vertex* vertex1, Vertex* vertex2);
00045 Face(Vertex* vertex1, Vertex* vertex2, Vertex* vertex3);
00046 Face(Vertex* vertex1, Vertex* vertex2, Vertex* vertex3, Vertex* vertex4);
00047 ~Face() {};
00048
00049
00050 Face(const Face& other);
00051 Face& operator=(const Face& other);
00052
00053 int getCount();
00054 void setVertex(int iIndex, Vertex* vertex);
00055 void setVertices(Vertex* vertex1, Vertex* vertex2);
00056 void setVertices(Vertex* vertex1, Vertex* vertex2, Vertex* vertex3);
00057 void setVertices(Vertex* vertex1, Vertex* vertex2, Vertex* vertex3, Vertex* vertex4);
00058 Vertex* getVertex(int iIndex);
00059 vector<Vertex*> getVertices();
00060 IvVector3 computeNormal();
00061
00062
00063 bool operator==( const Face& other ) const;
00064 bool operator!=( const Face& other ) const;
00065
00066 };
00067
00073 }
00074
00075
00076 #endif //FACE_H
00077