Go to the documentation of this file.00001 #ifndef CLOTH_MESH_H
00002 #define CLOTH_MESH_H
00003
00004 #include <vcg/simplex/vertex/base.h>
00005 #include <vcg/simplex/face/base.h>
00006 #include <vcg/simplex/face/pos.h>
00007 #include <vcg/simplex/face/topology.h>
00008 #include <vcg/complex/complex.h>
00009 #include <vcg/complex/algorithms/update/normal.h>
00010
00011 #include <vector>
00012
00013 using namespace vcg;
00014
00015 class CVertex;
00016 class CEdge;
00017 class CFace;
00018
00019 class CEdge {
00020 public:
00021 CVertex *v[2];
00022 CFace *f;
00023 bool operator<(const CEdge& t) const {
00024 if(v[0] < t.v[0]) return true;
00025 if(v[0] > t.v[0]) return false;
00026 return v[1] < t.v[1];
00027 }
00028 bool operator==(const CEdge& t) const {
00029 return v[0] == t.v[0] && v[1] == t.v[1];
00030 }
00031 };
00032
00033 class CVertex: public
00034 VertexSimp2<CVertex, CEdge, CFace,
00035 vcg::vert::Coord3f, vert::Normal3f, vert::BitFlags, vert::Mark,
00036 vert::VFAdj,
00037 vert::Qualityf> {
00038 public:
00039 float color;
00040 };
00041
00042 class CFace: public FaceSimp2 <CVertex, CEdge, CFace, face::VertexRef,
00043 face::BitFlags, face::VFAdj, face::FFAdj > {};
00044
00045 class CMesh: public tri::TriMesh< std::vector<CVertex>, std::vector<CFace> > {};
00046
00047 #endif