00001 #include <vector>
00002 #include <vcg/simplex/vertex/base.h>
00003 #include <vcg/simplex/vertex/component_occ.h>
00004 #include <vcg/simplex/face/base.h>
00005 #include <vcg/simplex/face/component.h>
00006
00007 #include <vcg/complex/trimesh/base.h>
00008
00009 #include<vcg/complex/trimesh/create/platonic.h>
00010
00011 class MyEdge;
00012 class MyFace;
00013
00014 class MyVertex: public vcg::VertexSimp2<MyVertex,MyEdge,MyFace, vcg::vert::InfoOcf,vcg::vert::Coord3d, vcg::vert::Normal3fOcc>{};
00015 class MyFace: public vcg::FaceSimp2<MyVertex,MyEdge,MyFace,vcg::face::VertexRef>{};
00016 class MyMesh: public vcg::tri::TriMesh< vcg::vert::vector_occ<MyVertex>, std::vector<MyFace> >{};
00017
00018 int main()
00019 {
00020 MyMesh m;
00021 vcg::tri::Tetrahedron(m);
00022 MyMesh::VertexIterator vi = m.vert.begin();
00023
00024 (*vi).N() = vcg::Point3f(1.0,1.0,1.0);
00025 m.vert.EnableAttribute<vcg::vert::Normal3fOcc::NormalType>();
00026 (*vi).N() = vcg::Point3f(1.0,1.0,1.0);
00027 m.vert.DisableAttribute<vcg::vert::Normal3fOcc::NormalType>();
00028
00029 (*vi).N() = vcg::Point3f(1.0,1.0,1.0);
00030 return 0;
00031 }