00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef MESHDEFINITION_H_
00012 #define MESHDEFINITION_H_
00013
00014
00015
00016 #include <vcg/simplex/vertex/base.h>
00017 #include <vcg/simplex/vertex/component.h>
00018 #include <vcg/complex/trimesh/allocate.h>
00019 #include <vcg/complex/used_types.h>
00020 #include <vcg/simplex/face/base.h>
00021 #include <vcg/simplex/face/component.h>
00022
00023
00024 class CVertexO;
00025 class CEdge;
00026 class CFaceO;
00027
00028
00029 class CUsedTypesO: public vcg::UsedTypes < vcg::Use<CVertexO>::AsVertexType,
00030 vcg::Use<CEdge >::AsEdgeType,
00031 vcg::Use<CFaceO >::AsFaceType >{};
00032
00033
00034
00035
00036
00037
00038 class CVertexO : public vcg::Vertex< CUsedTypesO,
00039 vcg::vertex::InfoOcf,
00040 vcg::vertex::Coord3f,
00041 vcg::vertex::BitFlags,
00042 vcg::vertex::Normal3f,
00043 vcg::vertex::Qualityf,
00044 vcg::vertex::Color4b,
00045 vcg::vertex::VFAdjOcf,
00046 vcg::vertex::MarkOcf,
00047 vcg::vertex::TexCoordfOcf,
00048 vcg::vertex::CurvaturefOcf,
00049 vcg::vertex::CurvatureDirfOcf,
00050 vcg::vertex::RadiusfOcf
00051 >{
00052 };
00053
00054
00055
00056
00057 class CEdge : public vcg::Edge<CUsedTypesO, vcg::edge::EVAdj> {
00058 public:
00059 inline CEdge(){};
00060 inline CEdge( CVertexO * v0, CVertexO * v1){ V(0)= v0 ; V(1)= v1;};
00061 static inline CEdge OrderedEdge(CVertexO* v0,CVertexO* v1){
00062 if(v0<v1) return CEdge(v0,v1);
00063 else return CEdge(v1,v0);
00064 }
00065 };
00066
00067
00068 class CFaceO : public vcg::Face< CUsedTypesO,
00069 vcg::face::InfoOcf,
00070 vcg::face::VertexRef,
00071 vcg::face::BitFlags,
00072 vcg::face::Normal3f,
00073 vcg::face::QualityfOcf,
00074 vcg::face::MarkOcf,
00075 vcg::face::Color4bOcf,
00076 vcg::face::FFAdjOcf,
00077 vcg::face::VFAdjOcf,
00078 vcg::face::WedgeTexCoordfOcf
00079 > {};
00080
00081 class CMeshO : public vcg::tri::TriMesh< vcg::vertex::vector_ocf<CVertexO>, vcg::face::vector_ocf<CFaceO> > {};
00082
00083
00084 #endif